Update some entities based on the Db configuration

This commit is contained in:
George Kalampokis 2022-03-02 17:51:17 +02:00
parent 608c4f3fc0
commit 75fc8a1d13
3 changed files with 13 additions and 13 deletions

View File

@ -26,14 +26,14 @@ public class DataRepository implements Serializable, DataEntity<DataRepository,
@Column(name = "\"Abbreviation\"")
private String abbreviation;
@Column(name = "\"Reference\"", nullable = false)
@Column(name = "\"Reference\"")
private String reference;
@Column(name = "\"Uri\"")
private String uri;
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
@Column(name = "\"Definition\"", columnDefinition = "xml", nullable = true)
@Column(name = "\"Definition\"", columnDefinition = "xml")
private String definition;
@OneToMany(mappedBy = "dataRepository", cascade = CascadeType.ALL, orphanRemoval = true)
@ -42,14 +42,14 @@ public class DataRepository implements Serializable, DataEntity<DataRepository,
@Column(name = "\"Status\"", nullable = false)
private Short status;
@Column(name = "\"Created\"")
@Column(name = "\"Created\"", nullable = false)
private Date created = null;
@Column(name = "\"Modified\"")
@Column(name = "\"Modified\"", nullable = false)
private Date modified = new Date();
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "\"CreationUser\"", nullable = true)
@JoinColumn(name = "\"CreationUser\"")
private UserInfo creationUser;

View File

@ -92,7 +92,7 @@ public class Dataset implements DataEntity<Dataset, UUID> {
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
private UUID id;
@Column(name = "\"Label\"")
@Column(name = "\"Label\"", nullable = false)
private String label;
@ManyToOne(fetch = FetchType.LAZY)
@ -104,16 +104,16 @@ public class Dataset implements DataEntity<Dataset, UUID> {
private String uri;
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
@Column(name = "\"Properties\"", columnDefinition = "xml", nullable = true)
@Column(name = "\"Properties\"", columnDefinition = "xml")
private String properties;
@ManyToOne(fetch = FetchType.LAZY)
//@Cascade(value=org.hibernate.annotations.CascadeType.ALL)
@JoinColumn(name = "\"Profile\"", nullable = true)
@JoinColumn(name = "\"Profile\"")
private DatasetProfile profile;
@Type(type = "eu.eudat.configurations.typedefinition.XMLType")
@Column(name = "\"Reference\"", columnDefinition = "xml", nullable = true)
@Column(name = "\"Reference\"", columnDefinition = "xml")
private String reference;
@OneToMany(fetch = FetchType.LAZY)
@ -136,16 +136,16 @@ public class Dataset implements DataEntity<Dataset, UUID> {
private Short status;
@Column(name = "\"Created\"")
@Column(name = "\"Created\"", nullable = false)
@Convert(converter = DateToUTCConverter.class)
private Date created = null;
@Column(name = "\"Modified\"")
@Column(name = "\"Modified\"", nullable = false)
@Convert(converter = DateToUTCConverter.class)
private Date modified = new Date();
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "\"Creator\"", nullable = true)
@JoinColumn(name = "\"Creator\"")
private UserInfo creator;
@Column(name = "\"Description\"")

View File

@ -49,7 +49,7 @@ public class DatasetProfile implements DataEntity<DatasetProfile,UUID>{
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
private UUID id;
@Column(name = "\"Label\"")
@Column(name = "\"Label\"", nullable = false)
private String label;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "profile")