diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-08 17:51:38 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-02-08 17:53:02 -0500 |
commit | 95ed531f5e9c6680319d75efe47f4feea69e0167 (patch) | |
tree | 1554740fbbf7694386d7769fac87d2372bdd1335 /mso-catalog-db/src/main/java/org | |
parent | b3bc8b2a2cde4a72fae4d8f702b9fc87f6f138f1 (diff) |
fix cvnfc bean and repository access
update repository id field type for
fix cvnfc bean and repository access
Change-Id: Ic4785387ffdbb544e649d9e7be40aed5e0ab9502
Issue-ID: SO-1489
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-catalog-db/src/main/java/org')
3 files changed, 5 insertions, 2 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 c02b1e3030..b1ad0de5ca 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 @@ -107,7 +107,7 @@ public class CvnfcCustomization implements Serializable { @JoinColumn(name = "VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID") private VnfResourceCustomization vnfResourceCustomization; - @OneToMany(cascade = CascadeType.ALL, mappedBy = "modelCustomizationUUID") + @OneToMany(cascade = CascadeType.ALL, mappedBy = "cvnfcCustomization") private Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomization; @Override diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java index 8ef797f8fa..f5e9b5f560 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomization.java @@ -44,6 +44,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import com.fasterxml.jackson.annotation.JsonFormat; import com.openpojo.business.annotation.BusinessKey; +import uk.co.blackpepper.bowman.annotation.LinkedResource; + @Entity @Table(name = "vnf_vfmodule_cvnfc_configuration_customization") public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable { @@ -202,6 +204,7 @@ public class VnfVfmoduleCvnfcConfigurationCustomization implements Serializable this.created = created; } + @LinkedResource public ConfigurationResource getConfigurationResource() { return configurationResource; } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java index a4281aea6c..059d0da498 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepository.java @@ -29,7 +29,7 @@ import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(collectionResourceRel = "cvnfcCustomization", path = "cvnfcCustomization") -public interface CvnfcCustomizationRepository extends JpaRepository<CvnfcCustomization, String> { +public interface CvnfcCustomizationRepository extends JpaRepository<CvnfcCustomization, Integer> { CvnfcCustomization findOneByModelCustomizationUUID(String modelCustomizationUuid); List<CvnfcCustomization> findByModelCustomizationUUID(String modelCustomizationUUID); |