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
......@@ -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);
......@@ -348,6 +349,7 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
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]
......@@ -666,6 +668,16 @@ 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