Commit 3e4e6ab3 authored by sghate's avatar sghate

Shital: updated component on 30/10/2019

QualificationIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210725 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 96a61d0b
......@@ -9,8 +9,8 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
//import com.sybase.ejb.RemoteException;
import java.rmi.RemoteException;
import com.sybase.ejb.RemoteException;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
......@@ -73,14 +73,11 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
int currentFormNo = 0;
int counter;
Connection conn = null;
String qlfCode = "";
String qlfCode = null;
int cnt = 0;
String descr = "";
String shDescr = "";
String eqival = "";
int eqivalInt = 0;
String type = "";
String shDescr1 = "";
String descr = null;
String shDescr = null;
String eqival = null;
ITMDBAccessEJB itmDbAcess = null;
E12GenericUtility genericUtility = null;
......@@ -128,7 +125,7 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
if("A".equalsIgnoreCase(editFlag))
{
if(qlfCode == null || qlfCode.trim().length() == 0)
if(qlfCode == null || qlfCode.length() == 0)
{
errList.add("VEQLF2");
errFields.add(childNodeName.toLowerCase());
......@@ -162,36 +159,41 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
}
}
}
else if("descr".equalsIgnoreCase(childNodeName))
if("descr".equalsIgnoreCase(childNodeName))
{
descr = checkNull(genericUtility.getColumnValue("descr", dom)).trim();
System.out.println("descr == ["+descr+"]");
if(descr == null || descr.trim().length() == 0)
if(descr == null || descr.length() == 0)
{
errList.add("VTDESC1");
errFields.add(childNodeName.toLowerCase());
}
}
else if("sh_descr".equalsIgnoreCase(childNodeName))
if("sh_descr".equalsIgnoreCase(childNodeName))
{
shDescr = checkNull(genericUtility.getColumnValue("sh_descr", dom)).trim();
System.out.println("sh_descr == ["+shDescr+"]");
if(shDescr == null || shDescr.trim().length() == 0)
if(shDescr == null || shDescr.length() == 0)
{
errList.add("VEADN2");
errFields.add(childNodeName.toLowerCase());
}
}
else if("eqival".equalsIgnoreCase(childNodeName))
if("eqival".equalsIgnoreCase(childNodeName))
{
//Added by Shital on 30/10/2019[Start]
cnt = 0;
eqival = checkNull(genericUtility.getColumnValue("eqival", dom));
if(eqival != null && eqival.trim().length() > 0)
System.out.println("eqival:::::::::::"+eqival);
if(eqival.trim().length() != 0 && eqival != null)
//Added by Shital on 30/10/2019[End]
{
sql = "Select count(*) as cnt from qualification where qlf_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -220,48 +222,6 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
}
}
else if("type".equalsIgnoreCase(childNodeName))
{
cnt = 0;
type = checkNull(genericUtility.getColumnValue("type", dom));
System.out.println("type::::::"+type);
if(type != null && type.trim().length() > 0)
{
sql = "SELECT FLD_VALUE as DESCR "
+ "FROM GENCODES "
+ "WHERE "
+ "FLD_NAME = ? "
+ "and MOD_NAME = ? "
+ "and DESCR = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "TYPE");
pstmt.setString(2, "W_QUAL");
pstmt.setString(3, type);
rs = pstmt.executeQuery();
if (rs.next())
{
descr = rs.getString("DESCR");
cnt = 1;
}
System.out.println("descr for Type..:: [" + descr + "]");
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0 )
{
errList.add("VMTYPE1");
errFields.add(childNodeName.toLowerCase());
}
}
}
}
break;
}
......@@ -405,4 +365,5 @@ public class QualificationIC extends ValidatorEJB implements QualificationLocal,
}
return input.trim();
}
}
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