aboutsummaryrefslogtreecommitdiffstats
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/NetworkRecipe.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java1
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java1
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java6
5 files changed, 28 insertions, 2 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkRecipe.java
index 73056e2f8c..51bcd54ae1 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkRecipe.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkRecipe.java
@@ -59,6 +59,9 @@ public class NetworkRecipe implements Serializable, Recipe {
@Column(name = "RECIPE_TIMEOUT")
private Integer recipeTimeout;
+ @Column(name = "VERSION_STR")
+ private String versionStr;
+
@BusinessKey
@Column(name = "SERVICE_TYPE")
private String serviceType;
@@ -171,4 +174,12 @@ public class NetworkRecipe implements Serializable, Recipe {
sb.append(",networkParamXSD=" + paramXsd);
return sb.toString();
}
+
+ public String getVersionStr() {
+ return versionStr;
+ }
+
+ public void setVersionStr(String versionStr) {
+ this.versionStr = versionStr;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java
index aef2ac5e74..ab2eb622c1 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java
@@ -71,6 +71,9 @@ public class VnfRecipe implements Serializable, Recipe {
@Column(name = "RECIPE_TIMEOUT")
private Integer recipeTimeout;
+ @Column(name = "VERSION_STR")
+ private String versionStr;
+
@BusinessKey
@Column(name = "SERVICE_TYPE")
private String serviceType;
@@ -184,4 +187,12 @@ public class VnfRecipe implements Serializable, Recipe {
public Date getCreated() {
return created;
}
+
+ public String getVersionStr() {
+ return versionStr;
+ }
+
+ public void setVersionStr(String versionStr) {
+ this.versionStr = versionStr;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java
index 1241dac4ee..22f3ccbead 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ArRecipeRepository.java
@@ -28,4 +28,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
public interface ArRecipeRepository extends JpaRepository<ArRecipe, String> {
ArRecipe findByModelNameAndAction(String modelName, String action);
+ ArRecipe findByModelNameAndActionAndVersion(String modelName, String action, String version);
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java
index 10290b5877..c74fade8e3 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkRecipeRepository.java
@@ -27,4 +27,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "networkRecipe", path = "networkRecipe")
public interface NetworkRecipeRepository extends JpaRepository<NetworkRecipe, String> {
NetworkRecipe findFirstByModelNameAndAction(String modelName, String action);
+ NetworkRecipe findFirstByModelNameAndActionAndVersionStr(String modelName, String action, String versionStr);
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java
index dbc86cbb8f..b99e2bd4b6 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/VnfRecipeRepository.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.
@@ -29,4 +29,6 @@ public interface VnfRecipeRepository extends JpaRepository<VnfRecipe, String> {
VnfRecipe findVnfRecipeByServiceTypeAndAction(String serviceType, String action);
VnfRecipe findFirstVnfRecipeByNfRoleAndAction(String nfRole, String action);
+
+ VnfRecipe findFirstVnfRecipeByNfRoleAndActionAndVersionStr(String nfRole, String action, String versionStr);
} \ No newline at end of file