Project

General

Profile

« Previous | Next » 

Revision 49899

added javax.persistance annotations

View differences:

Datasource.java
2 2

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

  
6 7
/**
7 8
 * Datasource
8 9
 */
10
@MappedSuperclass
9 11
public class Datasource<ORG extends Organization, ID extends Identity> {
10 12

  
11
	private String id = null;
12
	private String officialname = null;
13
	private String englishname = null;
14
	private String websiteurl = null;
15
	private String logourl = null;
16
	private String contactemail = null;
17
	private Double latitude;
18
	private Double longitude;
19
	private String timezone = null;
20
	private String namespaceprefix;
21
	private String languages;
13
	@Id
14
	protected String id = null;
15
	protected String officialname = null;
16
	protected String englishname = null;
17
	protected String websiteurl = null;
18
	protected String logourl = null;
19
	protected String contactemail = null;
20
	protected Double latitude;
21
	protected Double longitude;
22
	protected String timezone = null;
22 23

  
23
	private String od_contenttypes;
24
	private String collectedfrom = null;
25
	private Date dateofvalidation = null;
26
	private String typology = null;
27
	private String provenanceaction;
28
	private Date dateofcollection;
29
	private String platform;
24
	@Column(name = "namespaceprefix", columnDefinition = "bpchar(12)")
25
	protected String namespaceprefix;
30 26

  
31
	private String activationId;
32
	private String description = null;
27
	protected String languages;
33 28

  
34
	private Date releasestartdate;
35
	private Date releaseenddate;
36
	private String missionstatementurl;
37
	private Boolean dataprovider;
38
	private Boolean serviceprovider;
29
	protected String od_contenttypes;
30
	protected String collectedfrom = null;
31
	protected Date dateofvalidation = null;
32
	protected String typology = null;
33
	protected String provenanceaction;
34
	protected Date dateofcollection;
35
	protected String platform;
39 36

  
40
	private String databaseaccesstype;
41
	private String datauploadtype;
42
	private String databaseaccessrestriction;
43
	private String datauploadrestriction;
37
	@Column(name = "activationid")
38
	protected String activationId;
39
	protected String description = null;
44 40

  
45
	private Boolean versioning;
46
	private String citationguidelineurl;
47
	private String qualitymanagementkind;
48
	private String pidsystems;
41
	protected Date releasestartdate;
42
	protected Date releaseenddate;
43
	protected String missionstatementurl;
44
	protected Boolean dataprovider;
45
	protected Boolean serviceprovider;
49 46

  
50
	private String certificates;
51
	private String aggregator;
47
	protected String databaseaccesstype;
48
	protected String datauploadtype;
49
	protected String databaseaccessrestriction;
50
	protected String datauploadrestriction;
52 51

  
53
	private String issn = null;
54
	private String eissn = null;
55
	private String lissn = null;
52
	protected Boolean versioning;
53
	protected String citationguidelineurl;
54
	protected String qualitymanagementkind;
55
	protected String pidsystems;
56 56

  
57
	private String registeredby = null;
57
	protected String certificates;
58
	protected String aggregator;
58 59

  
59
	private String subjects;
60
	protected String issn = null;
61
	protected String eissn = null;
62
	protected String lissn = null;
60 63

  
61
	private Boolean managed;
64
	protected String registeredby = null;
62 65

  
63
	private Set<ORG> organizations;
66
	protected String subjects;
64 67

  
65
	private Set<ID> identities;
68
	protected Boolean managed;
66 69

  
70
	@ManyToMany(
71
			cascade = { CascadeType.PERSIST, CascadeType.MERGE },
72
			fetch = FetchType.LAZY)
73
	@JoinTable(
74
			name = "dsm_datasource_organization",
75
			joinColumns = @JoinColumn(name="datasource"),
76
			inverseJoinColumns = @JoinColumn(name="organization"))
77
	protected Set<ORG> organizations;
78

  
79
	@ManyToMany(
80
			cascade = { CascadeType.PERSIST, CascadeType.MERGE },
81
			fetch = FetchType.LAZY )
82
	@JoinTable(
83
			name = "dsm_datasourcepids",
84
			joinColumns = @JoinColumn(name = "datasource"),
85
			inverseJoinColumns = @JoinColumn(name = "pid"))
86
	protected Set<ID> identities;
87

  
67 88
	public Datasource() {}
68 89

  
69 90
	public String getId() {

Also available in: Unified diff