1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 package net.sf.pmr.agilePlanning.domain.story;
37
38 import java.util.Set;
39
40 import net.sf.pmr.agilePlanning.domain.iteration.Iteration;
41 import net.sf.pmr.core.domain.basicProject.BasicProject;
42 import net.sf.pmr.keopsframework.domain.object.AbstractDomainObject;
43
44 import org.apache.commons.lang.builder.EqualsBuilder;
45 import org.apache.commons.lang.builder.HashCodeBuilder;
46 /***
47 * @author Arnaud Prost (arnaud.prost@gmail.com)
48 */
49 public class StoryImpl extends AbstractDomainObject implements Story {
50
51 /***
52 * short description
53 */
54 private String shortDescription;
55
56 /***
57 * description
58 */
59 private String description;
60
61 /***
62 * estimate
63 */
64 private int estimate;
65
66 /***
67 * iteration
68 */
69 private Iteration iteration;
70
71 /***
72 * tasks
73 */
74 private Set tasks;
75
76 /***
77 * Basic project
78 */
79 private BasicProject basicProject;
80
81 /***
82 * @see net.sf.pmr.agilePlanning.domain.story.Story#getShortDescription()
83 */
84 public String getShortDescription() {
85 return this.shortDescription;
86 }
87
88 /***
89 * @see net.sf.pmr.agilePlanning.domain.story.Story#setShortDescription(java.lang.String)
90 */
91 public void setShortDescription(final String shortDescription) {
92 this.shortDescription = shortDescription;
93 }
94
95 /***
96 * @see net.sf.pmr.agilePlanning.domain.story.Story#getDescription()
97 */
98 public String getDescription() {
99 return this.description;
100 }
101
102 /***
103 * @see net.sf.pmr.agilePlanning.domain.story.Story#setDescription(java.lang.String)
104 */
105 public void setDescription(final String description) {
106 this.description = description;
107
108 }
109
110 /***
111 * @see net.sf.pmr.agilePlanning.domain.story.Story#getEstimate()
112 */
113 public int getEstimate() {
114 return this.estimate;
115 }
116
117 /***
118 * @see net.sf.pmr.agilePlanning.domain.story.Story#setEstimate(int)
119 */
120 public void setEstimate(final int estimate) {
121 this.estimate = estimate;
122
123 }
124
125 /***
126 * @see net.sf.pmr.agilePlanning.domain.story.Story#getIteration()
127 */
128 public Iteration getIteration() {
129 return this.iteration;
130 }
131
132 /***
133 * @see net.sf.pmr.agilePlanning.domain.story.Story#setIteration(net.sf.pmr.agilePlanning.domain.Iteration)
134 */
135 public void setIteration(final Iteration iteration) {
136 this.iteration = iteration;
137 }
138
139 /***
140 * @see net.sf.pmr.agilePlanning.domain.story.Story#getTasks()
141 */
142 public Set getTasks() {
143 return this.tasks;
144 }
145
146 /***
147 * @see net.sf.pmr.agilePlanning.domain.story.Story#setTasks(java.util.List)
148 */
149 public void setTasks(final Set tasks) {
150 this.tasks = tasks;
151 }
152
153
154 /***
155 * @see net.sf.pmr.agilePlanning.domain.story.Story#getBasicProject()
156 */
157 public BasicProject getBasicProject() {
158 return basicProject;
159 }
160
161 /***
162 * @see net.sf.pmr.agilePlanning.domain.story.Story#setBasicProject(BasicProject)
163 */
164 public void setBasicProject(final BasicProject basicProject) {
165 this.basicProject = basicProject;
166 }
167
168 /***
169 * @see java.lang.Object#equals(Object)
170 */
171
172 public boolean equals(final Object object) {
173 if (!(object instanceof StoryImpl)) {
174 return false;
175 }
176 StoryImpl rhs = (StoryImpl) object;
177 return new EqualsBuilder().append(
178 this.shortDescription, rhs.shortDescription).append(this.iteration,
179 rhs.iteration).append(this.basicProject,
180 rhs.basicProject).isEquals();
181 }
182
183
184 /***
185 * @see java.lang.Object#hashCode()
186 */
187
188 public int hashCode() {
189 return new HashCodeBuilder(258479881, -53180989)
190 .append(this.shortDescription).append(
191 this.iteration).append(
192 this.basicProject).toHashCode();
193 }
194 }