aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorMax Benjamin <max.benjamin@att.com>2021-03-26 14:01:21 +0000
committerGerrit Code Review <gerrit@onap.org>2021-03-26 14:01:21 +0000
commit5b5da69bad88682f442d588ae58b70c220da099a (patch)
treeb5a823e657dcbe5fd65f94fd53e14b8d815dc6fd /mso-catalog-db
parent1867b8dcad9341ea27f063c846111ee3e61678c3 (diff)
parent3355d9a073767625f31278fb352974910af32de1 (diff)
Merge "corrected json prop names and included update ts"
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java10
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java6
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();