Project

General

Profile

« Previous | Next » 

Revision 50381

using timestamp instead of date type

View differences:

Api.java
1 1
package eu.dnetlib.enabling.datasources.common;
2 2

  
3
import java.sql.Date;
3
import java.sql.Timestamp;
4 4
import java.util.Objects;
5 5
import java.util.Set;
6
import javax.persistence.*;
6 7

  
7
import javax.persistence.CascadeType;
8
import javax.persistence.Column;
9
import javax.persistence.FetchType;
10
import javax.persistence.Id;
11
import javax.persistence.MappedSuperclass;
12
import javax.persistence.OneToMany;
13
import javax.persistence.Transient;
14

  
15 8
import com.google.common.collect.ComparisonChain;
16 9
import com.google.gson.Gson;
17 10

  
......
41 34
	protected Integer lastCollectionTotal;
42 35

  
43 36
	@Column(name = "last_collection_date")
44
	protected Date lastCollectionDate;
37
	protected Timestamp lastCollectionDate;
45 38

  
46 39
	@Column(name = "last_collection_mdid")
47 40
	protected String lastCollectionMdid;
......
50 43
	protected Integer lastAggregationTotal;
51 44

  
52 45
	@Column(name = "last_aggregation_date")
53
	protected Date lastAggregationDate;
46
	protected Timestamp lastAggregationDate;
54 47

  
55 48
	@Column(name = "last_aggregation_mdid")
56 49
	protected String lastAggregationMdid;
......
59 52
	protected Integer lastDownloadTotal;
60 53

  
61 54
	@Column(name = "last_download_date")
62
	protected Date lastDownloadDate;
55
	protected Timestamp lastDownloadDate;
63 56

  
64 57
	@Column(name = "last_download_objid")
65 58
	protected String lastDownloadObjid;
......
117 110
		return lastCollectionTotal;
118 111
	}
119 112

  
120
	public Date getLastCollectionDate() {
113
	public Timestamp getLastCollectionDate() {
121 114
		return lastCollectionDate;
122 115
	}
123 116

  
......
129 122
		return lastAggregationTotal;
130 123
	}
131 124

  
132
	public Date getLastAggregationDate() {
125
	public Timestamp getLastAggregationDate() {
133 126
		return lastAggregationDate;
134 127
	}
135 128

  
......
141 134
		return lastDownloadTotal;
142 135
	}
143 136

  
144
	public Date getLastDownloadDate() {
137
	public Timestamp getLastDownloadDate() {
145 138
		return lastDownloadDate;
146 139
	}
147 140

  
......
216 209
		return this;
217 210
	}
218 211

  
219
	public Api<AP> setLastCollectionDate(final Date lastCollectionDate) {
212
	public Api<AP> setLastCollectionDate(final Timestamp lastCollectionDate) {
220 213
		this.lastCollectionDate = lastCollectionDate;
221 214
		return this;
222 215
	}
......
231 224
		return this;
232 225
	}
233 226

  
234
	public Api<AP> setLastAggregationDate(final Date lastAggregationDate) {
227
	public Api<AP> setLastAggregationDate(final Timestamp lastAggregationDate) {
235 228
		this.lastAggregationDate = lastAggregationDate;
236 229
		return this;
237 230
	}
......
246 239
		return this;
247 240
	}
248 241

  
249
	public Api<AP> setLastDownloadDate(final Date lastDownloadDate) {
242
	public Api<AP> setLastDownloadDate(final Timestamp lastDownloadDate) {
250 243
		this.lastDownloadDate = lastDownloadDate;
251 244
		return this;
252 245
	}

Also available in: Unified diff