aboutsummaryrefslogtreecommitdiffstats
path: root/appc-inbound/appc-artifact-handler/provider/src
diff options
context:
space:
mode:
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider/src')
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
index 308ecf476..24dd4f477 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/dbservices/DBService.java
@@ -372,26 +372,28 @@ public class DBService {
String key;
QueryStatus status;
if (isUpdate) {
- key = UPDATE_QUERY_STR + SdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION + " set USER_NAME = $"
- + SdcArtifactHandlerConstants.USER_NAME + " , PORT_NUMBER = $" + SdcArtifactHandlerConstants.PORT_NUMBER + "";
+ key = UPDATE_QUERY_STR + SdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION + " set USER_NAME = '"
+ + user + "' , PORT_NUMBER = " + port + "";
if (context.getAttributeKeySet().contains(SdcArtifactHandlerConstants.URL)) {
String url = context.getAttribute(SdcArtifactHandlerConstants.URL);
if (StringUtils.isBlank(url)) {
url = "" ;
}
- key = key + ", URL = $" + SdcArtifactHandlerConstants.URL + " ";
+ key = key + ", URL = '" + url + "' ";
}
key = key + WHERE_VNF_TYPE_QUERY_STR + SdcArtifactHandlerConstants.VNF_TYPE + " AND PROTOCOL = $"
+ SdcArtifactHandlerConstants.DEVICE_PROTOCOL + " AND ACTION = $"
+ SdcArtifactHandlerConstants.ACTION;
} else {
- key = "insert into DEVICE_AUTHENTICATION set VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE + " , PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL + " , " + "ACTION = $" + SdcArtifactHandlerConstants.ACTION + " , USER_NAME = $" + SdcArtifactHandlerConstants.USER_NAME + " , PORT_NUMBER = $" + SdcArtifactHandlerConstants.PORT_NUMBER + "";
+ key = "insert into DEVICE_AUTHENTICATION set VNF_TYPE = '" + vnftype + "' , PROTOCOL = '" + protocol
+ + "' , " + "ACTION = '" + action + "' , USER_NAME = '" + user + "' , PORT_NUMBER = '" + port
+ + "'";
if (context.getAttributeKeySet().contains(SdcArtifactHandlerConstants.URL)) {
String url = context.getAttribute(SdcArtifactHandlerConstants.URL);
if (StringUtils.isBlank(url)) {
url = "";
}
- key = key + ", URL = $" + SdcArtifactHandlerConstants.URL + " ";
+ key = key + ", URL = '" + url + "' ";
}
}