diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2017-08-10 06:52:09 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-08-10 06:52:09 +0000 |
commit | 59a326947cb83a4ac1b7bef7793982b5ed653654 (patch) | |
tree | 3b6563439f5cf2d42f732b5e8841be7e7f0ffd9e /mso-catalog-db/src | |
parent | 7255957aa5015de4daae554730ed15158c28abe6 (diff) | |
parent | 49f38ff32c2323f5460e18ee300eff015bbd8772 (diff) |
Merge "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."
Diffstat (limited to 'mso-catalog-db/src')
-rw-r--r-- | mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java | 13 |
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; |