argos/dmp-backend/data/src/main/java/eu/eudat/data/entities/Researcher.java

158 lines
3.2 KiB
Java
Raw Normal View History

2018-03-21 11:57:56 +01:00
package eu.eudat.data.entities;
2018-03-21 11:16:32 +01:00
import eu.eudat.queryable.queryableentity.DataEntity;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
2018-02-16 11:34:02 +01:00
import javax.persistence.*;
import java.util.Date;
import java.util.Set;
import java.util.UUID;
@Entity
2018-02-16 11:34:02 +01:00
@Table(name = "\"Researcher\"")
2018-02-20 08:50:17 +01:00
public class Researcher implements DataEntity<Researcher,UUID> {
2018-02-16 11:34:02 +01:00
@Id
@GeneratedValue
@GenericGenerator(name = "uuid2", strategy = "uuid2")
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
2018-02-16 11:34:02 +01:00
private UUID id;
@Column(name = "\"Label\"")
private String label;
@Column(name = "\"Uri\"")
private String uri;
@Column(name = "\"PrimaryEmail\"")
private String primaryEmail;
2018-06-27 12:29:21 +02:00
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
2018-02-16 11:34:02 +01:00
@Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true)
private String definition;
2018-06-27 12:29:21 +02:00
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
2018-02-16 11:34:02 +01:00
@Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true)
private String reference;
@OneToMany(fetch = FetchType.LAZY)
@JoinTable(name = "\"DMPResearcher\"",
joinColumns = {@JoinColumn(name = "\"Researcher\"", referencedColumnName = "\"ID\"")},
inverseJoinColumns = {@JoinColumn(name = "\"DMP\"", referencedColumnName = "\"ID\"")}
)
private Set<DMP> dMPs;
2018-02-16 11:34:02 +01:00
@Column(name = "\"Status\"", nullable = false)
private Short status;
@Column(name = "\"Created\"")
private Date created = null;
@Column(name = "\"Modified\"")
private Date modified = new Date();
public Short getStatus() {
return status;
}
public void setStatus(Short status) {
this.status = status;
}
2018-02-16 11:34:02 +01:00
public Date getCreated() {
return created;
}
2018-02-16 11:34:02 +01:00
public void setCreated(Date created) {
this.created = created;
}
2018-02-16 11:34:02 +01:00
public Date getModified() {
return modified;
}
2018-02-16 11:34:02 +01:00
public void setModified(Date modified) {
this.modified = modified;
}
2018-02-16 11:34:02 +01:00
public UUID getId() {
return id;
}
2018-02-16 11:34:02 +01:00
public void setId(UUID id) {
this.id = id;
}
2018-02-16 11:34:02 +01:00
public String getLabel() {
return label;
}
2018-02-16 11:34:02 +01:00
public void setLabel(String label) {
this.label = label;
}
2018-02-16 11:34:02 +01:00
public String getPrimaryEmail() {
return primaryEmail;
}
2018-02-16 11:34:02 +01:00
public void setPrimaryEmail(String primaryEmail) {
this.primaryEmail = primaryEmail;
}
2018-02-16 11:34:02 +01:00
public String getReference() {
return reference;
}
2018-02-16 11:34:02 +01:00
public void setReference(String reference) {
this.reference = reference;
}
2018-02-16 11:34:02 +01:00
public String getUri() {
return uri;
}
2018-02-16 11:34:02 +01:00
public void setUri(String uri) {
this.uri = uri;
}
2018-02-16 11:34:02 +01:00
public String getDefinition() {
return definition;
}
2018-02-16 11:34:02 +01:00
public void setDefinition(String definition) {
this.definition = definition;
}
2018-02-16 11:34:02 +01:00
public Set<DMP> getdMPs() {
return dMPs;
}
2018-02-16 11:34:02 +01:00
public void setdMPs(Set<DMP> dMPs) {
this.dMPs = dMPs;
}
2018-02-16 11:34:02 +01:00
@Override
public void update(Researcher entity) {
2018-02-16 11:34:02 +01:00
}
2018-02-16 11:34:02 +01:00
@Override
2018-02-20 08:50:17 +01:00
public UUID getKeys() {
return this.id;
2018-02-16 11:34:02 +01:00
}
}