aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db/src')
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java7
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java6
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java26
3 files changed, 14 insertions, 25 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 c556ddadb5..cf8ef47554 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);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java
index b4c1f0594f..e22d1eb036 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java
@@ -37,10 +37,6 @@ public class ArRecipe extends Recipe implements Serializable {
@Override
public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append(super.toString());
- sb.append(",modelName=").append(modelName);
- sb.append(",arParamXSD=").append(getParamXSD());
- return sb.toString();
+ return super.toString() + ",modelName=" + modelName + ",arParamXSD=" + getParamXSD();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
index b211dbd4c3..cb5bf64b8c 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResourceCustomization.java
@@ -179,21 +179,17 @@ public class VnfResourceCustomization extends MavenLikeVersioning implements Ser
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("VnfResourceCustomization: ");
- sb.append("ModelCustUuid=").append(this.modelCustomizationUuid);
- sb.append(", ModelInstanceName=").append(this.modelInstanceName);
- sb.append(", vnfResourceModelUuid=").append(this.vnfResourceModelUUID);
- sb.append(", creationTimestamp=").append(this.created);
- sb.append(", minInstances=").append(this.minInstances);
- sb.append(", maxInstances=").append(this.maxInstances);
- sb.append(", availabilityZoneMaxCount=").append(this.availabilityZoneMaxCount);
-// sb.append(", vnfResource:\n" + this.vnfResource == null ? "null" : this.vnfResource.toString());
- sb.append(", nfFunction=").append(this.nfFunction);
- sb.append(", nfType=").append(this.nfType);
- sb.append(", nfRole=").append(this.nfRole);
- sb.append(", nfNamingCode=").append(this.nfNamingCode);
-
- return sb.toString();
+ return "VnfResourceCustomization: " + "ModelCustUuid=" + this.modelCustomizationUuid +
+ ", ModelInstanceName=" + this.modelInstanceName +
+ ", vnfResourceModelUuid=" + this.vnfResourceModelUUID +
+ ", creationTimestamp=" + this.created +
+ ", minInstances=" + this.minInstances +
+ ", maxInstances=" + this.maxInstances +
+ ", availabilityZoneMaxCount=" + this.availabilityZoneMaxCount +
+ ", nfFunction=" + this.nfFunction +
+ ", nfType=" + this.nfType +
+ ", nfRole=" + this.nfRole +
+ ", nfNamingCode=" + this.nfNamingCode;
}
}