summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorMNUSHKIN, DMITRY <dmitry.mnushkin@att.com>2021-03-22 16:28:13 -0400
committerAT&T Open Source <g22940@att.com>2021-03-22 16:28:13 -0400
commit3355d9a073767625f31278fb352974910af32de1 (patch)
tree536d95f3719404378523a238fb6ba8241a5ceea3 /mso-catalog-db
parent7eb4f55f7cd81e25557e97e82049e6a3be137fd2 (diff)
corrected json prop names and included update ts
corrected json prop names and included update ts Issue-ID: SO-3603 Signed-off-by: AT&T Open Source <g22940@att.com> Change-Id: Ie00bdb617e54e00b450e556aab57b11e864a0969
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();