summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java15
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/OrchestrationStatus.java6
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java24
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql4
4 files changed, 37 insertions, 12 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
index 278417c5c8..3be9e1f1e3 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
@@ -76,8 +76,9 @@ public class ConfigurationResourceCustomization implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @Column(name = "SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID")
- private String serviceProxyResourceCustomizationUUID;
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "SERVICE_PROXY_CUSTOMIZATION_MODEL_CUSTOMIZATION_UUID")
+ private ServiceProxyResourceCustomization serviceProxyResourceCustomization;
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "CONFIGURATION_CUSTOMIZATION_MODEL_CUSTOMIZATION_ID")
@@ -148,12 +149,14 @@ public class ConfigurationResourceCustomization implements Serializable {
return created;
}
- public String getServiceProxyResourceCustomizationUUID() {
- return serviceProxyResourceCustomizationUUID;
+ @LinkedResource
+ public ServiceProxyResourceCustomization getServiceProxyResourceCustomization() {
+ return serviceProxyResourceCustomization;
}
- public void setServiceProxyResourceCustomizationUUID(String serviceProxyResourceCustomizationUUID) {
- this.serviceProxyResourceCustomizationUUID = serviceProxyResourceCustomizationUUID;
+ public void setServiceProxyResourceCustomization(
+ ServiceProxyResourceCustomization serviceProxyResourceCustomization) {
+ this.serviceProxyResourceCustomization = serviceProxyResourceCustomization;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/OrchestrationStatus.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/OrchestrationStatus.java
index 56effb572f..93e2992d3f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/OrchestrationStatus.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/OrchestrationStatus.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@ public enum OrchestrationStatus {
/**
* case insensitive regular expression match to enum value
- *
+ *
* @param status
* @return
*/
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
index 3b57ae0f72..e591552ebf 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
@@ -136,6 +136,11 @@ public class Service implements Serializable {
@JoinColumn(name = "TOSCA_CSAR_ARTIFACT_UUID")
private ToscaCsar csar;
+ @Column(name = "NAMING_POLICY")
+ private String namingPolicy;
+
+ @Column(name = "ONAP_GENERATED_NAMING")
+ private Boolean onapGeneratedNaming;
@Override
public String toString() {
@@ -150,7 +155,7 @@ public class Service implements Serializable {
.append("serviceProxyCustomizations", serviceProxyCustomizations)
.append("configurationCustomizations", configurationCustomizations)
.append("pnfCustomizations", pnfCustomizations).append("recipes", recipes).append("csar", csar)
- .toString();
+ .append("namingPolicy", namingPolicy).append("onapGeneratedNaming", onapGeneratedNaming).toString();
}
@PrePersist
@@ -370,7 +375,6 @@ public class Service implements Serializable {
this.resourceOrder = resourceOrder;
}
-
public String getDistrobutionStatus() {
return distrobutionStatus;
}
@@ -379,4 +383,20 @@ public class Service implements Serializable {
this.distrobutionStatus = distrobutionStatus;
}
+ public String getNamingPolicy() {
+ return namingPolicy;
+ }
+
+ public void setNamingPolicy(String namingPolicy) {
+ this.namingPolicy = namingPolicy;
+ }
+
+ public Boolean getOnapGeneratedNaming() {
+ return onapGeneratedNaming;
+ }
+
+ public void setOnapGeneratedNaming(Boolean onapGeneratedNaming) {
+ this.onapGeneratedNaming = onapGeneratedNaming;
+ }
+
}
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 0856a4cbe2..7cd13a3780 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -803,7 +803,9 @@ CREATE TABLE `service` (
`WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
`SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
`RESOURCE_ORDER` varchar(200) default NULL,
- OVERALL_DISTRIBUTION_STATUS varchar(45),
+ `OVERALL_DISTRIBUTION_STATUS` varchar(45),
+ `ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
+ `NAMING_POLICY` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE