Commit 2201bcfe authored by pshinde's avatar pshinde

Change in State Master


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96570 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9de9dda1
...@@ -127,41 +127,43 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote ...@@ -127,41 +127,43 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
stateCode = genericUtility.getColumnValue("state_code", dom); if(keyFlag.equalsIgnoreCase("M"))
if(stateCode==null ||stateCode.trim().length()==0)
{ {
errCode = "VESTATCD1"; stateCode = genericUtility.getColumnValue("state_code", dom);
errList.add(errCode); if(stateCode==null ||stateCode.trim().length()==0)
errFields.add(childNodeName.toLowerCase());
break;
}
else
{
if(editFlag.equals("A"))
{ {
sql="select count(*) from state where state_code = ?"; errCode = "VESTATCD1";
pstmt=conn.prepareStatement(sql); errList.add(errCode);
pstmt.setString(1, stateCode); errFields.add(childNodeName.toLowerCase());
rs=pstmt.executeQuery(); break;
if(rs.next()) }
{
stateCnt=rs.getInt(1); else
{
} if(editFlag.equals("A"))
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(stateCnt>0)
{ {
errCode = "VMDUPL1"; sql="select count(*) from state where state_code = ?";
errList.add(errCode); pstmt=conn.prepareStatement(sql);
errFields.add(childNodeName.toLowerCase()); pstmt.setString(1, stateCode);
break; rs=pstmt.executeQuery();
if(rs.next())
{
stateCnt=rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(stateCnt>0)
{
errCode = "VMDUPL1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
break;
}
} }
} }
}
} }
...@@ -265,6 +267,7 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote ...@@ -265,6 +267,7 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
pstmt = null; pstmt = null;
} }
}
} }
break; break;
......
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