Commit a62c3816 authored by dpingle's avatar dpingle

* change done for Employee Address Detail- obj_name: emp_address_info

EmpAddressInfo.java
emp_address_info21.xml
d_emp_address_info21.srd
w_emp_address_info.sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205038 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ae5226cc
......@@ -6,19 +6,22 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import javax.ejb.Stateless;
//import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.system.config.ConnDriver;
//import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;// Modified By Hemlata on[20/11/2014] [As per changes in framework to use genericUtility ]
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
@Stateless
//Modified By Dipesh on[25/07/2019][Start]
//@Stateless
//Modified By Dipesh on[25/07/2019][End]
public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal ,EmpAddressInfoRemote
{
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
......@@ -60,6 +63,7 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
e.printStackTrace();
System.out.println("Exception :EmpAddressInfo [:" + e.getMessage() + ":]" );
errString = genericUtility.createErrorString(e);
throw new ITMException(e);
}
System.out.println("EmpAddressInfo errString returing at Stage 2[" + errString+"]");
return errString;
......@@ -69,7 +73,7 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
Connection conn = null;
ConnDriver connDriver = new ConnDriver();
//ConnDriver connDriver = new ConnDriver();
String sql = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
......@@ -125,7 +129,10 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
try
{
conn = connDriver.getConnectDB("Driver");
//Modified By Dipesh on[25/07/2019][Start]
//conn = connDriver.getConnectDB("Driver");
conn=getConnection();
//Modified By Dipesh on[24/07/2019][End]
conn.setAutoCommit(false);
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>");
......@@ -139,8 +146,10 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
case 1:
{
valueXmlString.append("<Detail1 domID='1' dbID='' objContext='1' objName='"+objNameDefault+"' selected='Y'>\r\n");
empCode = genericUtility.getColumnValue("emp_code",dom2);
//Modified By Dipesh on[25/07/2019][Start]
//empCode = genericUtility.getColumnValue("emp_code",dom2);
empCode = checkNull(genericUtility.getColumnValue("emp_code",dom));
//Modified By Dipesh on[25/07/2019][End]
System.out.println("empCode ..:: ["+empCode+"]");
sql = "SELECT PER_ADD1 FROM EMPLOYEE WHERE EMP_CODE = ?";
......@@ -443,13 +452,11 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
}
}
valueXmlString.append("</Detail1>\r\n");
}//End of Case 1
valueXmlString.append("</Detail1>\r\n");
break;
}//END OF SWITCH
valueXmlString.append("</Root>\r\n");
}//End of try block
catch(Exception e)
{
......@@ -476,21 +483,18 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
conn.close();
conn = null;
}
}
catch(Exception e)
{
System.out.println("Exception ::"+e);
e.printStackTrace();
throw new ITMException(e);
}
}//End of finally block
valueXmlString.append("</Root>\r\n");
System.out.println("valueXmlString....["+valueXmlString.toString());
return valueXmlString.toString();
}//End of itemChanged block
//Start of wfValData Start
public String wfValData() throws RemoteException,ITMException
{
......@@ -547,7 +551,7 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
System.out.println("Exception : [EmpAddressInfo][wfValData(String xmlString)] : ==>\n"+e.getMessage());
e.printStackTrace();
errString = genericUtility.createErrorString(e);
throw new ITMException(e);
}
return (errString);
}
......@@ -557,7 +561,7 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
Node parentNode = null;
Node childNode = null;
ITMDBAccessEJB itmDbAccess = null;
NodeList parentNodeList = null;
NodeList childNodeList = null;
......@@ -567,7 +571,6 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
int currentFormNo = 0;
int childNodeListLength = 0;
String msgType = "";
String errCode = "";
String errFldName = "";
......@@ -581,7 +584,6 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
PreparedStatement pstmt = null;
ResultSet rs = null;
//Varibles used in case 1 Start
String userId = "";
......@@ -601,16 +603,18 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
Connection conn = null;
try
{
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("Driver");
//Modified By Dipesh on[25/07/2019][Start]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("Driver");
conn=getConnection();
itmDbAccess = new ITMDBAccessEJB();
//Modified By Dipesh on[25/07/2019][End]
conn.setAutoCommit(false);
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext);
}
switch(currentFormNo)
{
case 1:
......@@ -629,12 +633,14 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
{
continue;
}
childNodeName = childNode.getNodeName();
if(childNodeName.equalsIgnoreCase("cur_state"))
{
curState = genericUtility.getColumnValue("cur_state",dom,objContext);
//Modified By Dipesh on[25/07/2019][Start]
//curState = genericUtility.getColumnValue("cur_state",dom,objContext);
curState = checkNull(genericUtility.getColumnValue("cur_state",dom,objContext));
//Modified By Dipesh on[25/07/2019][End]
System.out.println("curState got in the validation ..::["+curState+"]");
sql = "SELECT COUNT(*) AS STATE_CNT FROM STATE WHERE STATE_CODE = ?";
......@@ -676,7 +682,10 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
}
else if(childNodeName.equalsIgnoreCase("per_state"))
{
perState = genericUtility.getColumnValue("per_state",dom,objContext);
//Modified By Dipesh on[25/07/2019][Start]
//perState = genericUtility.getColumnValue("per_state",dom,objContext);
perState = checkNull(genericUtility.getColumnValue("per_state",dom,objContext));
//Modified By Dipesh on[25/07/2019][End]
System.out.println("perState got in the validation ..::["+perState+"]");
sql = "SELECT COUNT(*) AS STATE_CNT FROM STATE WHERE STATE_CODE = ?";
......@@ -717,8 +726,8 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
}
}
}
}//End of case
break;
}//End of case
}//End of Switch
int errListSize = errList.size();
if ( errList != null && errListSize > 0 )
......@@ -728,8 +737,10 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
errCode = (String)errList.get(cnt);
errFldName = (String)errFields.get(cnt);
System.out.println("errCode .........."+errCode);
errString = getErrorString( errFldName, errCode, userId );
//Modified By Dipesh on[25/07/2019][Start]
//errString = getErrorString( errFldName, errCode, userId );
errString = itmDbAccess.getErrorString(errFldName, errCode, userId, "", conn);
//Modified By Dipesh on[25/07/2019][End]
System.out.println("errString is : ::::>>>> " + errString);
msgType = errorType( conn , errCode );
if ( errString.length() > 0)
......@@ -792,8 +803,6 @@ public class EmpAddressInfo extends ValidatorEJB implements EmpAddressInfoLocal
throw new ITMException(e1);
}
}
return errString;
}
//Start of wfValData End
......
This diff is collapsed.
......@@ -234,7 +234,7 @@
<type size="25">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>ime_no</name>
<name>ime_nos</name>
<dbname>employee.ime_no</dbname>
</table_column>
<table_column>
......@@ -261,6 +261,7 @@
<updatewhereclause>yes</updatewhereclause>
<name>revision_no</name>
<dbname>employee.revision_no</dbname>
<initial>1</initial>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;employee&quot; ) COLUMN(NAME=&quot;employee.cur_add1&quot;) COLUMN(NAME=&quot;employee.cur_state&quot;) COLUMN(NAME=&quot;employee.cur_pin&quot;) COLUMN(NAME=&quot;employee.cur_tel1&quot;) COLUMN(NAME=&quot;employee.cur_tel2&quot;) COLUMN(NAME=&quot;employee.cur_tel3&quot;) COLUMN(NAME=&quot;employee.chg_user&quot;) COLUMN(NAME=&quot;employee.chg_date&quot;) COLUMN(NAME=&quot;employee.emp_code&quot;) COLUMN(NAME=&quot;employee.emp_fname&quot;) COLUMN(NAME=&quot;employee.emp_mname&quot;) COLUMN(NAME=&quot;employee.emp_lname&quot;) COLUMN(NAME=&quot;employee.chg_term&quot;) COLUMN(NAME=&quot;employee.per_tel&quot;) COLUMN(NAME=&quot;employee.per_pin&quot;) COLUMN(NAME=&quot;employee.per_state&quot;) COLUMN(NAME=&quot;employee.per_city&quot;) COLUMN(NAME=&quot;employee.per_add3&quot;) COLUMN(NAME=&quot;employee.per_add2&quot;) COLUMN(NAME=&quot;employee.per_add1&quot;) COLUMN(NAME=&quot;employee.cur_city&quot;) COLUMN(NAME=&quot;employee.cur_add3&quot;) COLUMN(NAME=&quot;employee.cur_add2&quot;) COLUMN(NAME=&quot;employee.mobile_no&quot;) COLUMN(NAME=&quot;employee.email_id_per&quot;) COLUMN(NAME=&quot;employee.email_id_off&quot;) COLUMN(NAME=&quot;employee.sms_domain&quot;) COLUMN(NAME=&quot;employee.ime_no&quot;) COLUMN(NAME=&quot;employee.emp_fname_long&quot;) COLUMN(NAME=&quot;employee.emp_mname_long&quot;) COLUMN(NAME=&quot;employee.emp_lname_long&quot;) COLUMN(NAME=&quot;employee.revision_no&quot;)WHERE( EXP1 =&quot;( employee.emp_code&quot; OP =&quot;=&quot; EXP2 =&quot;:memp )&quot; ) ) ARG(NAME = &quot;memp&quot; TYPE = string) </retrieve>
<update>employee</update>
......@@ -525,7 +526,7 @@
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_8</name>
<name>ime_nos_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -585,15 +586,15 @@
<tabsequence>110</tabsequence>
<border>5</border>
<color>0</color>
<x>359</x>
<y>150</y>
<x>358</x>
<y>151</y>
<height>16</height>
<width>167</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>ime_no</name>
<name>ime_nos</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>25</limit>
......@@ -666,7 +667,7 @@
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_5</name>
<name>sms_domain_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -769,7 +770,7 @@
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_6</name>
<name>email_id_off_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -797,7 +798,7 @@
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_7</name>
<name>email_id_per_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -856,7 +857,7 @@
<tabsequence>130</tabsequence>
<border>5</border>
<color>0</color>
<x>132</x>
<x>134</x>
<y>192</y>
<height>16</height>
<width>394</width>
......@@ -1405,14 +1406,14 @@
<text>Tele. :</text>
<border>0</border>
<color>0</color>
<x>62</x>
<x>61</x>
<y>315</y>
<height>16</height>
<width>66</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>t_3</name>
<name>per_tel_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......
......@@ -35,7 +35,7 @@ table(column=(type=char(50) update=yes updatewhereclause=yes name=cur_add1 dbnam
column=(type=char(30) updatewhereclause=yes name=emp_fname_long dbname="employee.emp_fname_long" )
column=(type=char(30) updatewhereclause=yes name=emp_mname_long dbname="employee.emp_mname_long" )
column=(type=char(30) updatewhereclause=yes name=emp_lname_long dbname="employee.emp_lname_long" )
column=(type=decimal(0) update=yes updatewhereclause=yes name=revision_no dbname="employee.revision_no" )
column=(type=decimal(0) update=yes updatewhereclause=yes name=revision_no dbname="employee.revision_no" initial="1" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"employee~" ) COLUMN(NAME=~"employee.cur_add1~") COLUMN(NAME=~"employee.cur_state~") COLUMN(NAME=~"employee.cur_pin~") COLUMN(NAME=~"employee.cur_tel1~") COLUMN(NAME=~"employee.cur_tel2~") COLUMN(NAME=~"employee.cur_tel3~") COLUMN(NAME=~"employee.chg_user~") COLUMN(NAME=~"employee.chg_date~") COLUMN(NAME=~"employee.emp_code~") COLUMN(NAME=~"employee.emp_fname~") COLUMN(NAME=~"employee.emp_mname~") COLUMN(NAME=~"employee.emp_lname~") COLUMN(NAME=~"employee.chg_term~") COLUMN(NAME=~"employee.per_tel~") COLUMN(NAME=~"employee.per_pin~") COLUMN(NAME=~"employee.per_state~") COLUMN(NAME=~"employee.per_city~") COLUMN(NAME=~"employee.per_add3~") COLUMN(NAME=~"employee.per_add2~") COLUMN(NAME=~"employee.per_add1~") COLUMN(NAME=~"employee.cur_city~") COLUMN(NAME=~"employee.cur_add3~") COLUMN(NAME=~"employee.cur_add2~") COLUMN(NAME=~"employee.mobile_no~") COLUMN(NAME=~"employee.email_id_per~") COLUMN(NAME=~"employee.email_id_off~") COLUMN(NAME=~"employee.sms_domain~") COLUMN(NAME=~"employee.ime_no~") COLUMN(NAME=~"employee.emp_fname_long~") COLUMN(NAME=~"employee.emp_mname_long~") COLUMN(NAME=~"employee.emp_lname_long~") COLUMN(NAME=~"employee.revision_no~")WHERE( EXP1 =~"( employee.emp_code~" OP =~"=~" EXP2 =~":memp )~" ) ) ARG(NAME = ~"memp~" TYPE = string) " update="employee" updatewhere=0 updatekeyinplace=yes arguments=(("memp", string)) )
groupbox(band=detail text="Address"border="2" color="0" x="5" y="4" height="409" width="563" name=gb_2 visible="1" font.face="Times New Roman" font.height="-12" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
text(band=detail alignment="1" text="City :" border="0" color="0" x="69" y="110" height="16" width="59" html.valueishtml="0" name=cur_city_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
......
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