1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.system.extraction;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 import java.io.Serializable;
29 import java.util.Date;
30
31
32
33
34
35
36 public abstract class ExtractSelectedGeometry
37 implements Serializable, Comparable<ExtractSelectedGeometry>
38 {
39
40
41
42 private static final long serialVersionUID = -96333533573150160L;
43
44
45 private String extractSelGeomSession;
46
47
48
49
50
51 public String getExtractSelGeomSession()
52 {
53 return this.extractSelGeomSession;
54 }
55
56
57
58
59
60 public void setExtractSelGeomSession(String extractSelGeomSessionIn)
61 {
62 this.extractSelGeomSession = extractSelGeomSessionIn;
63 }
64
65 private Date extractSelGeomDt;
66
67
68
69
70
71 public Date getExtractSelGeomDt()
72 {
73 return this.extractSelGeomDt;
74 }
75
76
77
78
79
80 public void setExtractSelGeomDt(Date extractSelGeomDtIn)
81 {
82 this.extractSelGeomDt = extractSelGeomDtIn;
83 }
84
85 private Integer extractSelGeomGeometryId;
86
87
88
89
90
91 public Integer getExtractSelGeomGeometryId()
92 {
93 return this.extractSelGeomGeometryId;
94 }
95
96
97
98
99
100 public void setExtractSelGeomGeometryId(Integer extractSelGeomGeometryIdIn)
101 {
102 this.extractSelGeomGeometryId = extractSelGeomGeometryIdIn;
103 }
104
105
106
107
108
109
110 @Override
111 public boolean equals(Object object)
112 {
113 if (this == object)
114 {
115 return true;
116 }
117 if (!(object instanceof ExtractSelectedGeometry))
118 {
119 return false;
120 }
121 final ExtractSelectedGeometry that = (ExtractSelectedGeometry)object;
122 if (this.extractSelGeomGeometryId == null || that.getExtractSelGeomGeometryId() == null || !this.extractSelGeomGeometryId.equals(that.getExtractSelGeomGeometryId()))
123 {
124 return false;
125 }
126 return true;
127 }
128
129
130
131
132 @Override
133 public int hashCode()
134 {
135 int hashCode = 0;
136 hashCode = 29 * hashCode + (this.extractSelGeomGeometryId == null ? 0 : this.extractSelGeomGeometryId.hashCode());
137
138 return hashCode;
139 }
140
141
142
143
144 public static final class Factory
145 {
146
147
148
149
150 public static ExtractSelectedGeometry newInstance()
151 {
152 return new ExtractSelectedGeometryImpl();
153 }
154
155
156
157
158
159
160
161 public static ExtractSelectedGeometry newInstance(String extractSelGeomSession)
162 {
163 final ExtractSelectedGeometry entity = new ExtractSelectedGeometryImpl();
164 entity.setExtractSelGeomSession(extractSelGeomSession);
165 return entity;
166 }
167
168
169
170
171
172
173
174
175 public static ExtractSelectedGeometry newInstance(String extractSelGeomSession, Date extractSelGeomDt)
176 {
177 final ExtractSelectedGeometry entity = new ExtractSelectedGeometryImpl();
178 entity.setExtractSelGeomSession(extractSelGeomSession);
179 entity.setExtractSelGeomDt(extractSelGeomDt);
180 return entity;
181 }
182 }
183
184
185
186
187 public int compareTo(ExtractSelectedGeometry o)
188 {
189 int cmp = 0;
190 if (this.getExtractSelGeomGeometryId() != null)
191 {
192 cmp = this.getExtractSelGeomGeometryId().compareTo(o.getExtractSelGeomGeometryId());
193 }
194 else
195 {
196 if (this.getExtractSelGeomSession() != null)
197 {
198 cmp = (cmp != 0 ? cmp : this.getExtractSelGeomSession().compareTo(o.getExtractSelGeomSession()));
199 }
200 if (this.getExtractSelGeomDt() != null)
201 {
202 cmp = (cmp != 0 ? cmp : this.getExtractSelGeomDt().compareTo(o.getExtractSelGeomDt()));
203 }
204 }
205 return cmp;
206 }
207
208
209 }