Commit 5f9fb849 authored by cpatil's avatar cpatil

code for review


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99951 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b59879d6
...@@ -127,6 +127,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS ...@@ -127,6 +127,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS
for (int fld = 0; fld < filter.size(); fld++) for (int fld = 0; fld < filter.size(); fld++)
{ {
childNodeName = (String) filter.get(fld); childNodeName = (String) filter.get(fld);
System.out.println("@@@@@@@@@@ childNodeName["+childNodeName+"]");
if (childNodeName.equalsIgnoreCase("site_code")) if (childNodeName.equalsIgnoreCase("site_code"))
{ {
siteCode = this.genericUtility.getColumnValue("site_code", dom); siteCode = this.genericUtility.getColumnValue("site_code", dom);
...@@ -161,10 +162,6 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS ...@@ -161,10 +162,6 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
else else
{ {
...@@ -206,7 +203,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS ...@@ -206,7 +203,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS
System.out.println("@@@@@@@@@@@@ country["+country+"]countryCode["+countryCode+"]"); System.out.println("@@@@@@@@@@@@ country["+country+"]countryCode["+countryCode+"]");
if( ! country.equalsIgnoreCase(countryCode)) if( ! country.equalsIgnoreCase(countryCode))
{ {
errCode = "VTCONT1"; errCode = "VTCONTINV";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
...@@ -278,7 +275,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS ...@@ -278,7 +275,7 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS
{ {
errCode = errList.get(cnt); errCode = errList.get(cnt);
errFldName = errFields.get(cnt); errFldName = errFields.get(cnt);
System.out.println("errCode .........." + errCode); System.out.println("@@@@@@@@@@@@@@@ errCode cnt["+cnt+"]..........["+errCode+"]");
errString = getErrorString(errFldName, errCode, userId); errString = getErrorString(errFldName, errCode, userId);
errorType = errorType(conn, errCode); errorType = errorType(conn, errCode);
if (errString.length() > 0) if (errString.length() > 0)
...@@ -797,21 +794,26 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS ...@@ -797,21 +794,26 @@ public class PrdApplCountrySerIC extends ValidatorEJB implements PrdApplCountryS
ResultSet rs = null; ResultSet rs = null;
String sql = ""; String sql = "";
boolean status = false; boolean status = false;
int cnt=0;
try try
{ {
sql = "SELECT count(1) from " + tableName + " where " + columnName + " = ? "; sql = "SELECT count(1) from " + tableName + " where " + columnName + " = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, value); pstmt.setString(1, value);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
status = true; cnt = rs.getInt(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("@@@@@@@@@@ cnt["+cnt+"]");
if( cnt > 0 )
{
status = true;
}
} catch (Exception e) } catch (Exception e)
{ {
System.out.println("Exception in isExist "); System.out.println("Exception in isExist ");
......
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