Salome HOME
Update copyrights 2014.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / StepCommentDTO.java
1 /*****************************************************************************
2  * Company         EURIWARE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   01.11.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.service.dto; 
11
12 import java.util.Date;
13
14 /**
15  * DTO for step comments.
16  * 
17  * @author isr
18  */
19 public class StepCommentDTO {
20         /**
21          * ID of the comment in the data base.
22          */
23         private Long _id;
24         /**
25          * The text of the comment itself.
26          */
27         private String _text;
28         /**
29          * ID of the project element containing the step.
30          */
31         private Long _projectElementId;
32         /**
33          * Number of step to which the comment is attached.
34          */
35     private Integer _step;
36         /**
37          * The date on which the comment was made.
38          */
39     private Date _date;
40         /**
41          * Name of the user who made the comment.
42          */
43     private String _userName;
44         /**
45          * Id of the user who made the comment.
46          */
47     private Long _userId;
48     /**
49      * The user who made the comment.
50      */
51     private UserDTO _user;
52     /**
53      * The title of the the comment.
54      */
55     private String _title;
56     
57         /**
58          * Default constructor.
59          */
60         public StepCommentDTO() {
61                 super();
62         }
63     
64         /**
65          * Constructor from all properties.* Constructor from all properties.
66          * @param id the id
67          * @param text the text of the comment
68          * @param projectElementId the id
69          * @param step the step number
70          * @param date the date
71          * @param userId the user id
72          * @param userName the user name
73          * @param title the title
74          */
75         public StepCommentDTO(final Long id, final String text, final Long projectElementId, final Integer step,
76                         final Date date,  final Long userId, final String userName, final String title) {
77                 _id = id;
78                 _text = text;
79                 _projectElementId = projectElementId;
80                 _step = step;
81                 _date = date;
82                 _userName = userName;
83                 _userId = userId;
84                 _title = title;
85         }
86
87         /**
88          * Get the id.
89          * @return the id
90          */
91         public Long getId() {
92                 return _id;
93         }
94         /**
95          * Set the id.
96          * @param id the id to set
97          */
98         public void setId(final Long id) {
99                 _id = id;
100         }
101         /**
102          * Get the text.
103          * @return the text
104          */
105         public String getText() {
106                 return _text;
107         }
108         /**
109          * Set the text.
110          * @param text the text to set
111          */
112         public void setText(final String text) {
113                 _text = text;
114         }
115         /**
116          * Get the projectElementID.
117          * @return the projectElementID
118          */
119         public Long getProjectElementId() {
120                 return _projectElementId;
121         }
122         /**
123          * Set the projectElementID.
124          * @param projectElementId the projectElementId to set
125          */
126         public void setProjectElementId(final Long projectElementId) {
127                 _projectElementId = projectElementId;
128         }
129         /**
130          * Get the step.
131          * @return the step
132          */
133         public Integer getStep() {
134                 return _step;
135         }
136         /**
137          * Set the step.
138          * @param step the step to set
139          */
140         public void setStep(final Integer step) {
141                 _step = step;
142         }
143         /**
144          * Get the date.
145          * @return the date
146          */
147         public Date getDate() {
148                 return _date;
149         }
150         /**
151          * Set the date.
152          * @param date the date to set
153          */
154         public void setDate(final Date date) {
155                 _date = date;
156         }
157         /**
158          * Get the userName.
159          * @return the userName
160          */
161         public String getUserName() {
162                 return _userName;
163         }
164         /**
165          * Set the userName.
166          * @param userName the userName to set
167          */
168         public void setUserName(final String userName) {
169                 _userName = userName;
170         }
171         /**
172          * Get the userId.
173          * @return the userId
174          */
175         public Long getUserId() {
176                 return _userId;
177         }
178         /**
179          * Set the userId.
180          * @param userId the userId to set
181          */
182         public void setUserId(final Long userId) {
183                 _userId = userId;
184         }
185         /**
186          * Get the user.
187          * @return the user
188          */
189         public UserDTO getUser() {
190                 return _user;
191         }
192         /**
193          * Set the user.
194          * @param user the user to set
195          */
196         public void setUser(final UserDTO user) {
197                 _user = user;
198         }
199         /**
200          * Get the title.
201          * @return the title
202          */
203         public String getTitle() {
204                 return _title;
205         }
206         /**
207          * Set the title.
208          * @param title the title to set
209          */
210         public void setTitle(final String title) {
211                 _title = title;
212         }
213         
214         /**
215          * Get the id. Used with this name in menupopup.jsp.
216          * @return the id
217          */
218         public Long getIndex() {
219                 return _id;
220         }
221 }