aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/java/org
diff options
context:
space:
mode:
authorMerkel, Jeff <jeff.merkel@att.com>2019-06-26 11:23:02 -0400
committerMax Benjamin <max.benjamin@att.com>2019-06-27 16:09:26 +0000
commit2d499f6efeaf9f2ee227199fda5e350882861a7b (patch)
tree2dd56f40f465455e6c6809cde134293ab24dd699 /mso-catalog-db/src/main/java/org
parent5c58eeca5ffd8b080b9af7619a903eb0acff3a0d (diff)
handle multiple cvnfc configs
- Handle multiple cvnfc configs with the same model uuid. - Update CvnfcConfigurationCustomization to a List from a Set Change-Id: I8c026510d813ebb6294a9cedd39d4d4b8f4b9dcf Issue-ID: SO-2056 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-catalog-db/src/main/java/org')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java7
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java3
2 files changed, 7 insertions, 3 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
index da3e391e11..7fb328fdb5 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
@@ -22,6 +22,7 @@ package org.onap.so.db.catalog.beans;
import java.io.Serializable;
import java.util.Date;
+import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
@@ -100,7 +101,7 @@ public class CvnfcCustomization implements Serializable {
private VnfcCustomization vnfcCustomization;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "cvnfcCustomization")
- private Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization;
+ private List<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization;
@Override
public boolean equals(final Object other) {
@@ -142,12 +143,12 @@ public class CvnfcCustomization implements Serializable {
}
@LinkedResource
- public Set<CvnfcConfigurationCustomization> getCvnfcConfigurationCustomization() {
+ public List<CvnfcConfigurationCustomization> getCvnfcConfigurationCustomization() {
return cvnfcConfigurationCustomization;
}
public void setCvnfcConfigurationCustomization(
- Set<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization) {
+ List<CvnfcConfigurationCustomization> cvnfcConfigurationCustomization) {
this.cvnfcConfigurationCustomization = cvnfcConfigurationCustomization;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java
index 1e5a07350d..d974e88890 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcConfigurationCustomizationRepository.java
@@ -20,6 +20,7 @@
package org.onap.so.db.catalog.data.repository;
+import java.util.List;
import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@@ -29,4 +30,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
public interface CvnfcConfigurationCustomizationRepository
extends JpaRepository<CvnfcConfigurationCustomization, Integer> {
+ List<CvnfcConfigurationCustomization> findByModelCustomizationUUID(String modelCustomizationUUID);
+
}