001: /**
002: *
003: */package org.emforge.projectmanager.base;
004:
005: import java.io.Serializable;
006: import java.util.Date;
007:
008: import org.emforge.base.PrimitiveImpl;
009:
010: /**
011: * @author YShevchenko
012: */
013: public class MilestoneDO extends PrimitiveImpl implements Serializable {
014:
015: private static final long serialVersionUID = 7300489971754037904L;
016:
017: // Fields
018: private ProjectDO project;
019: private Date performanceDate;
020: private Date actualDate;
021: private Boolean closedStatus = false;
022:
023: // Constructors
024:
025: /**
026: * default constructor
027: */
028: public MilestoneDO() {
029:
030: }
031:
032: /**
033: * Minimal constructor
034: *
035: * @param project
036: * @param name
037: * @param performanceDate
038: */
039: public MilestoneDO(ProjectDO project, String name,
040: Date performanceDate) {
041:
042: this (project, name, performanceDate, null, false);
043: }
044:
045: /**
046: * Full constructor
047: *
048: * @param project
049: * @param name
050: * @param description
051: * @param performanceDate
052: * @param actualDate
053: * @param closedStatus
054: */
055: public MilestoneDO(ProjectDO project, String name,
056: Date performanceDate, Date actualDate, Boolean closedStatus) {
057:
058: this .project = project;
059: this .performanceDate = performanceDate;
060: this .actualDate = actualDate;
061: this .closedStatus = closedStatus;
062: setName(name);
063: }
064:
065: public ProjectDO getProject() {
066:
067: return project;
068: }
069:
070: public void setProject(ProjectDO project) {
071:
072: this .project = project;
073: }
074:
075: public Date getPerformanceDate() {
076:
077: return performanceDate;
078: }
079:
080: public void setPerformanceDate(Date performanceDate) {
081:
082: this .performanceDate = performanceDate;
083: }
084:
085: public Date getActualDate() {
086:
087: return actualDate;
088: }
089:
090: public void setActualDate(Date actualDate) {
091:
092: this .actualDate = actualDate;
093: }
094:
095: public Boolean getClosedStatus() {
096:
097: return closedStatus;
098: }
099:
100: public void setClosedStatus(Boolean closedStatus) {
101:
102: this .closedStatus = closedStatus;
103: }
104:
105: /**
106: * @see java.lang.Object#equals(java.lang.Object)
107: */
108: public boolean equals(Object i_obj) {
109:
110: boolean result = false;
111:
112: if (i_obj != null) {
113: if (i_obj == this ) {
114: result = true;
115:
116: } else if (i_obj instanceof MilestoneDO) {
117: if (((MilestoneDO) i_obj).getId() == getId()) {
118: result = true;
119: }
120: }
121: }
122:
123: return result;
124: }
125:
126: /**
127: * @see java.lang.Object#toString()
128: */
129: @Override
130: public String toString() {
131:
132: return getDisplayName();
133: }
134:
135: }
|