diff options
Diffstat (limited to 'mso-catalog-db')
-rw-r--r-- | mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java | 10 | ||||
-rw-r--r-- | mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java index c3617b62c7..36d3c98413 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java @@ -27,6 +27,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.Id; import javax.persistence.PrePersist; +import javax.persistence.PreUpdate; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @@ -74,7 +75,7 @@ public class CloudIdentity { @Column(name = "PROJECT_DOMAIN_NAME") private String projectDomainName; - @JsonProperty("admin_project_domain_name ") + @JsonProperty("admin_project_domain_name") @BusinessKey @Column(name = "ADMIN_PROJECT_DOMAIN_NAME", nullable = false) private String adminProjectDomainName = "Default"; @@ -94,7 +95,7 @@ public class CloudIdentity { @Column(name = "MEMBER_ROLE") private String memberRole; - @JsonProperty("tenant_metadata") + @JsonProperty("tenant_meta_data") @BusinessKey @Column(name = "TENANT_METADATA") private Boolean tenantMetadata; @@ -136,6 +137,11 @@ public class CloudIdentity { this.updated = new Date(); } + @PreUpdate + protected void onUpdate() { + this.updated = new Date(); + } + public String getId() { return id; } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java index 64c4b62b11..f7cb9fe3c4 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java @@ -31,6 +31,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.PrePersist; +import javax.persistence.PreUpdate; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @@ -143,6 +144,11 @@ public class CloudSite { this.updated = new Date(); } + @PreUpdate + protected void onUpdate() { + this.updated = new Date(); + } + public CloudSite(CloudSite site) { this.cloudVersion = site.getCloudVersion(); this.clli = site.getClli(); |