package entities; import java.io.Serializable; 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.OneToOne; import javax.persistence.Table; import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.Type; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; @Entity @Table(name="\"DMPProfile\"") @JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class, property="id") public class DMPProfile implements Serializable { private static final long serialVersionUID = 3213099144442689808L; public DMPProfile () {} @Id @GeneratedValue @GenericGenerator(name = "uuid2", strategy = "uuid2") @Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)") private UUID id; @OneToOne(fetch = FetchType.EAGER, mappedBy = "profile", cascade = CascadeType.ALL) private DMP dmp; @Column(name = "\"Label\"") private String label; @Type(type="typedefinition.XMLType") @Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true) private String definition; 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 getDefinition() { return definition; } public void setDefinition(String definition) { this.definition = definition; } public DMP getDmp() { return dmp; } public void setDmp(DMP dmp) { this.dmp = dmp; } }