Update some entities based on the Db configuration
This commit is contained in:
parent
608c4f3fc0
commit
75fc8a1d13
|
@ -26,14 +26,14 @@ public class DataRepository implements Serializable, DataEntity<DataRepository,
|
||||||
@Column(name = "\"Abbreviation\"")
|
@Column(name = "\"Abbreviation\"")
|
||||||
private String abbreviation;
|
private String abbreviation;
|
||||||
|
|
||||||
@Column(name = "\"Reference\"", nullable = false)
|
@Column(name = "\"Reference\"")
|
||||||
private String reference;
|
private String reference;
|
||||||
|
|
||||||
@Column(name = "\"Uri\"")
|
@Column(name = "\"Uri\"")
|
||||||
private String uri;
|
private String uri;
|
||||||
|
|
||||||
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
||||||
@Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true)
|
@Column(name = "\"Definition\"", columnDefinition = "xml")
|
||||||
private String definition;
|
private String definition;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "dataRepository", cascade = CascadeType.ALL, orphanRemoval = true)
|
@OneToMany(mappedBy = "dataRepository", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||||
|
@ -42,14 +42,14 @@ public class DataRepository implements Serializable, DataEntity<DataRepository,
|
||||||
@Column(name = "\"Status\"", nullable = false)
|
@Column(name = "\"Status\"", nullable = false)
|
||||||
private Short status;
|
private Short status;
|
||||||
|
|
||||||
@Column(name = "\"Created\"")
|
@Column(name = "\"Created\"", nullable = false)
|
||||||
private Date created = null;
|
private Date created = null;
|
||||||
|
|
||||||
@Column(name = "\"Modified\"")
|
@Column(name = "\"Modified\"", nullable = false)
|
||||||
private Date modified = new Date();
|
private Date modified = new Date();
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "\"CreationUser\"", nullable = true)
|
@JoinColumn(name = "\"CreationUser\"")
|
||||||
private UserInfo creationUser;
|
private UserInfo creationUser;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class Dataset implements DataEntity<Dataset, UUID> {
|
||||||
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
||||||
private UUID id;
|
private UUID id;
|
||||||
|
|
||||||
@Column(name = "\"Label\"")
|
@Column(name = "\"Label\"", nullable = false)
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@ -104,16 +104,16 @@ public class Dataset implements DataEntity<Dataset, UUID> {
|
||||||
private String uri;
|
private String uri;
|
||||||
|
|
||||||
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
||||||
@Column(name = "\"Properties\"", columnDefinition = "xml", nullable = true)
|
@Column(name = "\"Properties\"", columnDefinition = "xml")
|
||||||
private String properties;
|
private String properties;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
//@Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
//@Cascade(value=org.hibernate.annotations.CascadeType.ALL)
|
||||||
@JoinColumn(name = "\"Profile\"", nullable = true)
|
@JoinColumn(name = "\"Profile\"")
|
||||||
private DatasetProfile profile;
|
private DatasetProfile profile;
|
||||||
|
|
||||||
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
|
||||||
@Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true)
|
@Column(name = "\"Reference\"", columnDefinition = "xml")
|
||||||
private String reference;
|
private String reference;
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.LAZY)
|
@OneToMany(fetch = FetchType.LAZY)
|
||||||
|
@ -136,16 +136,16 @@ public class Dataset implements DataEntity<Dataset, UUID> {
|
||||||
private Short status;
|
private Short status;
|
||||||
|
|
||||||
|
|
||||||
@Column(name = "\"Created\"")
|
@Column(name = "\"Created\"", nullable = false)
|
||||||
@Convert(converter = DateToUTCConverter.class)
|
@Convert(converter = DateToUTCConverter.class)
|
||||||
private Date created = null;
|
private Date created = null;
|
||||||
|
|
||||||
@Column(name = "\"Modified\"")
|
@Column(name = "\"Modified\"", nullable = false)
|
||||||
@Convert(converter = DateToUTCConverter.class)
|
@Convert(converter = DateToUTCConverter.class)
|
||||||
private Date modified = new Date();
|
private Date modified = new Date();
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(name = "\"Creator\"", nullable = true)
|
@JoinColumn(name = "\"Creator\"")
|
||||||
private UserInfo creator;
|
private UserInfo creator;
|
||||||
|
|
||||||
@Column(name = "\"Description\"")
|
@Column(name = "\"Description\"")
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
|
||||||
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
||||||
private UUID id;
|
private UUID id;
|
||||||
|
|
||||||
@Column(name = "\"Label\"")
|
@Column(name = "\"Label\"", nullable = false)
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
@OneToMany(fetch = FetchType.LAZY, mappedBy = "profile")
|
@OneToMany(fetch = FetchType.LAZY, mappedBy = "profile")
|
||||||
|
|
Loading…
Reference in New Issue