aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java31
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java16
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java17
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java8
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java10
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java24
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java7
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java22
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java11
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java118
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java20
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java13
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java6
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java26
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java12
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java9
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java23
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java26
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java13
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java9
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java8
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java11
22 files changed, 167 insertions, 273 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java
index ba9a7d5007..3dd4cbfc9c 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/CloudIdentity.java
@@ -227,29 +227,18 @@ public class CloudIdentity {
public void setIdentityAuthenticationType(IdentityAuthenticationType identityAuthenticationType) {
this.identityAuthenticationType = identityAuthenticationType;
}
-
+
@Override
public String toString () {
- StringBuilder stringBuilder = new StringBuilder ();
- stringBuilder.append ("Cloud Identity Service: id=")
- .append (id)
- .append (", identityUrl=")
- .append (this.identityUrl)
- .append (", msoId=")
- .append (msoId)
- .append (", adminTenant=")
- .append (adminTenant)
- .append (", memberRole=")
- .append (memberRole)
- .append (", tenantMetadata=")
- .append (tenantMetadata)
- .append (", identityServerType=")
- .append (identityServerType == null ? "null" : identityServerType.toString())
- .append (", identityAuthenticationType=")
- .append (identityAuthenticationType == null ? "null" : identityAuthenticationType.toString());
-
- return stringBuilder.toString ();
- }
+ return "Cloud Identity Service: id=" + id +
+ ", identityUrl=" + this.identityUrl +
+ ", msoId=" + msoId +
+ ", adminTenant=" + adminTenant +
+ ", memberRole=" + memberRole +
+ ", tenantMetadata=" + tenantMetadata +
+ ", identityServerType=" + (identityServerType == null ? "null" : identityServerType.toString()) +
+ ", identityAuthenticationType=" + (identityAuthenticationType == null ? "null" : identityAuthenticationType.toString());
+ }
public static String encryptPassword (String msoPass) {
try {
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
index 2cda8f99e2..64460b20bb 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/NetworkInfo.java
@@ -139,15 +139,13 @@ public class NetworkInfo {
@Override
public String toString() {
- final StringBuilder sb = new StringBuilder("NetworkInfo{");
- sb.append("name='").append(name).append('\'');
- sb.append(", id='").append(id).append('\'');
- sb.append(", status=").append(status);
- sb.append(", provider='").append(provider).append('\'');
- sb.append(", vlans=").append(vlans);
- sb.append(", subnets=").append(subnets);
- sb.append('}');
- return sb.toString();
+ return "NetworkInfo{" + "name='" + name + '\'' +
+ ", id='" + id + '\'' +
+ ", status=" + status +
+ ", provider='" + provider + '\'' +
+ ", vlans=" + vlans +
+ ", subnets=" + subnets +
+ '}';
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java
index 8aa8d3f5e8..eead8439d4 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/exceptions/MsoOpenstackException.java
@@ -68,16 +68,13 @@ public class MsoOpenstackException extends MsoException
this.statusMessage = message;
this.errorDetail = detail;
}
-
+
@Override
- public String toString () {
- StringBuilder error = new StringBuilder();
- error.append("");
- error.append(statusCode);
- error.append(" ");
- error.append(statusMessage);
- error.append(": ");
- error.append(errorDetail);
- return error.toString();
+ public String toString() {
+ return statusCode +
+ " " +
+ statusMessage +
+ ": " +
+ errorDetail;
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java
index 69da437797..04dbf523d0 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentEntry.java
@@ -65,11 +65,9 @@ public class MsoHeatEnvironmentEntry {
@Override
public String toString() {
- final StringBuilder sb = new StringBuilder("MsoHeatEnvironmentEntry{");
- sb.append("parameters=").append(parameters);
- sb.append(", resourceRegistryEntryRaw='").append(resourceRegistryEntryRaw).append('\'');
- sb.append('}');
- return sb.toString();
+ return "MsoHeatEnvironmentEntry{" + "parameters=" + parameters +
+ ", resourceRegistryEntryRaw='" + resourceRegistryEntryRaw + '\'' +
+ '}';
}
public String getRawEntry() {
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java
index a2e605f897..a0c9b7a105 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatEnvironmentResource.java
@@ -59,12 +59,10 @@ public class MsoHeatEnvironmentResource {
@Override
public String toString() {
- StringBuilder str = new StringBuilder();
- str.append("\"");
- str.append(this.name);
- str.append("\": ");
- str.append(this.value);
- return str.toString();
+ return "\"" +
+ this.name +
+ "\": " +
+ this.value;
}
@Override
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index 95e62a0e2d..9131309ab5 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -1442,19 +1442,17 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String serviceName = VNF_ADAPTER_SERVICE_NAME + methodName;
MsoLogger.setServiceName (serviceName);
- StringBuilder sbInit = new StringBuilder();
- sbInit.append("updateVfModule: \n");
- sbInit.append("cloudSiteId=").append(cloudSiteId).append("\n");
- sbInit.append("tenantId=").append(tenantId).append("\n");
- sbInit.append("vnfType=").append(vnfType).append("\n");
- sbInit.append("vnfVersion=").append(vnfVersion).append("\n");
- sbInit.append("vnfName=").append(vnfName).append("\n");
- sbInit.append("requestType=").append(requestType).append("\n");
- sbInit.append("volumeGroupHeatStackId=").append(volumeGroupHeatStackId).append("\n");
- sbInit.append("baseVfHeatStackId=").append(baseVfHeatStackId).append("\n");
- sbInit.append("vfModuleStackId=").append(vfModuleStackId).append("\n");
- sbInit.append("modelCustomizationUuid=").append(modelCustomizationUuid).append("\n");
- LOGGER.debug(sbInit.toString());
+ String strInit = "updateVfModule: cloudSiteId=" + cloudSiteId +
+ ",tenantId=" + tenantId +
+ ",vnfType=" + vnfType +
+ ",vnfVersion=" + vnfVersion +
+ ",vnfName=" + vnfName +
+ ",requestType=" + requestType +
+ ",volumeGroupHeatStackId=" + volumeGroupHeatStackId +
+ ",baseVfHeatStackId=" + baseVfHeatStackId +
+ ",vfModuleStackId=" + vfModuleStackId +
+ ",modelCustomizationUuid=" + modelCustomizationUuid;
+ LOGGER.debug(strInit);
String mcu = modelCustomizationUuid;
boolean useMCUuid = false;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
index 8a9cb955b0..eabd465934 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/MsoRequest.java
@@ -105,11 +105,8 @@ public class MsoRequest {
@Override
public String toString() {
- StringBuilder request = new StringBuilder();
- request.append("<requestId>").append(requestId).append("</requestId>");
- request.append('\n');
- request.append("<serviceInstanceId>").append(serviceInstanceId).append("</serviceInstanceId>");
- return request.toString();
+ return "<requestId>" + requestId + "</requestId>" + '\n' + "<serviceInstanceId>" + serviceInstanceId
+ + "</serviceInstanceId>";
}
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
index 21653e26c3..b555563936 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/WorkflowException.java
@@ -31,7 +31,7 @@ public class WorkflowException implements Serializable {
private final String processKey;
private final int errorCode;
private final String errorMessage;
-
+
/**
* Constructor
* @param processKey the process key for the process that generated the exception
@@ -44,42 +44,34 @@ public class WorkflowException implements Serializable {
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
-
+
/**
* Returns the process key.
*/
public String getProcessKey() {
return processKey;
}
-
+
/**
* Returns the error code.
*/
public int getErrorCode() {
return errorCode;
}
-
+
/**
* Returns the error message.
*/
public String getErrorMessage() {
return errorMessage;
}
-
+
/**
* Returns a string representation of this object.
*/
@Override
public String toString() {
- StringBuilder out = new StringBuilder();
- out.append(getClass().getSimpleName());
- out.append("[processKey=");
- out.append(getProcessKey());
- out.append(",errorCode=");
- out.append(getErrorCode());
- out.append(",errorMessage=");
- out.append(getErrorMessage());
- out.append("]");
- return out.toString();
+ return getClass().getSimpleName() + "[processKey=" + getProcessKey() + ",errorCode=" + getErrorCode()
+ + ",errorMessage=" + getErrorMessage() + "]";
}
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
index c81e96dccb..58377fcc8f 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
@@ -146,15 +146,12 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
/**
* This method returns String representation of one combined list of Resources of All Types
- * @return
*/
@JsonIgnore
- public String getServiceResourcesJsonString(){
- StringBuilder serviceResourcesJsonStringBuffer = new StringBuilder();
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceNetworks())));
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceVnfs())));
- serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceAllottedResources())));
- return serviceResourcesJsonStringBuffer.toString();
+ public String getServiceResourcesJsonString() {
+ return listToJson((this.getServiceNetworks())) +
+ listToJson((this.getServiceVnfs())) +
+ listToJson((this.getServiceAllottedResources()));
}
/**
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 f59c09a418..a4b57f13c1 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
@@ -1137,14 +1137,13 @@ public class CatalogDatabase implements Closeable {
* @return VnfRecipe object or null if none found
*/
public VnfRecipe getVnfRecipe(String vnfType, String action) {
- StringBuilder hql = new StringBuilder("FROM VnfRecipe WHERE vnfType = :vnfType AND action = :action ");
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - get VNF recipe with name " + vnfType
+ " and action "
+ action);
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM VnfRecipe WHERE vnfType = :vnfType AND action = :action ");
query.setParameter(VNF_TYPE, vnfType);
query.setParameter(ACTION, action);
@@ -1172,12 +1171,10 @@ public class CatalogDatabase implements Closeable {
*/
public VnfRecipe getVnfRecipeByVfModuleId(String vnfType, String vfModuleId, String action) {
- StringBuilder hql = new StringBuilder("FROM VnfRecipe WHERE vfModuleId = :vfModuleId and action = :action ");
-
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - get VNF Recipe with vfModuleId " + vfModuleId);
- Query query = getSession().createQuery(hql.toString ());
+ Query query = getSession().createQuery("FROM VnfRecipe WHERE vfModuleId = :vfModuleId and action = :action ");
query.setParameter(VF_MODULE_MODEL_UUID, vfModuleId);
query.setParameter(ACTION, action);
@@ -1893,17 +1890,17 @@ public class CatalogDatabase implements Closeable {
} else {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceByModelUuid", null);
}
- return vnfResource;
+ return vnfResource;
}
-
+
public VnfResCustomToVfModuleCustom getVnfResCustomToVfModule(String vnfId, String vfId) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - getVnfResCustomToVfModule - vnfResourceCustModelCustUuid: " + vnfId + ", vfModuleCustModelCustomUuid=" + vfId);
- StringBuilder hql = new StringBuilder("FROM VnfResCustomToVfModuleCustom where vnfResourceCustModelCustomizationUuid = :vnfIdValue and vfModuleCustModelCustomizationUuid = :vfIdValue");
- HashMap<String, String> parameters = new HashMap<>();
+ HashMap<String, String> parameters = new HashMap<>();
parameters.put("vnfIdValue", vnfId);
parameters.put("vfIdValue", vfId);
- VnfResCustomToVfModuleCustom vrctvmc = this.executeQuerySingleRow(hql.toString(), parameters, true);
+ VnfResCustomToVfModuleCustom vrctvmc = this.executeQuerySingleRow(
+ "FROM VnfResCustomToVfModuleCustom where vnfResourceCustModelCustomizationUuid = :vnfIdValue and vfModuleCustModelCustomizationUuid = :vfIdValue", parameters, true);
if (vrctvmc == null) {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "NotFound", "CatalogDB", "getVnfResCustomToVfModule", null);
} else {
@@ -1926,8 +1923,7 @@ public class CatalogDatabase implements Closeable {
public List<VfModule> getVfModulesForVnfResource(String vnfResourceModelUuid) {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database - getVfModulesForVnfResource - vnfResourceModelUuid: " + vnfResourceModelUuid);
- StringBuilder hql = new StringBuilder("FROM VfModule where vnfResourceModelUUId = :vnfResourceModelUUId");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM VfModule where vnfResourceModelUUId = :vnfResourceModelUUId");
query.setParameter("vnfResourceModelUUId", vnfResourceModelUuid);
List<VfModule> resultList = null;
try {
@@ -2175,8 +2171,7 @@ public class CatalogDatabase implements Closeable {
public List<NetworkResourceCustomization> getAllNetworksByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
LOGGER.debug("Catalog database: getServiceNetworksByServiceModelInvariantUuid - " + serviceModelInvariantUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -2199,8 +2194,8 @@ public class CatalogDatabase implements Closeable {
public List<NetworkResourceCustomization> getAllNetworksByServiceModelInvariantUuid(String serviceModelInvariantUuid, String serviceModelVersion) {
LOGGER.debug("Catalog database: getServiceNetworksByServiceModelInvariantUuid - " + serviceModelInvariantUuid + ", version=" + serviceModelVersion);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
@@ -2228,18 +2223,18 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllNetworksByNetworkModelCustomizationUuid - " + networkModelCustomizationUuid);
- StringBuilder hql = new StringBuilder("FROM NetworkResourceCustomization WHERE modelCustomizationUuid = :networkModelCustomizationUuid");
- //Query query = getSession().createQuery(hql.toString());
+ //Query query = getSession().createQuery(hql.toString());
//query.setParameter("networkModelCustomizationUuid", networkModelCustomizationUuid);
//LOGGER.debug("QUERY: " + hql.toString() + ", networkModelCustomizationUuid=" + networkModelCustomizationUuid);
-
+
//@SuppressWarnings("unchecked")
//List<NetworkResourceCustomization> resultList = query.list();
-
+
HashMap<String, String> params = new HashMap<>();
params.put("networkModelCustomizationUuid", networkModelCustomizationUuid);
- List<NetworkResourceCustomization> resultList = this.executeQueryMultipleRows(hql.toString(), params, true);
+ List<NetworkResourceCustomization> resultList = this.executeQueryMultipleRows(
+ "FROM NetworkResourceCustomization WHERE modelCustomizationUuid = :networkModelCustomizationUuid", params, true);
if (resultList.isEmpty()) {
LOGGER.debug("Unable to find an NMC with nmcu=" + networkModelCustomizationUuid);
@@ -2248,7 +2243,6 @@ public class CatalogDatabase implements Closeable {
for (NetworkResourceCustomization nrc : resultList) {
nrc.setNetworkResource(this.getNetworkResourceById(nrc.getNetworkResourceModelUuid()));
}
-
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllNetworksByNetworkModelCustomizationUuid", null);
return resultList;
@@ -2265,9 +2259,9 @@ public class CatalogDatabase implements Closeable {
String networkResourceId = nr.getModelUUID();
LOGGER.debug("Now searching for NRC's with networkResourceId = " + networkResourceId);
- StringBuilder hql = new StringBuilder("FROM NetworkResourceCustomization WHERE networkResourceModelUuid = :networkResourceId");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM NetworkResourceCustomization WHERE networkResourceModelUuid = :networkResourceId");
query.setParameter("networkResourceId", networkResourceId);
@SuppressWarnings("unchecked")
@@ -2286,7 +2280,7 @@ public class CatalogDatabase implements Closeable {
}
public ArrayList<VfModuleCustomization> getAllVfmcForVrc(VnfResourceCustomization vrc) {
LOGGER.debug("Catalog database: getAllVfmcForVrc - " + vrc.getModelCustomizationUuid());
-
+
List<VnfResCustomToVfModuleCustom> vfmcs = this.getVRCtoVFMC(vrc.getModelCustomizationUuid(), null);
if (vfmcs == null || vfmcs.isEmpty()) {
return new ArrayList<>();
@@ -2306,8 +2300,7 @@ public class CatalogDatabase implements Closeable {
public List<VnfResourceCustomization> getAllVnfsByServiceModelUuid(String serviceModelUuid) {
LOGGER.debug("Catalog database: getAllVnfsByServiceModelUuid - " + serviceModelUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelUUID = :serviceModelUuid");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelUUID = :serviceModelUuid");
query.setParameter("serviceModelUuid", serviceModelUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -2328,7 +2321,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Unable to find any related vnfs to a service with modelUuid=" + serviceModelUuid);
return new ArrayList<>();
}
-
+
ArrayList<VnfResourceCustomization> allVrcs = new ArrayList<>();
for (ServiceToResourceCustomization strc : strcs) {
LOGGER.debug("Try to find VRC for mcu=" + strc.getResourceModelCustomizationUUID());
@@ -2337,13 +2330,12 @@ public class CatalogDatabase implements Closeable {
allVrcs.add(vrc);
}
return allVrcs;
-
+
}
public List<VnfResourceCustomization> getAllVnfsByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
LOGGER.debug("Catalog database: getAllVnfsByServiceModelInvariantUuid - " + serviceModelInvariantUuid);
- StringBuilder hqlService = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
- Query query = getSession().createQuery(hqlService.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
@SuppressWarnings("unchecked")
List<Service> resultList = query.list();
@@ -2361,8 +2353,8 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByServiceModelInvariantUuid - " + serviceModelInvariantUuid + ", version=" + serviceModelVersion);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
@@ -2385,8 +2377,8 @@ public class CatalogDatabase implements Closeable {
return this.getAllVnfsByServiceName(serviceName);
}
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelName = :serviceName and version = :serviceVersion");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM Service WHERE modelName = :serviceName and version = :serviceVersion");
query.setParameter("serviceName", serviceName);
query.setParameter("serviceVersion", serviceVersion);
@@ -2402,8 +2394,7 @@ public class CatalogDatabase implements Closeable {
public List<VnfResourceCustomization> getAllVnfsByServiceName(String serviceName) {
LOGGER.debug("Catalog database: getAllVnfsByServiceName - " + serviceName);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelName = :serviceName");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelName = :serviceName");
query.setParameter("serviceName", serviceName);
@SuppressWarnings("unchecked")
@@ -2423,8 +2414,7 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllVnfsByVnfModelCustomizationUuid - " + vnfModelCustomizationUuid);
- StringBuilder hql1 = new StringBuilder("FROM VnfResourceCustomization WHERE modelCustomizationUuid = :vrcmcu");
- Query query1 = getSession().createQuery(hql1.toString());
+ Query query1 = getSession().createQuery("FROM VnfResourceCustomization WHERE modelCustomizationUuid = :vrcmcu");
query1.setParameter("vrcmcu", vnfModelCustomizationUuid);
@SuppressWarnings("unchecked")
List<VnfResourceCustomization> resultList1 = query1.list();
@@ -2433,12 +2423,12 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Found no records matching " + vnfModelCustomizationUuid);
return Collections.EMPTY_LIST;
}
-
- for (VnfResourceCustomization vrc : resultList1) {
- VnfResource vr = this.getVnfResourceByModelUuid(vrc.getVnfResourceModelUuid());
- vrc.setVnfResource(vr);
- vrc.setVfModuleCustomizations(this.getAllVfmcForVrc(vrc));
- }
+
+ for (VnfResourceCustomization vrc : resultList1) {
+ VnfResource vr = this.getVnfResourceByModelUuid(vrc.getVnfResourceModelUuid());
+ vrc.setVnfResource(vr);
+ vrc.setVfModuleCustomizations(this.getAllVfmcForVrc(vrc));
+ }
LOGGER.debug("Returning " + resultList1.size() + " vnf modules");
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfsByVnfModelCustomizationUuid", null);
@@ -2473,8 +2463,7 @@ public class CatalogDatabase implements Closeable {
public List<AllottedResourceCustomization> getAllAllottedResourcesByServiceModelInvariantUuid(String serviceModelInvariantUuid) {
LOGGER.debug("Catalog database: getAllAllottedResourcesByServiceModelInvariantUuid - " + serviceModelInvariantUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -2497,8 +2486,8 @@ public class CatalogDatabase implements Closeable {
public List<AllottedResourceCustomization> getAllAllottedResourcesByServiceModelInvariantUuid(String serviceModelInvariantUuid, String serviceModelVersion) {
LOGGER.debug("Catalog database: getAllAllottedResourcesByServiceModelInvariantUuid - " + serviceModelInvariantUuid + ", version=" + serviceModelVersion);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
@@ -2523,8 +2512,8 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllAllottedResourcesByArModelCustomizationUuid - " + arModelCustomizationUuid);
- StringBuilder hql = new StringBuilder("FROM AllottedResourceCustomization WHERE modelCustomizationUuid = :arModelCustomizationUuid");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM AllottedResourceCustomization WHERE modelCustomizationUuid = :arModelCustomizationUuid");
query.setParameter("arModelCustomizationUuid", arModelCustomizationUuid);
@SuppressWarnings("unchecked")
@@ -2601,8 +2590,7 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllResourcesByServiceModelInvariantUuid - " + serviceModelInvariantUuid);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
@SuppressWarnings("unchecked")
List<Service> serviceList = query.list();
@@ -2632,8 +2620,8 @@ public class CatalogDatabase implements Closeable {
long startTime = System.currentTimeMillis();
LOGGER.debug("Catalog database: getAllResourcesByServiceModelInvariantUuid - " + serviceModelInvariantUuid + ", version=" + serviceModelVersion);
- StringBuilder hql = new StringBuilder("FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
- Query query = getSession().createQuery(hql.toString());
+ Query query = getSession().createQuery(
+ "FROM Service WHERE modelInvariantUUID = :serviceModelInvariantUuid and version = :serviceModelVersion");
query.setParameter("serviceModelInvariantUuid", serviceModelInvariantUuid);
query.setParameter("serviceModelVersion", serviceModelVersion);
//TODO make this a unique query
@@ -2731,12 +2719,10 @@ public class CatalogDatabase implements Closeable {
public VnfRecipe getVfModuleRecipe (String vnfType, String vfModuleModelName, String action) {
String vfModuleType = vnfType + "::" + vfModuleModelName;
- StringBuilder hql = new StringBuilder ("FROM VfModule WHERE type = :type ");
-
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - get VF MODULE with type " + vfModuleType);
- Query query = getSession ().createQuery (hql.toString ());
+ Query query = getSession ().createQuery ("FROM VfModule WHERE type = :type ");
query.setParameter (TYPE, vfModuleType);
@SuppressWarnings("unchecked")
@@ -2754,13 +2740,11 @@ public class CatalogDatabase implements Closeable {
String vfModuleId = vfMod.getModelUUID();
- StringBuilder hql1 = new StringBuilder ("FROM VnfRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
-
LOGGER.debug ("Catalog database - get VNF recipe with vf module id " + vfModuleId
+ " and action "
+ action);
- Query query1 = getSession ().createQuery (hql1.toString ());
+ Query query1 = getSession ().createQuery ("FROM VnfRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
@@ -2846,13 +2830,12 @@ public class CatalogDatabase implements Closeable {
String vfModuleId = vfMod.getModelUUID();
- StringBuilder hql1 = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
-
LOGGER.debug ("Catalog database - get Vnf Components recipe with vf module id " + vfModuleId
+ " and action "
+ action);
- Query query1 = getSession ().createQuery (hql1.toString ());
+ Query query1 = getSession ().createQuery (
+ "FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
@@ -2899,15 +2882,14 @@ public class CatalogDatabase implements Closeable {
VfModule vfMod = resultList.get(0);
- String vfModuleId = vfMod.getModelName();
-
- StringBuilder hql1 = new StringBuilder ("FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
+ String vfModuleId = vfMod.getModelName();
LOGGER.debug ("Catalog database - get Vnf Components recipe with vf module id " + vfModuleId
+ " and action "
+ action);
- Query query1 = getSession ().createQuery (hql1.toString ());
+ Query query1 = getSession ().createQuery (
+ "FROM VnfComponentsRecipe WHERE vfModuleId = :vfModuleId AND action = :action ");
query1.setParameter (VF_MODULE_MODEL_UUID, vfModuleId);
query1.setParameter (ACTION, action);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
index daeefcce02..6fdf236a27 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
@@ -130,20 +130,12 @@ public class AllottedResourceCustomization extends MavenLikeVersioning implement
}
@Override
- public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append("modelCustomizationUuid=");
- sb.append(this.modelCustomizationUuid);
- sb.append(",modelInstanceName=");
- sb.append(this.modelInstanceName);
- sb.append(",modelInstanceName=");
- sb.append(this.modelInstanceName);
- sb.append(",created=");
- sb.append(this.created);
- sb.append(",ar=");
- sb.append(this.ar);
-
- return sb.toString();
+ public String toString() {
+ return "modelCustomizationUuid=" + this.modelCustomizationUuid +
+ ",modelInstanceName=" + this.modelInstanceName +
+ ",modelInstanceName=" + this.modelInstanceName +
+ ",created=" + this.created +
+ ",ar=" + this.ar;
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
index 54acf12ca8..f6202b7365 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/HeatTemplateArtifactUuidModelUuid.java
@@ -44,15 +44,12 @@ public class HeatTemplateArtifactUuidModelUuid implements Serializable {
public void setModelUuid(String modelUuid) {
this.modelUuid = modelUuid;
}
-
+
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("heatTemplateArtifactUuid=").append(this.heatTemplateArtifactUuid);
- sb.append(" modelUuid=").append(this.modelUuid);
- return sb.toString();
+ return "heatTemplateArtifactUuid=" + this.heatTemplateArtifactUuid + " modelUuid=" + this.modelUuid;
}
-
+
@Override
public boolean equals (Object o) {
if (!(o instanceof HeatTemplateArtifactUuidModelUuid)) {
@@ -73,9 +70,7 @@ public class HeatTemplateArtifactUuidModelUuid implements Serializable {
public int hashCode () {
// hash code does not have to be a unique result - only that two objects that should be treated as equal
// return the same value. so this should work.
- int result;
- result = this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();
- return result;
+ return this.heatTemplateArtifactUuid.hashCode() + this.modelUuid.hashCode();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
index 4e905b62c8..eeaa363aa6 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
@@ -37,10 +37,6 @@ public class NetworkRecipe extends Recipe implements Serializable {
@Override
public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append(super.toString());
- sb.append(",modelName=").append(modelName);
- sb.append(",networkParamXSD=").append(getParamXSD());
- return sb.toString();
+ return super.toString() + ",modelName=" + modelName + ",networkParamXSD=" + getParamXSD();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
index ef09fef41f..b581545182 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkResourceCustomization.java
@@ -103,24 +103,14 @@ public class NetworkResourceCustomization implements Serializable{
}
@Override
- public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append("modelCustomizationUuid=");
- sb.append(this.modelCustomizationUuid);
- sb.append("networkResourceModelUuid=");
- sb.append(this.networkResourceModelUuid);
- sb.append("modelInstanceName=");
- sb.append(this.modelInstanceName);
- sb.append("networkType=");
- sb.append(this.networkType);
- sb.append("networkTechnology=");
- sb.append(this.networkTechnology);
- sb.append("networkScope=");
- sb.append(this.networkScope);
- sb.append("networkRole=");
- sb.append(this.networkRole);
-
- return sb.toString();
+ public String toString() {
+ return "modelCustomizationUuid=" + this.modelCustomizationUuid +
+ "networkResourceModelUuid=" + this.networkResourceModelUuid +
+ "modelInstanceName=" + this.modelInstanceName +
+ "networkType=" + this.networkType +
+ "networkTechnology=" + this.networkTechnology +
+ "networkScope=" + this.networkScope +
+ "networkRole=" + this.networkRole;
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
index 59495f40c6..6515a12bc0 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToAllottedResources.java
@@ -71,22 +71,16 @@ public class ServiceToAllottedResources implements Serializable {
@Override
public int hashCode() {
-
+
int code = this.arModelCustomizationUuid == null ? 0 : this.arModelCustomizationUuid.hashCode();
code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
return code;
}
-
+
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("serviceModelUuid=");
- sb.append(this.serviceModelUuid);
- sb.append("arModelCustomizationUuid=");
- sb.append(this.arModelCustomizationUuid);
-
- return sb.toString();
+ return "serviceModelUuid=" + this.serviceModelUuid + "arModelCustomizationUuid=" + this.arModelCustomizationUuid;
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
index a380a58c6b..69dc32796f 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ServiceToNetworks.java
@@ -80,14 +80,11 @@ public class ServiceToNetworks implements Serializable {
return code;
}
-
+
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("ServiceToNetworks mapping: ");
- sb.append("serviceModelUuid=").append(this.serviceModelUuid);
- sb.append(",networkModelCustomizationUuid=").append(networkModelCustomizationUuid);
- return sb.toString();
+ return "ServiceToNetworks mapping: " + "serviceModelUuid=" + this.serviceModelUuid
+ + ",networkModelCustomizationUuid=" + networkModelCustomizationUuid;
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
index 783fc2df30..3ef7e6e237 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/TempNetworkHeatTemplateLookup.java
@@ -23,7 +23,7 @@ package org.openecomp.mso.db.catalog.beans;
import java.io.Serializable;
public class TempNetworkHeatTemplateLookup implements Serializable {
-
+
private String networkResourceModelName;
private String heatTemplateArtifactUuid;
private String aicVersionMin;
@@ -33,14 +33,14 @@ public class TempNetworkHeatTemplateLookup implements Serializable {
public TempNetworkHeatTemplateLookup() {
super();
}
-
+
public String getNetworkResourceModelName() {
return this.networkResourceModelName;
}
public void setNetworkResourceModelName(String networkResourceModelName) {
this.networkResourceModelName = networkResourceModelName;
}
-
+
public String getHeatTemplateArtifactUuid() {
return this.heatTemplateArtifactUuid;
}
@@ -50,29 +50,26 @@ public class TempNetworkHeatTemplateLookup implements Serializable {
public String getAicVersionMin() {
return this.aicVersionMin;
}
-
+
public void setAicVersionMin(String aicVersionMin) {
this.aicVersionMin = aicVersionMin;
}
-
+
public String getAicVersionMax() {
return this.aicVersionMax;
}
-
+
public void setAicVersionMax(String aicVersionMax) {
this.aicVersionMax = aicVersionMax;
}
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("NetworkResourceModelName=").append(this.networkResourceModelName);
- sb.append("HeatTemplateArtifactUuid=").append(this.heatTemplateArtifactUuid);
- sb.append("aicVersionMin=").append(this.aicVersionMin);
- sb.append("aicVersionMax=").append(this.aicVersionMax);
- return sb.toString();
+ return "NetworkResourceModelName=" + this.networkResourceModelName + "HeatTemplateArtifactUuid=" +
+ this.heatTemplateArtifactUuid + "aicVersionMin=" + this.aicVersionMin + "aicVersionMax=" + this.aicVersionMax;
}
- @Override
+
+ @Override
public boolean equals (Object o) {
if (!(o instanceof TempNetworkHeatTemplateLookup)) {
return false;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java
index 9f2dae5035..db3a2664a8 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleCustomization.java
@@ -109,22 +109,22 @@ public class VfModuleCustomization implements Serializable {
public void setVfModule(VfModule vfModule) {
this.vfModule = vfModule;
}
+
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("modelCustomizationUuid=").append(this.modelCustomizationUuid);
- sb.append("vfModuleModelUuid=").append(this.vfModuleModelUuid);
- sb.append("label=").append(this.label);
- sb.append("initalCount=").append(this.initialCount);
- sb.append("minInstances=").append(this.minInstances);
- sb.append("maxInstances=").append(this.maxInstances);
- sb.append("availabilityZoneCount=").append(this.availabilityZoneCount);
- sb.append("heatEnvironmentArtifactUuid=").append(this.heatEnvironmentArtifactUuid);
- sb.append("volEnvironmentArtifactUuid=").append(this.volEnvironmentArtifactUuid);
- sb.append("created=").append(this.created);
- return sb.toString();
+ return "modelCustomizationUuid=" + this.modelCustomizationUuid +
+ "vfModuleModelUuid=" + this.vfModuleModelUuid +
+ "label=" + this.label +
+ "initalCount=" + this.initialCount +
+ "minInstances=" + this.minInstances +
+ "maxInstances=" + this.maxInstances +
+ "availabilityZoneCount=" + this.availabilityZoneCount +
+ "heatEnvironmentArtifactUuid=" + this.heatEnvironmentArtifactUuid +
+ "volEnvironmentArtifactUuid=" + this.volEnvironmentArtifactUuid +
+ "created=" + this.created;
}
- @Override
+
+ @Override
public boolean equals (Object o) {
if (!(o instanceof VfModuleCustomization)) {
return false;
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
index 476283e6b0..611604e830 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModuleToHeatFiles.java
@@ -46,13 +46,10 @@ public class VfModuleToHeatFiles implements Serializable {
public void setHeatFilesArtifactUuid(String heatFilesArtifactUuid) {
this.heatFilesArtifactUuid = heatFilesArtifactUuid;
}
-
- @Override
- public String toString () {
- StringBuilder sb = new StringBuilder ();
- sb.append("vfModuleModelUuid=").append(this.vfModuleModelUuid);
- sb.append(", heatFilesArtifactUuid=").append(this.heatFilesArtifactUuid);
- return sb.toString ();
- }
+
+ @Override
+ public String toString() {
+ return "vfModuleModelUuid=" + this.vfModuleModelUuid + ", heatFilesArtifactUuid=" + this.heatFilesArtifactUuid;
+ }
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
index 6eac5a23ea..30a5133bd5 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
@@ -56,12 +56,7 @@ public class VnfComponentsRecipe extends Recipe implements Serializable {
@Override
public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append(super.toString());
- sb.append(",vnfComponentParamXSD=").append(getParamXSD());
- sb.append(",serviceType=").append(getServiceType());
- sb.append(",vnfComponentType=").append(getVnfComponentType());
- sb.append(",vfModuleId=").append(getVfModuleModelUUId());
- return sb.toString();
+ return super.toString() + ",vnfComponentParamXSD=" + getParamXSD() + ",serviceType=" + getServiceType() +
+ ",vnfComponentType=" + getVnfComponentType() + ",vfModuleId=" + getVfModuleModelUUId();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
index 46017c2205..0dd38cbbc1 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
@@ -48,11 +48,7 @@ public class VnfRecipe extends Recipe implements Serializable {
@Override
public String toString () {
- StringBuilder sb = new StringBuilder();
- sb.append(super.toString());
- sb.append(",vnfParamXSD=").append(getParamXSD());
- sb.append(",serviceType=").append(getServiceType());
- sb.append(",vfModuleId=").append(getVfModuleId());
- return sb.toString();
+ return super.toString() + ",vnfParamXSD=" + getParamXSD() + ",serviceType=" + getServiceType() + ",vfModuleId=" +
+ getVfModuleId();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java
index 7b2364d194..fd1e6b67b8 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResCustomToVfModuleCustom.java
@@ -53,15 +53,14 @@ public class VnfResCustomToVfModuleCustom implements Serializable {
public void setCreated(Timestamp created) {
this.created = created;
}
+
@Override
public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append("vnfResourceCustModelCustomizationUuid=").append(this.vnfResourceCustModelCustomizationUuid);
- sb.append("vfModuleCustModelCustomizationUuid=").append(this.vfModuleCustModelCustomizationUuid);
- sb.append("created=").append(this.created);
- return sb.toString();
+ return "vnfResourceCustModelCustomizationUuid=" + this.vnfResourceCustModelCustomizationUuid +
+ "vfModuleCustModelCustomizationUuid=" + this.vfModuleCustModelCustomizationUuid + "created=" + this.created;
}
- @Override
+
+ @Override
public boolean equals (Object o) {
if (!(o instanceof VnfResCustomToVfModuleCustom)) {
return false;