summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db/src/main/java/org')
-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;