aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/main/java
diff options
context:
space:
mode:
authorMariah Jacobs <mariah.jacobs@intel.com>2018-06-12 09:39:54 -0700
committerMarcus G K Williams <marcus.williams@intel.com>2018-07-06 16:16:48 -0700
commitf5618da7e8d8398d5f85fe950fd5c88e84481f83 (patch)
treef8988f6a63d8ece2f8e5af9a4ee43a52053378f3 /mso-catalog-db/src/main/java
parent68e1a2736a8af537c2b2fcaf70fce0c20c16b019 (diff)
Use already-defined constant MODEL_VERSION
Replace literal 'version' with already-defined constant MODEL_VERSION. Issue-ID: SO-666 Change-Id: I74d1c74d62b8beaceb1cb43e67ce3764c31ee9f0 Signed-off-by: Mariah Jacobs <mariah.jacobs@intel.com>
Diffstat (limited to 'mso-catalog-db/src/main/java')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java18
1 files changed, 9 insertions, 9 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 1ef1313158..af0ea101f4 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
@@ -234,8 +234,8 @@ public class CatalogDatabase implements Closeable {
String hql = "FROM HeatTemplate WHERE templateName = :template_name AND version = :version";
Query query = getSession().createQuery(hql);
- query.setParameter(TEMPLATE_NAME,templateName);
- query.setParameter("version", version);
+ query.setParameter(TEMPLATE_NAME, templateName);
+ query.setParameter(MODEL_VERSION, version);
@SuppressWarnings("unchecked")
List <HeatTemplate> resultList = query.list();
@@ -1345,7 +1345,7 @@ public class CatalogDatabase implements Closeable {
String hql = "FROM VfModule WHERE type = :type and version = :version";
Query query = getSession().createQuery(hql);
query.setParameter ("type", type);
- query.setParameter ("version", version);
+ query.setParameter (MODEL_VERSION, version);
VfModule module = null;
try {
module = (VfModule) query.uniqueResult ();
@@ -2870,7 +2870,7 @@ public class CatalogDatabase implements Closeable {
query = getSession ().createQuery (hql.toString ());
query.setParameter ("modelCustomizationUuid", modelCustomizationUuid);
- query.setParameter ("version", asdcServiceModelVersion);
+ query.setParameter (MODEL_VERSION, asdcServiceModelVersion);
}else{
hql = new StringBuilder ("FROM VfModule WHERE type = :type AND version = :version AND modelVersion = :modelVersion");
@@ -2878,7 +2878,7 @@ public class CatalogDatabase implements Closeable {
query = getSession ().createQuery (hql.toString ());
query.setParameter (TYPE, vfModuleType);
- query.setParameter ("version", asdcServiceModelVersion);
+ query.setParameter (MODEL_VERSION, asdcServiceModelVersion);
query.setParameter ("modelVersion", modelVersion);
}
@@ -3494,7 +3494,7 @@ public class CatalogDatabase implements Closeable {
String hql = "FROM HeatTemplate WHERE templateName = :template_name AND version = :version AND asdcResourceName = :asdcResourceName";
Query query = getSession ().createQuery (hql);
query.setParameter (TEMPLATE_NAME, templateName);
- query.setParameter ("version", version);
+ query.setParameter (MODEL_VERSION, version);
query.setParameter ("asdcResourceName", asdcResourceName);
@SuppressWarnings("unchecked")
@@ -3606,7 +3606,7 @@ public class CatalogDatabase implements Closeable {
String hql = "FROM HeatEnvironment WHERE name=:name AND version=:version AND asdcResourceName=:asdcResourceName";
Query query = getSession ().createQuery (hql);
query.setParameter ("name", name);
- query.setParameter ("version", version);
+ query.setParameter (MODEL_VERSION, version);
query.setParameter ("asdcResourceName", asdcResourceName);
HeatEnvironment env = null;
try {
@@ -3648,7 +3648,7 @@ public class CatalogDatabase implements Closeable {
String hql = "FROM HeatEnvironment WHERE artifactUuid=:artifactUuid AND version=:version";
Query query = getSession ().createQuery (hql);
query.setParameter ("artifactUuid", artifactUuid);
- query.setParameter ("version", version);
+ query.setParameter (MODEL_VERSION, version);
HeatEnvironment env = null;
try {
env = (HeatEnvironment) query.uniqueResult ();
@@ -4286,7 +4286,7 @@ public class CatalogDatabase implements Closeable {
query.setParameter ("fileName", fileName);
query.setParameter ("vnfResourceId", vnfResourceId);
query.setParameter ("asdcResourceName", asdcResourceName);
- query.setParameter ("version", version);
+ query.setParameter (MODEL_VERSION, version);
@SuppressWarnings("unchecked")