Commit c37bdf1e authored by ngadkari's avatar ngadkari

Changes in String compare condition

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@181791 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a4bfef76
......@@ -93,9 +93,9 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
try
{
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
......@@ -312,21 +312,22 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
}
else if(childNodeName.equalsIgnoreCase("site_code__ch"))
{
siteCodeCh = genericUtility.getColumnValue("site_code__ch", dom);
channelPart = genericUtility.getColumnValue("channel_partner", dom);
if(siteCodeCh == null || channelPart== "Y" && siteCodeCh.trim().length()== 0 )
siteCodeCh = checkNull(genericUtility.getColumnValue("site_code__ch", dom));
channelPart =checkNull(genericUtility.getColumnValue("channel_partner", dom));
//Changes by Nandkumar Gadkari on 09/03/2018 -----start-----------
if(siteCodeCh == null || "Y".equalsIgnoreCase(channelPart.trim()) && siteCodeCh.trim().length()== 0 )
{
errCode = "VMSITECD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else if(channelPart =="N" && siteCodeCh.trim().length() > 0 )
else if("N".equalsIgnoreCase(channelPart.trim()) && siteCodeCh.trim().length() > 0 )
{
errCode = "VNRSITE";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else if(channelPart=="Y" && siteCodeCh.trim().length() > 0 )
else if( "Y".equalsIgnoreCase(channelPart.trim()) && siteCodeCh.trim().length() > 0 )
{
sql = "select count(*) from site where site_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -347,7 +348,8 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
pstmt.close();
pstmt = null;
}
}
}
//Changes by Nandkumar Gadkari on 09/03/2018 -----end-----------
else if(childNodeName.equalsIgnoreCase("adhoc_repl_perc"))
{
/*Changed by Mayur Nair on 30-05-2017,to remove NULLPointerException [Start]
......@@ -542,9 +544,9 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
ConnDriver connDriver = new ConnDriver();
try
{
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
conn.setAutoCommit(false);
connDriver = null;
......@@ -665,7 +667,17 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
}
return valueXmlString.toString();
}
private String checkNull(String str)
{
if (str == null)
{
return "";
}
return str;
}
private String errorType(Connection conn , String errorCode)
{
String msgType = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment