diff options
author | 2018-03-08 07:39:08 +0000 | |
---|---|---|
committer | 2018-03-08 07:39:08 +0000 | |
commit | a88ba9fbc4033449dc9675b27dcf08305e8a66a1 (patch) | |
tree | 59e562035f4d33086605e08ffdc8340d2bf3d8c7 /mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java | |
parent | 0079db1779ad6f30660e3df85c0b4c0a32bb757e (diff) | |
parent | 36edf1a3688ab064918a8be2edff758130795205 (diff) |
Merge "Swap StringBuilder with string where makes sense"
Diffstat (limited to 'mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java')
-rw-r--r-- | mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java | 7 |
1 files changed, 2 insertions, 5 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 97e1443000..6b27c50609 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 @@ -1175,14 +1175,11 @@ public class CatalogDatabase implements Closeable { * @return VnfRecipe object or null if none found */ public VnfRecipe getVnfRecipeByNameVersion(String modelName, String modelVersion, String action) { - StringBuilder hql = new StringBuilder("FROM VnfRecipe WHERE vnfType = :vnfType AND version= :version AND action = :action "); long startTime = System.currentTimeMillis(); - LOGGER.debug("Catalog database - get VNF recipe with name " + modelName - + " and action " - + action); + LOGGER.debug("Catalog database - get VNF recipe with name " + modelName + " and action " + action); - Query query = getSession().createQuery(hql.toString()); + Query query = getSession().createQuery("FROM VnfRecipe WHERE vnfType = :vnfType AND version= :version AND action = :action "); query.setParameter(VNF_TYPE, modelName); query.setParameter(MODEL_VERSION, modelVersion); query.setParameter(ACTION, action); |