summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src
diff options
context:
space:
mode:
authoreyalholz <eyalh@amdocs.com>2017-07-27 20:37:54 +0300
committereyalholz <eyalh@amdocs.com>2017-07-27 21:12:22 +0300
commit49f38ff32c2323f5460e18ee300eff015bbd8772 (patch)
tree1b9926448f2b855868ca3e6fedea437eff68b79e /mso-catalog-db/src
parent2c5310ad100fab7a368bb7572b64a0231ff843d2 (diff)
fixed for defect SO-70 - recipe lookup mechanism doesn't allow to define default recipe mapping for any 'source' at level of 'service' and 'network' resources.
Change-Id: I42dafa343e2e65c6e892c21de5f3f1131890b24e Signed-off-by: eyalholz <eyalh@amdocs.com>
Diffstat (limited to 'mso-catalog-db/src')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index fcdaff7395..7ddaedcd30 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -514,6 +514,19 @@ public class CatalogDatabase implements Closeable {
return resultList.get (0);
}
+ /**
+ * @param serviceName
+ * @param action
+ * @return ServiceRecipe object or null if none found. returns a newest version of Service recipe that matches a given serviceName, action and for the newest service version
+ */
+ public ServiceRecipe getServiceRecipeByServiceNameAndAction(String serviceName, String action) {
+ Service service = getServiceByName(serviceName);
+ if (service != null ){
+ return getServiceRecipe(service.getId(),action);
+ }
+ return null;
+ }
+
public List<ServiceRecipe> getServiceRecipes (int serviceId) {
StringBuilder hql = null;