Salome HOME
Copyrights update 2015.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / StudyDTO.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   20.02.2013
6  * @author         $Author$
7  * @version        $Revision$
8  * @copyright      OPEN CASCADE 2012-2015
9  *****************************************************************************/
10
11 package org.splat.service.dto;
12
13 import java.io.Serializable;
14 import java.util.Date;
15
16 import org.splat.dal.bo.som.ProgressState;
17
18 /**
19  * Study DTO class. Used in study search results.
20  * 
21  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
22  */
23 public class StudyDTO implements Proxy, Serializable {
24         /**
25          * Study persistent id.
26          */
27         private transient final Long _rid;
28         /**
29          * Study reference.
30          */
31         private transient final String _sid;
32         /**
33          * Study progress state.
34          */
35         private transient final ProgressState _state;
36         /**
37          * Study title.
38          */
39         private transient final String _title;
40         /**
41          * Study name.
42          */
43         private transient final String _name;
44         /**
45          * Type.
46          */
47         private transient String _type;
48         /**
49          * Creation date.
50          */
51         private transient Date _date;
52         /**
53          * Last modification date.
54          */
55         private Date _lastModificationDate;
56         /**
57          * Serialization version id.
58          */
59         private static final long serialVersionUID = -4386494192709562221L;
60
61         /**
62          * Constructor from properties except for creation and modification dates.
63          * 
64          * @param id
65          *            study persistent id
66          * @param reference
67          *            study reference
68          * @param state
69          *            study progress state
70          * @param title
71          *            study title
72          * @param author
73          *            study author display name
74          */
75         public StudyDTO(final Long id, final String reference,
76                         final ProgressState state, final String title, final String author) {
77                 _rid = id;
78                 _sid = reference;
79                 _state = state;
80                 _title = title;
81                 _name = author;
82         }
83
84         /**
85          * {@inheritDoc}
86          * 
87          * @see org.splat.service.dto.Proxy#getAuthorName()
88          */
89         public String getAuthorName() {
90                 return _name;
91         }
92
93         /**
94          * {@inheritDoc}
95          * 
96          * @see org.splat.service.dto.Proxy#getIndex()
97          */
98         public Long getIndex() {
99                 return _rid;
100         }
101
102         /**
103          * {@inheritDoc}
104          * 
105          * @see org.splat.service.dto.Proxy#getProgressState()
106          */
107         public ProgressState getProgressState() {
108                 return _state;
109         }
110
111         /**
112          * {@inheritDoc}
113          * 
114          * @see org.splat.service.dto.Proxy#getReference()
115          */
116         public String getReference() {
117                 return _sid;
118         }
119
120         /**
121          * {@inheritDoc}
122          * 
123          * @see org.splat.service.dto.Proxy#getTitle()
124          */
125         public String getTitle() {
126                 return _title;
127         }
128
129         /**
130          * {@inheritDoc}
131          * 
132          * @see org.splat.service.dto.Proxy#getType()
133          */
134         public String getType() {
135                 return _type;
136         }
137
138         /**
139          * Get the date.
140          * @return the date
141          */
142         public Date getDate() {
143                 return _date;
144         }
145
146         /**
147          * Set the date.
148          * @param date the date to set
149          */
150         public void setDate(final Date date) {
151                 _date = date;
152         }
153
154         /**
155          * Get the lastModificationDate.
156          * @return the lastModificationDate
157          */
158         public Date getLastModificationDate() {
159                 return _lastModificationDate;
160         }
161
162         /**
163          * Set the lastModificationDate.
164          * @param lastModificationDate the lastModificationDate to set
165          */
166         public void setLastModificationDate(final Date lastModificationDate) {
167                 _lastModificationDate = lastModificationDate;
168         }
169 }