From c3894b6acd5feb6bc0d6a99a48700e98b76bed3a Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Fri, 19 Jan 2018 09:10:52 +0000 Subject: Improve UT for catalog db Improve UT for catalog db. Change-Id: I4beee70d0e78fca0d792480477d1010d5faa086d Issue-ID: SO-360 Signed-off-by: subhash kumar singh --- .../java/org/openecomp/mso/db/catalog/CatalogDatabase.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mso-catalog-db/src/main/java') 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 0048a34d6c..0a5bdc51f3 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 @@ -1026,21 +1026,21 @@ public class CatalogDatabase implements Closeable { *@author cb645j * */ - public VfModuleCustomization getVfModuleCustomizationByModelName (String modelName) { + public VfModuleCustomization getVfModuleCustomizationByModelName(String modelName) { - long startTime = System.currentTimeMillis (); - LOGGER.debug ("Catalog database - get VfModuleCustomization By VfModule's ModelName: " + modelName); + long startTime = System.currentTimeMillis(); + LOGGER.debug("Catalog database - get VfModuleCustomization By VfModule's ModelName: " + modelName); String hql = "SELECT VfModuleCustomization FROM VfModuleCustomization as vfmc LEFT OUTER JOIN VfModule as vfm on vfm.modelUUID = vfmc.vfModuleModelUuid where vfm.modelName = :model_name"; - Query query = getSession ().createQuery (hql); - query.setParameter ("model_name", modelName); + Query query = getSession().createQuery(hql); + query.setParameter("model_name", modelName); @SuppressWarnings("unchecked") List resultList = query.list(); // See if something came back. Name is unique, so - if (resultList.isEmpty ()) { - LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful query but Vf module NOT found", "CatalogDB", "getVfModuleCustomizationByModelName", null); + if (resultList.isEmpty()) { + LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful query but Vf module NOT found", "CatalogDB", "getVfModuleCustomizationByModelName", null); return null; } -- cgit 1.2.3-korg