Project

General

Profile

« Previous | Next » 

Revision 49899

added javax.persistance annotations

View differences:

Api.java
4 4
import java.util.Objects;
5 5
import java.util.Set;
6 6

  
7
import javax.persistence.*;
8

  
7 9
import com.google.common.collect.ComparisonChain;
8 10
import com.google.gson.Gson;
9 11

  
10 12
/**
11 13
 * Api
12 14
 */
13
public class Api implements Comparable<Api> {
15
@MappedSuperclass
16
public class Api<AP extends ApiParam> implements Comparable<Api<AP>> {
14 17

  
15
	private String id = null;
16
	private String protocol = null;
17
	private String datasource = null;
18
	private String contentdescription = null;
19
	private Boolean active = false;
20
	private Boolean removable = false;
21
	private String typology = null;
22
	private String compatibility;
23
	private String metadataIdentifierPath;
24
	private Integer lastCollectionTotal;
25
	private Date lastCollectionDate;
26
	private String lastCollectionMdid;
27
	private Integer lastAggregationTotal;
28
	private Date lastAggregationDate;
29
	private String lastAggregationMdid;
30
	private Integer lastDownloadTotal;
31
	private Date lastDownloadDate;
32
	private String lastDownloadMdid;
33
	private String lastValidationJob;
34
	private String baseurl = null;
35
	private Set<ApiParam> apiParams;
18
	@Id
19
	protected String id = null;
20
	protected String protocol = null;
21
	protected String datasource = null;
22
	protected String contentdescription = null;
23
	protected Boolean active = false;
24
	protected Boolean removable = false;
25
	protected String typology = null;
26
	protected String compatibility;
36 27

  
28
	@Column(name = "metadata_identifier_path")
29
	protected String metadataIdentifierPath;
30

  
31
	@Column(name = "last_collection_total")
32
	protected Integer lastCollectionTotal;
33

  
34
	@Column(name = "last_collection_date")
35
	protected Date lastCollectionDate;
36

  
37
	@Column(name = "last_collection_mdid")
38
	protected String lastCollectionMdid;
39

  
40
	@Column(name = "last_aggregation_total")
41
	protected Integer lastAggregationTotal;
42

  
43
	@Column(name = "last_aggregation_date")
44
	protected Date lastAggregationDate;
45

  
46
	@Column(name = "last_aggregation_mdid")
47
	protected String lastAggregationMdid;
48

  
49
	@Column(name = "last_download_total")
50
	protected Integer lastDownloadTotal;
51

  
52
	@Column(name = "last_download_date")
53
	protected Date lastDownloadDate;
54

  
55
	@Column(name = "last_download_objid")
56
	protected String lastDownloadMdid;
57

  
58
	@Column(name = "last_validation_job")
59
	protected String lastValidationJob;
60
	protected String baseurl = null;
61

  
62
	@OneToMany(mappedBy = "id.api", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
63
	protected Set<AP> apiParams;
64

  
37 65
	public Api() {}
38 66

  
39 67
	public String getId() {
......
116 144
		return baseurl;
117 145
	}
118 146

  
119
	public Set<ApiParam> getApiParams() {
147
	public Set<AP> getApiParams() {
120 148
		return apiParams;
121 149
	}
122 150

  
......
220 248
		return this;
221 249
	}
222 250

  
223
	public Api setApiParams(final Set<ApiParam> apiParams) {
251
	public Api setApiParams(final Set<AP> apiParams) {
224 252
		this.apiParams = apiParams;
225 253
		return this;
226 254
	}

Also available in: Unified diff