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 ...@@ -312,21 +312,22 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
} }
else if(childNodeName.equalsIgnoreCase("site_code__ch")) else if(childNodeName.equalsIgnoreCase("site_code__ch"))
{ {
siteCodeCh = genericUtility.getColumnValue("site_code__ch", dom); siteCodeCh = checkNull(genericUtility.getColumnValue("site_code__ch", dom));
channelPart = genericUtility.getColumnValue("channel_partner", dom); channelPart =checkNull(genericUtility.getColumnValue("channel_partner", dom));
if(siteCodeCh == null || channelPart== "Y" && siteCodeCh.trim().length()== 0 ) //Changes by Nandkumar Gadkari on 09/03/2018 -----start-----------
if(siteCodeCh == null || "Y".equalsIgnoreCase(channelPart.trim()) && siteCodeCh.trim().length()== 0 )
{ {
errCode = "VMSITECD1"; errCode = "VMSITECD1";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else if(channelPart =="N" && siteCodeCh.trim().length() > 0 ) else if("N".equalsIgnoreCase(channelPart.trim()) && siteCodeCh.trim().length() > 0 )
{ {
errCode = "VNRSITE"; errCode = "VNRSITE";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); 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 = ?"; sql = "select count(*) from site where site_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -348,6 +349,7 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site ...@@ -348,6 +349,7 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
pstmt = null; pstmt = null;
} }
} }
//Changes by Nandkumar Gadkari on 09/03/2018 -----end-----------
else if(childNodeName.equalsIgnoreCase("adhoc_repl_perc")) else if(childNodeName.equalsIgnoreCase("adhoc_repl_perc"))
{ {
/*Changed by Mayur Nair on 30-05-2017,to remove NULLPointerException [Start] /*Changed by Mayur Nair on 30-05-2017,to remove NULLPointerException [Start]
...@@ -666,6 +668,16 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site ...@@ -666,6 +668,16 @@ public class SiteCustomer extends ValidatorEJB implements SiteCustomerLocal,Site
return valueXmlString.toString(); return valueXmlString.toString();
} }
private String checkNull(String str)
{
if (str == null)
{
return "";
}
return str;
}
private String errorType(Connection conn , String errorCode) private String errorType(Connection conn , String errorCode)
{ {
String msgType = ""; 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