Revision 50439
Added by Claudio Atzori about 6 years ago
Api.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.enabling.datasources.common; |
2 | 2 |
|
3 |
import java.sql.Timestamp;
|
|
3 |
import java.util.Date;
|
|
4 | 4 |
import java.util.Objects; |
5 | 5 |
import java.util.Set; |
6 | 6 |
import javax.persistence.*; |
... | ... | |
34 | 34 |
protected Integer lastCollectionTotal; |
35 | 35 |
|
36 | 36 |
@Column(name = "last_collection_date") |
37 |
protected Timestamp lastCollectionDate; |
|
37 |
@Temporal(TemporalType.TIMESTAMP) |
|
38 |
protected Date lastCollectionDate; |
|
38 | 39 |
|
39 | 40 |
@Column(name = "last_collection_mdid") |
40 | 41 |
protected String lastCollectionMdid; |
... | ... | |
43 | 44 |
protected Integer lastAggregationTotal; |
44 | 45 |
|
45 | 46 |
@Column(name = "last_aggregation_date") |
46 |
protected Timestamp lastAggregationDate; |
|
47 |
@Temporal(TemporalType.TIMESTAMP) |
|
48 |
protected Date lastAggregationDate; |
|
47 | 49 |
|
48 | 50 |
@Column(name = "last_aggregation_mdid") |
49 | 51 |
protected String lastAggregationMdid; |
... | ... | |
52 | 54 |
protected Integer lastDownloadTotal; |
53 | 55 |
|
54 | 56 |
@Column(name = "last_download_date") |
55 |
protected Timestamp lastDownloadDate; |
|
57 |
@Temporal(TemporalType.TIMESTAMP) |
|
58 |
protected Date lastDownloadDate; |
|
56 | 59 |
|
57 | 60 |
@Column(name = "last_download_objid") |
58 | 61 |
protected String lastDownloadObjid; |
... | ... | |
110 | 113 |
return lastCollectionTotal; |
111 | 114 |
} |
112 | 115 |
|
113 |
public Timestamp getLastCollectionDate() {
|
|
116 |
public Date getLastCollectionDate() {
|
|
114 | 117 |
return lastCollectionDate; |
115 | 118 |
} |
116 | 119 |
|
... | ... | |
122 | 125 |
return lastAggregationTotal; |
123 | 126 |
} |
124 | 127 |
|
125 |
public Timestamp getLastAggregationDate() {
|
|
128 |
public Date getLastAggregationDate() {
|
|
126 | 129 |
return lastAggregationDate; |
127 | 130 |
} |
128 | 131 |
|
... | ... | |
134 | 137 |
return lastDownloadTotal; |
135 | 138 |
} |
136 | 139 |
|
137 |
public Timestamp getLastDownloadDate() {
|
|
140 |
public Date getLastDownloadDate() {
|
|
138 | 141 |
return lastDownloadDate; |
139 | 142 |
} |
140 | 143 |
|
... | ... | |
209 | 212 |
return this; |
210 | 213 |
} |
211 | 214 |
|
212 |
public Api<AP> setLastCollectionDate(final Timestamp lastCollectionDate) {
|
|
215 |
public Api<AP> setLastCollectionDate(final Date lastCollectionDate) {
|
|
213 | 216 |
this.lastCollectionDate = lastCollectionDate; |
214 | 217 |
return this; |
215 | 218 |
} |
... | ... | |
224 | 227 |
return this; |
225 | 228 |
} |
226 | 229 |
|
227 |
public Api<AP> setLastAggregationDate(final Timestamp lastAggregationDate) {
|
|
230 |
public Api<AP> setLastAggregationDate(final Date lastAggregationDate) {
|
|
228 | 231 |
this.lastAggregationDate = lastAggregationDate; |
229 | 232 |
return this; |
230 | 233 |
} |
... | ... | |
239 | 242 |
return this; |
240 | 243 |
} |
241 | 244 |
|
242 |
public Api<AP> setLastDownloadDate(final Timestamp lastDownloadDate) {
|
|
245 |
public Api<AP> setLastDownloadDate(final Date lastDownloadDate) {
|
|
243 | 246 |
this.lastDownloadDate = lastDownloadDate; |
244 | 247 |
return this; |
245 | 248 |
} |
Also available in: Unified diff
adjusted date/timestamp mappings between application and DB