2017-09-14 12:37:36 +02:00
|
|
|
package entities;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
2017-11-02 17:17:56 +01:00
|
|
|
import java.util.Date;
|
2017-09-14 12:37:36 +02:00
|
|
|
import java.util.Set;
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import javax.persistence.CascadeType;
|
|
|
|
import javax.persistence.Column;
|
|
|
|
import javax.persistence.Entity;
|
|
|
|
import javax.persistence.FetchType;
|
|
|
|
import javax.persistence.GeneratedValue;
|
|
|
|
import javax.persistence.Id;
|
|
|
|
import javax.persistence.JoinColumn;
|
|
|
|
import javax.persistence.JoinTable;
|
|
|
|
import javax.persistence.OneToMany;
|
|
|
|
import javax.persistence.Table;
|
|
|
|
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
2017-10-20 17:11:40 +02:00
|
|
|
import org.hibernate.annotations.Proxy;
|
2017-09-14 12:37:36 +02:00
|
|
|
import org.hibernate.annotations.Type;
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
|
2017-10-20 17:11:40 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
2017-09-14 12:37:36 +02:00
|
|
|
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
|
2017-10-20 17:11:40 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
2017-09-14 12:37:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
@Entity
|
|
|
|
@Table(name="\"Organisation\"")
|
2017-10-24 18:33:51 +02:00
|
|
|
@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id")
|
2017-12-09 23:31:07 +01:00
|
|
|
public class Organisation implements Serializable,DataEntity {
|
2017-09-14 12:37:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 3614146195740867782L;
|
|
|
|
|
|
|
|
public Organisation () {}
|
|
|
|
|
|
|
|
|
|
|
|
@Id
|
|
|
|
@GeneratedValue
|
|
|
|
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
|
|
|
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
|
|
|
private UUID id;
|
|
|
|
|
|
|
|
@Column(name = "\"Label\"")
|
|
|
|
private String label;
|
|
|
|
|
|
|
|
@Column(name = "\"Abbreviation\"")
|
|
|
|
private String abbreviation;
|
|
|
|
|
|
|
|
@Type(type="typedefinition.XMLType")
|
|
|
|
@Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true)
|
|
|
|
private String reference;
|
|
|
|
|
|
|
|
@Column(name = "\"Uri\"")
|
|
|
|
private String uri;
|
|
|
|
|
|
|
|
@Type(type="typedefinition.XMLType")
|
|
|
|
@Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true)
|
|
|
|
private String definition;
|
|
|
|
|
|
|
|
|
2017-10-20 17:11:40 +02:00
|
|
|
@OneToMany(fetch = FetchType.LAZY)
|
2017-09-14 12:37:36 +02:00
|
|
|
@JoinTable(name="\"DMPOrganisation\"",
|
|
|
|
joinColumns={@JoinColumn(name="\"Organisation\"", referencedColumnName="\"ID\"")},
|
|
|
|
inverseJoinColumns={@JoinColumn(name="\"DMP\"", referencedColumnName="\"ID\"")}
|
|
|
|
)
|
|
|
|
private Set<DMP> dMPs;
|
|
|
|
|
|
|
|
|
2017-11-02 17:17:56 +01:00
|
|
|
|
|
|
|
@Column(name = "\"Status\"", nullable = false)
|
|
|
|
private Short status;
|
|
|
|
|
2017-11-07 13:20:13 +01:00
|
|
|
|
|
|
|
@Column(name = "\"Created\"")
|
2017-11-02 17:17:56 +01:00
|
|
|
private Date created = null;
|
|
|
|
|
2017-11-07 13:20:13 +01:00
|
|
|
@Column(name = "\"Modified\"")
|
|
|
|
private Date modified = new Date();
|
2017-11-02 17:17:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
public Short getStatus() {
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setStatus(Short status) {
|
|
|
|
this.status = status;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Date getCreated() {
|
|
|
|
return created;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setCreated(Date created) {
|
|
|
|
this.created = created;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Date getModified() {
|
|
|
|
return modified;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setModified(Date modified) {
|
|
|
|
this.modified = modified;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-09-14 12:37:36 +02:00
|
|
|
public UUID getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(UUID id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getLabel() {
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLabel(String label) {
|
|
|
|
this.label = label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getAbbreviation() {
|
|
|
|
return abbreviation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAbbreviation(String abbreviation) {
|
|
|
|
this.abbreviation = abbreviation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getReference() {
|
|
|
|
return reference;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setReference(String reference) {
|
|
|
|
this.reference = reference;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUri() {
|
|
|
|
return uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUri(String uri) {
|
|
|
|
this.uri = uri;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDefinition() {
|
|
|
|
return definition;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDefinition(String definition) {
|
|
|
|
this.definition = definition;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Set<DMP> getdMPs() {
|
|
|
|
return dMPs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setdMPs(Set<DMP> dMPs) {
|
|
|
|
this.dMPs = dMPs;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|