Renames DMP and Dataset columns.

This commit is contained in:
gkolokythas 2019-06-24 17:01:24 +03:00
parent 742dd5015f
commit b8977669c6
4 changed files with 28 additions and 21 deletions

View File

@ -156,16 +156,16 @@ public class DMP implements DataEntity<DMP, UUID> {
@Column(name = "\"Description\"")
private String description;
@Column(name= "\"FinalizedDat\"")
@Column(name= "\"FinalizedAt\"")
@Convert(converter = DateToUTCConverter.class)
private Date finalizedDat;
private Date finalizedAt;
@Column(name = "\"isPublic\"", nullable = false)
private boolean isPublic;
@Column(name= "\"PublishedDat\"")
@Column(name= "\"PublishedAt\"")
@Convert(converter = DateToUTCConverter.class)
private Date publishedDat;
private Date publishedAt;
public String getDescription() {
@ -294,11 +294,11 @@ public class DMP implements DataEntity<DMP, UUID> {
this.dmpProperties = dmpProperties;
}
public Date getFinalizedDat() {
return finalizedDat;
public Date getFinalizedAt() {
return finalizedAt;
}
public void setFinalizedDat(Date finalizedDat) {
this.finalizedDat = finalizedDat;
public void setFinalizedAt(Date finalizedAt) {
this.finalizedAt = finalizedAt;
}
public boolean isPublic() {
@ -308,11 +308,11 @@ public class DMP implements DataEntity<DMP, UUID> {
isPublic = aPublic;
}
public Date getPublishedDat() {
return publishedDat;
public Date getPublishedAt() {
return publishedAt;
}
public void setPublishedDat(Date publishedDat) {
this.publishedDat = publishedDat;
public void setPublishedAt(Date publishedAt) {
this.publishedAt = publishedAt;
}
@Override
@ -330,8 +330,8 @@ public class DMP implements DataEntity<DMP, UUID> {
this.dmpProperties = entity.getDmpProperties();
this.isPublic = entity.isPublic;
this.setModified(new Date());
if (entity.getStatus().equals(DMPStatus.FINALISED.getValue())) this.setFinalizedDat(new Date());
if (entity.isPublic) this.setPublishedDat(new Date());
if (entity.getStatus().equals(DMPStatus.FINALISED.getValue())) this.setFinalizedAt(new Date());
if (entity.isPublic) this.setPublishedAt(new Date());
if (entity.getUsers() != null) this.users = entity.getUsers();
}

View File

@ -140,9 +140,9 @@ public class Dataset implements DataEntity<Dataset, UUID> {
@Column(name = "\"Description\"")
private String description;
@Column(name= "\"FinalizedDat\"")
@Column(name= "\"FinalizedAt\"")
@Convert(converter = DateToUTCConverter.class)
private Date finalizedDat;
private Date finalizedAt;
public String getDescription() {
@ -267,11 +267,11 @@ public class Dataset implements DataEntity<Dataset, UUID> {
this.datasetExternalDatasets = datasetExternalDatasets;
}
public Date getFinalizedDat() {
return finalizedDat;
public Date getFinalizedAt() {
return finalizedAt;
}
public void setFinalizedDat(Date finalizedDat) {
this.finalizedDat = finalizedDat;
public void setFinalizedAt(Date finalizedAt) {
this.finalizedAt = finalizedAt;
}
@Override
@ -300,7 +300,7 @@ public class Dataset implements DataEntity<Dataset, UUID> {
this.setStatus(entity.getStatus());
this.setProfile(entity.getProfile());
this.setModified(new Date());
if (entity.getStatus().equals(Status.FINALISED.getValue())) this.setFinalizedDat(new Date());
if (entity.getStatus().equals(Status.FINALISED.getValue())) this.setFinalizedAt(new Date());
if (entity.getCreator() != null) this.creator = entity.getCreator();
}

View File

@ -0,0 +1,5 @@
ALTER TABLE public."DMP"
RENAME COLUMN "FinalizedDat" TO "FinalizedAt";
ALTER TABLE public."DMP"
RENAME COLUMN "PublishedDat" TO "PublishedAt";

View File

@ -0,0 +1,2 @@
ALTER TABLE public."Dataset"
RENAME COLUMN "FinalizedDat" TO "FinalizedAt";