package wenrgise.hrms.ejb.business; import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import wenrgise.common.bean.BaseHeaderBean; import wenrgise.common.bean.LOVBean; import wenrgise.common.ejb.business.HrmCommonBO; import wenrgise.common.exception.EnrgiseApplicationException; import wenrgise.common.exception.EnrgiseMessageKeyException; import wenrgise.common.exception.EnrgiseSystemException; import wenrgise.common.utility.DateUtility; import wenrgise.common.utility.EnrgiseUtil; import wenrgise.common.utility.MessageKey; import wenrgise.common.utility.RecordMetaInfo; import wenrgise.common.utility.UserInfo; import wenrgise.common.vo.BaseDetailVO; import wenrgise.common.vo.BaseHeaderVO; import wenrgise.common.vo.LovQueryVO; import wenrgise.common.vo.LovVO; import wenrgise.ejb.common.helper.DBObject; import wenrgise.ejb.common.helper.QueryRow; import wenrgise.ejb.common.helper.QueryValue; import wenrgise.ejb.common.utility.DBUtilitiesBean; import wenrgise.hrms.bean.HrmEmpPersAddDtlBean; import wenrgise.hrms.bean.HrmEmpPersAssetDtlBean; import wenrgise.hrms.bean.HrmEmpPersAwardDtlBean; import wenrgise.hrms.bean.HrmEmpPersDtlsBean; import wenrgise.hrms.bean.HrmEmpPersEduDtlBean; import wenrgise.hrms.bean.HrmEmpPersHdrBean; import wenrgise.hrms.bean.HrmEmpPersHealthBean; import wenrgise.hrms.bean.HrmEmpPersHstDtlBean; import wenrgise.hrms.bean.HrmEmpPersInsDtlBean; import wenrgise.hrms.bean.HrmEmpPersJoinInfDtlBean; import wenrgise.hrms.bean.HrmEmpPersLngDtlBean; import wenrgise.hrms.bean.HrmEmpPersPFDtlBean; import wenrgise.hrms.bean.HrmEmpPersPriorExpDtlBean; import wenrgise.hrms.bean.HrmEmpPersRefDtlBean; import wenrgise.hrms.bean.HrmEmpPersTrngDtlsDtlBean; import wenrgise.hrms.bean.HrmEmpWrkgrpDtlBean; import wenrgise.hrms.bean.HrmOrgClassDtlBean; import wenrgise.hrms.bean.HrmOrgClassHdrBean; import wenrgise.hrms.vo.HrmEmpPersQVO; public class HrmEmpPersBO extends HrmBaseBO { public HrmEmpPersBO() {} public HrmEmpPersBO(UserInfo oUserInfo) { super(oUserInfo); } public RecordMetaInfo getHrmEmpPersHdrMetaInfo(HrmEmpPersQVO oHrmEmpPersQVO) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); Timestamp oWhenPicked = null; int count = 0; BaseHeaderVO oBaseHeaderVO = new BaseHeaderVO(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersQVO.getEmpId())); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersQVO.getHeaderPrimaryKey())); arylstParam.add(new DBObject(3, 1, 12, oHrmEmpPersQVO.getEmployeeNo())); arylstParam.add(new DBObject(4, 2, -5)); arylstParam.add(new DBObject(5, 2, 93)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 12)); arylstParam.add(new DBObject(8, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersHdrCount(?,?,?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersHdrInfo(HrmEmpPersQVO oHrmEmpPersQVO, long lStartPosition, long lLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); Timestamp oWhenPicked = null; int count = 0; BaseHeaderVO oBaseHeaderVO = new BaseHeaderVO(); ArrayList arylstHeaderList = null; if (oHrmEmpPersQVO == null) oHrmEmpPersQVO = new HrmEmpPersQVO(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lStartPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lLastPosition))); arylstParam.add(new DBObject(3, 1, 12, oHrmEmpPersQVO.getEmpId())); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersQVO.getHeaderPrimaryKey())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersQVO.getEmployeeNo())); arylstParam.add(new DBObject(6, 2, -10)); arylstParam.add(new DBObject(7, 2, 12)); arylstParam.add(new DBObject(8, 2, 12)); arylstParam.add(new DBObject(9, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersHdrInfo(?,?,?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); String draft = null; while (itrBean.hasNext()) { if (count == 0) arylstHeaderList = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersHdrBean oHrmEmpPersHdrBean = new HrmEmpPersHdrBean(); oHrmEmpPersHdrBean.setHeaderPrimaryKey(oRow.get("EMP_ID").getString()); oHrmEmpPersHdrBean.setEmpNumberId(oRow.get("EMP_ID").getString()); oHrmEmpPersHdrBean.setEmployeeNo(oRow.get("EMP_NO").getString()); oHrmEmpPersHdrBean.setFirstName(oRow.get("FIRST_NAME").getString()); oHrmEmpPersHdrBean.setMiddleName(oRow.get("MIDDLE_NAME").getString()); oHrmEmpPersHdrBean.setLastName(oRow.get("LAST_NAME").getString()); oHrmEmpPersHdrBean.setPicturePath(oRow.get("PICTURE_PATH").getString()); draft = oRow.get("DRAFT_FLAG").getString(); if (draft.equalsIgnoreCase("Y")) { oHrmEmpPersHdrBean.setDraftFlag("On"); } else { oHrmEmpPersHdrBean.setDraftFlag("Off"); } arylstHeaderList.add(oHrmEmpPersHdrBean); } return arylstHeaderList; } public RecordMetaInfo getHrmEmpPersDtlsMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersDtlsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersDtlsInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = new HrmEmpPersDtlsBean(); oHrmEmpPersDtlsBean.setDetailId(oRow.get("EMP_ID").getString()); oHrmEmpPersDtlsBean.setLocationId(oRow.get("LOCATION_ID").getString()); oHrmEmpPersDtlsBean.setLocation(oRow.get("LOCATION").getString()); oHrmEmpPersDtlsBean.setLocJoiningDate(EnrgiseUtil.convertToString(oRow.get("LOC_JOIN_DATE").getDate())); oHrmEmpPersDtlsBean.setSex(oRow.get("SEX").getString()); oHrmEmpPersDtlsBean.setGuardianName(oRow.get("GUARDIAN_NAME").getString()); oHrmEmpPersDtlsBean.setDateOfBirth(EnrgiseUtil.convertToString(oRow.get("DOB").getDate())); oHrmEmpPersDtlsBean.setPlaceOfBirth(oRow.get("PLACE_OF_BIRTH").getString()); oHrmEmpPersDtlsBean.setBloodGroup(oRow.get("BLOOD_GROUP").getString()); oHrmEmpPersDtlsBean.setIdMark(oRow.get("ID_MARKS").getString()); oHrmEmpPersDtlsBean.setMobile(oRow.get("MOBILE").getString()); oHrmEmpPersDtlsBean.setPersonalEmail(oRow.get("EMAIL").getString()); String sMthTng = oRow.get("MOTHER_TONGUE").getString(); if (sMthTng == null) { oHrmEmpPersDtlsBean.setMotherTongue(""); oHrmEmpPersDtlsBean.setMotherTongueCode(""); } else { String sLanguage = getLangInfo(sMthTng); oHrmEmpPersDtlsBean.setMotherTongue(sLanguage); oHrmEmpPersDtlsBean.setMotherTongueCode(sMthTng); } String sNat = oRow.get("NATIONALITY").getString(); oHrmEmpPersDtlsBean.setNationalityCode(sNat); if (sNat == null) { oHrmEmpPersDtlsBean.setNationality(""); } else { String sNationality = getGlobalCodesInfo(sNat, "104"); oHrmEmpPersDtlsBean.setNationality(sNationality); } String sMas = oRow.get("MARITAL_STATUS").getString(); String sMaritalStatus = getGlobalCodesInfo(sMas, "25"); if (sMas == null) { oHrmEmpPersDtlsBean.setMaritalStatus(""); } else { oHrmEmpPersDtlsBean.setMaritalCode(sMas); oHrmEmpPersDtlsBean.setMaritalStatus(sMaritalStatus); } String sQuery = String.valueOf("select count(*) as checkExist from HRM_EMP_DEPENDENTS where e_per_dtl_id= ").concat(String.valueOf(oHrmEmpPersDtlsBean.getDetailId())); DBUtilitiesBean oBean3 = new DBUtilitiesBean(); ArrayList arylstList11 = oBean3.executeQuery(sQuery); Iterator itrBean11 = arylstList11.iterator(); String chExist = null; if (itrBean11.hasNext()) { QueryRow oRow2 = itrBean11.next(); chExist = oRow2.get("checkExist").getString(); } oHrmEmpPersDtlsBean.setDependants(chExist); oHrmEmpPersDtlsBean.setReligionId(oRow.get("RLGN_MST_ID").getString()); oHrmEmpPersDtlsBean.setReligion(oRow.get("REL_DESC").getString()); oHrmEmpPersDtlsBean.setHandicappedFlag(oRow.get("HANDICAPPED_FLAG").getString()); oHrmEmpPersDtlsBean.setPanNumber(oRow.get("PAN_NUMBER").getString()); oHrmEmpPersDtlsBean.setGirNumber(oRow.get("GRATUITY_NUMBER").getString()); oHrmEmpPersDtlsBean.setPfNumber(oRow.get("PF_NUMBER").getString()); oHrmEmpPersDtlsBean.setSpouseName(oRow.get("SPOUSE_NAME").getString()); oHrmEmpPersDtlsBean.setSpouseOccupation(oRow.get("SPOUSE_OCCUPATION").getString()); oHrmEmpPersDtlsBean.setDrivingLicenseNo(oRow.get("DRIVING_LICENSE").getString()); oHrmEmpPersDtlsBean.setValidUpto(EnrgiseUtil.convertToString(oRow.get("VALID_UPTO").getDate())); oHrmEmpPersDtlsBean.setPassportNo(oRow.get("PASSPORT_NO").getString()); oHrmEmpPersDtlsBean.setPlaceOfIssue(oRow.get("PLACE_ISSUE").getString()); oHrmEmpPersDtlsBean.setPassportIssueDate(EnrgiseUtil.convertToString(oRow.get("PASSPORT_ISSUE_DATE").getDate())); oHrmEmpPersDtlsBean.setPassportExpDate(EnrgiseUtil.convertToString(oRow.get("PASSPORT_EXPIRY_DATE").getDate())); oHrmEmpPersDtlsBean.setRelatedEmpId(oRow.get("RELATED_EMPLOYEE_ID").getString()); oHrmEmpPersDtlsBean.setRelatedEmployee(oRow.get("RELATED_EMPLOYEE").getString()); oHrmEmpPersDtlsBean.setRelatedToEmployee(String.valueOf(oRow.get("RELATED_FLAG").getString()).equalsIgnoreCase("Y") ? "on" : "off"); oHrmEmpPersDtlsBean.setFlat(String.valueOf(oRow.get("FLAT_GIVEN").getString()).equalsIgnoreCase("Y") ? "on" : "off"); oHrmEmpPersDtlsBean.setAnniversaryDate(EnrgiseUtil.convertToString(oRow.get("anniversary_date").getDate())); oHrmEmpPersDtlsBean.setMotherName(oRow.get("mother_name").getString()); oHrmEmpPersDtlsBean.setScsmemershipNo(oRow.get("scsmemershipNo").getString()); oHrmEmpPersDtlsBean.setGunLicenseNo(oRow.get("gun_license_no").getString()); oHrmEmpPersDtlsBean.setGunLicenseRenDate(EnrgiseUtil.convertToString(oRow.get("gun_license_ren_date").getDate())); oHrmEmpPersDtlsBean.setSpouseOrganization(oRow.get("Spouse_Organization").getString()); oHrmEmpPersDtlsBean.setSpOrgType(oRow.get("Spouse_Organization_type").getString()); oHrmEmpPersDtlsBean.setSpTransferable(oRow.get("SPOUSE_TRANSFERABLE").getString()); oHrmEmpPersDtlsBean.setClubMembership(oRow.get("club_membership").getString()); oHrmEmpPersDtlsBean.setUnionInfo(oRow.get("union_info").getString()); oHrmEmpPersDtlsBean.setUanInfo(oRow.get("UAN_Details").getString()); oHrmEmpPersDtlsBean.setAadharInfo(oRow.get("aadhar_No").getString()); String incrDate = String.valueOf(oRow.get("INCR_EFFECT_DATE").getDate()); if (incrDate.equalsIgnoreCase("null")) { oHrmEmpPersDtlsBean.setLastPromotionDate(""); } else { oHrmEmpPersDtlsBean.setLastPromotionDate(EnrgiseUtil.convertToString(oRow.get("INCR_EFFECT_DATE").getDate())); } String sEmpid = oRow.get("EMP_ID").getString(); ArrayList arylstClass = null; String sScale = null; String sGrade = null; String sDesignation = null; HrmOrgClassDtlBean def = null; arylstClass = getHrEmpInfoByclass(sEmpid, "15"); Iterator itrBean7 = arylstClass.iterator(); while (itrBean7.hasNext()) { def = itrBean7.next(); sScale = def.getTxtDescription(); } arylstClass = getHrEmpInfoByclass(sEmpid, "10"); Iterator itrBean2 = arylstClass.iterator(); while (itrBean2.hasNext()) { def = itrBean2.next(); sDesignation = def.getTxtDescription(); oHrmEmpPersDtlsBean.setDesignationId(def.getDetailId()); oHrmEmpPersDtlsBean.setDesignation(sDesignation); } arylstClass = getHrEmpInfoByclass(sEmpid, "20"); Iterator itrBean1 = arylstClass.iterator(); while (itrBean1.hasNext()) { def = itrBean1.next(); sGrade = def.getTxtDescription(); oHrmEmpPersDtlsBean.setGradeId(def.getDetailId()); oHrmEmpPersDtlsBean.setGrade(sGrade); } arylstClass = getHrEmpInfoByclass(sEmpid, "40"); Iterator itrBean5 = arylstClass.iterator(); while (itrBean5.hasNext()) { def = itrBean5.next(); oHrmEmpPersDtlsBean.setSocialStatusId(def.getDetailId()); oHrmEmpPersDtlsBean.setRsvCtg(def.getTxtDescription()); } HrmEmpWrkgrpDtlBean abc = null; String sDepName = null; String sRepEmpNo = null; String sDeptid = null; String sEmpId = null; arylstClass = getHrEmpInfoByWrkGrp(sEmpid); Iterator itrBean3 = arylstClass.iterator(); while (itrBean3.hasNext()) { abc = itrBean3.next(); sDepName = abc.getName(); sRepEmpNo = abc.getEmpNo(); sDeptid = abc.getDetailId(); sEmpId = abc.getReportingEmpId(); } if (arylstClass.size() != 0) { oHrmEmpPersDtlsBean.setDepartmentId(sDeptid); oHrmEmpPersDtlsBean.setDepartment(sDepName); oHrmEmpPersDtlsBean.setReportingEmpId(sEmpId); oHrmEmpPersDtlsBean.setReportingEmployee(sRepEmpNo); } else { oHrmEmpPersDtlsBean.setDepartmentId(""); oHrmEmpPersDtlsBean.setDepartment(""); oHrmEmpPersDtlsBean.setReportingEmpId(""); oHrmEmpPersDtlsBean.setReportingEmployee(""); } arylstEmpPerDetail.add(oHrmEmpPersDtlsBean); } return arylstEmpPerDetail; } public ArrayList getHrEmpInfoByclass(String sEmpId, String sClassType) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstHrClassDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sEmpId)); arylstParam.add(new DBObject(2, 1, 12, sClassType)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procgetEmpInfoByClass(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstHrClassDetail = new ArrayList(); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstHrClassDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmOrgClassDtlBean oClassDetailBean = new HrmOrgClassDtlBean(); oClassDetailBean.setDetailId(oRow.get("ID").getString()); oClassDetailBean.setTxtClassificationCode(oRow.get("CODE").getString()); oClassDetailBean.setTxtDescription(oRow.get("NAME").getString()); oClassDetailBean.setTxtHierarchy(oRow.get("HIERARCHY").getString()); arylstHrClassDetail.add(oClassDetailBean); } return arylstHrClassDetail; } public ArrayList getHrEmpInfoByWrkGrp(String sEmpId) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstHrWrkGrpDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sEmpId)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.proc_GetWrkGrpByEmpId(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstHrWrkGrpDetail = new ArrayList(); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstHrWrkGrpDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpWrkgrpDtlBean oHrmEmpWrkgrpDtlBean = new HrmEmpWrkgrpDtlBean(); oHrmEmpWrkgrpDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpWrkgrpDtlBean.setReportingEmpId(oRow.get("REPORTING_EMP_ID").getString()); oHrmEmpWrkgrpDtlBean.setName(oRow.get("NAME").getString()); oHrmEmpWrkgrpDtlBean.setEmpNo(oRow.get("empname").getString()); arylstHrWrkGrpDetail.add(oHrmEmpWrkgrpDtlBean); } return arylstHrWrkGrpDetail; } public String getLangInfo(String sCode) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; String sLang = null; ArrayList arylstLangDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sCode)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procGetMthTngInfo(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstLangDetail = new ArrayList(); QueryRow oRow = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { oRow = (QueryRow)itrBean.next(); sLang = oRow.get("DESCRIPTION").getString(); } return sLang; } public String getGlobalCodesInfo(String sCode, String sType) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; String sNat = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sCode)); arylstParam.add(new DBObject(2, 1, 12, sType)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.proc_GetNatInfo(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { oRow = (QueryRow)itrBean.next(); sNat = oRow.get("GLOBAL_CODE_DESC").getString(); } return sNat; } public RecordMetaInfo getHrmEmpPersAddDtlsMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersAddDtlCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); Long count = new Long(((Long)oTotalRecord.getObject()).longValue()); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmPersAddDtlsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerAddDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(4L))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersAddDtlInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); HrmEmpPersAddDtlBean oHrmEmployeePDDtlAddBean = new HrmEmpPersAddDtlBean(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerAddDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); String addressType = oRow.get("ADDRESS_TYPE").getString(); oHrmEmployeePDDtlAddBean.setDetailId(oRow.get("EMP_ID").getString()); if (addressType.equalsIgnoreCase("O")) { oHrmEmployeePDDtlAddBean.setAddress(oRow.get("ADDRESS").getString()); oHrmEmployeePDDtlAddBean.setCity(oRow.get("CITY").getString()); oHrmEmployeePDDtlAddBean.setCountry(oRow.get("COUNTRY").getString()); oHrmEmployeePDDtlAddBean.setEmail(oRow.get("EMAIL").getString()); oHrmEmployeePDDtlAddBean.setExtension(oRow.get("PRI_EXTN").getString()); oHrmEmployeePDDtlAddBean.setFax(oRow.get("FAX").getString()); oHrmEmployeePDDtlAddBean.setMobileNo(oRow.get("MOBILE").getString()); oHrmEmployeePDDtlAddBean.setPhone(oRow.get("PRI_PHONE").getString()); oHrmEmployeePDDtlAddBean.setPinCode(oRow.get("PIN").getString()); oHrmEmployeePDDtlAddBean.setState(oRow.get("STATE").getString()); oHrmEmployeePDDtlAddBean.setSecPhone(oRow.get("SEC_PHONE").getString()); oHrmEmployeePDDtlAddBean.setSecExtension(oRow.get("SEC_EXTN").getString()); oHrmEmployeePDDtlAddBean.setDistrict(oRow.get("DISTRICT").getString()); oHrmEmployeePDDtlAddBean.setTehsil(oRow.get("TEHSIL").getString()); continue; } if (addressType.equalsIgnoreCase("P")) { oHrmEmployeePDDtlAddBean.setPrAddress(oRow.get("ADDRESS").getString()); oHrmEmployeePDDtlAddBean.setPrCity(oRow.get("CITY").getString()); oHrmEmployeePDDtlAddBean.setPrCountry(oRow.get("COUNTRY").getString()); oHrmEmployeePDDtlAddBean.setPrPhone(oRow.get("PRI_PHONE").getString()); oHrmEmployeePDDtlAddBean.setPrPinCode(oRow.get("PIN").getString()); oHrmEmployeePDDtlAddBean.setPrState(oRow.get("STATE").getString()); oHrmEmployeePDDtlAddBean.setPrDistrict(oRow.get("DISTRICT").getString()); oHrmEmployeePDDtlAddBean.setPrTehsil(oRow.get("TEHSIL").getString()); continue; } if (addressType.equalsIgnoreCase("R")) { oHrmEmployeePDDtlAddBean.setPeAddress(oRow.get("ADDRESS").getString()); oHrmEmployeePDDtlAddBean.setPeCity(oRow.get("CITY").getString()); oHrmEmployeePDDtlAddBean.setPeCountry(oRow.get("COUNTRY").getString()); oHrmEmployeePDDtlAddBean.setPePhone(oRow.get("PRI_PHONE").getString()); oHrmEmployeePDDtlAddBean.setPePinCode(oRow.get("PIN").getString()); oHrmEmployeePDDtlAddBean.setPeState(oRow.get("STATE").getString()); oHrmEmployeePDDtlAddBean.setPeDistrict(oRow.get("DISTRICT").getString()); oHrmEmployeePDDtlAddBean.setPeTehsil(oRow.get("TEHSIL").getString()); continue; } if (addressType.equalsIgnoreCase("H")) { oHrmEmployeePDDtlAddBean.setHtAddress(oRow.get("ADDRESS").getString()); oHrmEmployeePDDtlAddBean.setHtCity(oRow.get("CITY").getString()); oHrmEmployeePDDtlAddBean.setHtCountry(oRow.get("COUNTRY").getString()); oHrmEmployeePDDtlAddBean.setHtPhone(oRow.get("PRI_PHONE").getString()); oHrmEmployeePDDtlAddBean.setHtPinCode(oRow.get("PIN").getString()); oHrmEmployeePDDtlAddBean.setHtState(oRow.get("STATE").getString()); oHrmEmployeePDDtlAddBean.setHtDistrict(oRow.get("DISTRICT").getString()); oHrmEmployeePDDtlAddBean.setHtTehsil(oRow.get("TEHSIL").getString()); } } arylstEmpPerAddDetail.add(oHrmEmployeePDDtlAddBean); return arylstEmpPerAddDetail; } public RecordMetaInfo getHrmEmpPersJoinInfMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersJoinInfoCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); Long count = new Long(((Long)oTotalRecord.getObject()).longValue()); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersJoinInfInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerJoinInfoDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersJoinInfDtlInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerJoinInfoDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfDtlBean = new HrmEmpPersJoinInfDtlBean(); oHrmEmpPersJoinInfDtlBean.setDetailId(oRow.get("EMP_ID").getString()); String comJoinDate = String.valueOf(oRow.get("COMP_JOIN_DATE").getDate()); if (comJoinDate.equalsIgnoreCase("null")) { oHrmEmpPersJoinInfDtlBean.setCompJoiningDate(""); } else { oHrmEmpPersJoinInfDtlBean.setCompJoiningDate(EnrgiseUtil.convertToString(oRow.get("COMP_JOIN_DATE").getDate())); } String tenConfDate = String.valueOf(oRow.get("TENTATIVE_CONF_DATE").getDate()); if (tenConfDate.equalsIgnoreCase("null")) { oHrmEmpPersJoinInfDtlBean.setTentativeConfDate(""); } else { oHrmEmpPersJoinInfDtlBean.setTentativeConfDate(EnrgiseUtil.convertToString(oRow.get("TENTATIVE_CONF_DATE").getDate())); } oHrmEmpPersJoinInfDtlBean.setBaseSiteId(oRow.get("BASE_SITE_ID").getString()); oHrmEmpPersJoinInfDtlBean.setPlaceOfInitialPosting(oRow.get("SITE_NAME").getString()); String sEntry = oRow.get("ENTRY_MODE").getString(); if (sEntry == null) { oHrmEmpPersJoinInfDtlBean.setEntryMode(""); oHrmEmpPersJoinInfDtlBean.setEntryModeCode(sEntry); } else { String sEntryMode = getGlobalCodesInfo(sEntry, "103"); oHrmEmpPersJoinInfDtlBean.setEntryMode(sEntryMode); oHrmEmpPersJoinInfDtlBean.setEntryModeCode(sEntry); } oHrmEmpPersJoinInfDtlBean.setAccountingSite(oRow.get("ACCT_SITE_NAME").getString()); oHrmEmpPersJoinInfDtlBean.setAccSiteId(oRow.get("ACC_SITE_ID").getString()); String status = oRow.get("EMPLOYEE_TYPE").getString(); if (status == null) { oHrmEmpPersJoinInfDtlBean.setEmployeeStatusCode(""); oHrmEmpPersJoinInfDtlBean.setEmployeeStatus(""); } else { oHrmEmpPersJoinInfDtlBean.setEmployeeStatusCode(status); String statusDesc = getGlobalCodesInfo(status, "102"); oHrmEmpPersJoinInfDtlBean.setEmployeeStatus(statusDesc); } oHrmEmpPersJoinInfDtlBean.setSeparationId(oRow.get("TYPE_OF_SEPERATION").getString()); oHrmEmpPersJoinInfDtlBean.setSeparationType(oRow.get("sepdesc").getString()); oHrmEmpPersJoinInfDtlBean.setBankCode(oRow.get("BANK_CODE").getString()); oHrmEmpPersJoinInfDtlBean.setBankName(oRow.get("BANK_NAME").getString()); oHrmEmpPersJoinInfDtlBean.setBranchName(oRow.get("BRANCH_NAME").getString()); oHrmEmpPersJoinInfDtlBean.setBankId(oRow.get("BANK_ID").getString()); oHrmEmpPersJoinInfDtlBean.setAccountNumber(oRow.get("ACCT_NO").getString()); oHrmEmpPersJoinInfDtlBean.setCostId(oRow.get("COST_CENTER_ID").getString()); oHrmEmpPersJoinInfDtlBean.setCostCentre(oRow.get("costcentre").getString()); oHrmEmpPersJoinInfDtlBean.setJobRespId(oRow.get("jobRespCode").getString()); oHrmEmpPersJoinInfDtlBean.setJobResp(oRow.get("jobResp").getString()); oHrmEmpPersJoinInfDtlBean.setRefNo(oRow.get("REF_NO").getString()); oHrmEmpPersJoinInfDtlBean.setOrderNo(oRow.get("ORDER_NO").getString()); oHrmEmpPersJoinInfDtlBean.setOrderDate(EnrgiseUtil.convertToString(oRow.get("ORDER_DATE").getDate())); String cheq = String.valueOf(oRow.get("CHEQUE_PAYMENT").getString()); System.out.println(cheq); if (cheq.equalsIgnoreCase("null")) cheq = ""; oHrmEmpPersJoinInfDtlBean.setPaymentType(cheq); String retDate = String.valueOf(oRow.get("RETIREMENT_DATE").getDate()); if (retDate.equalsIgnoreCase("null")) { oHrmEmpPersJoinInfDtlBean.setRetirementDate(""); } else { oHrmEmpPersJoinInfDtlBean.setRetirementDate(EnrgiseUtil.convertToString(oRow.get("RETIREMENT_DATE").getDate())); } String statusDate = String.valueOf(oRow.get("STATUS_EFFECT_DATE").getDate()); if (statusDate.equalsIgnoreCase("null")) { oHrmEmpPersJoinInfDtlBean.setStatusEffectDate(""); } else { oHrmEmpPersJoinInfDtlBean.setStatusEffectDate(EnrgiseUtil.convertToString(oRow.get("STATUS_EFFECT_DATE").getDate())); } arylstEmpPerJoinInfoDetail.add(oHrmEmpPersJoinInfDtlBean); } return arylstEmpPerJoinInfoDetail; } public RecordMetaInfo getHrmEmpPersEduDtlsMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersEduCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersEduDtlsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerEduDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPerDetEduDtlInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerEduDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersEduDtlBean oHrmEmployePDEduDtlBean = new HrmEmpPersEduDtlBean(); oHrmEmployePDEduDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmployePDEduDtlBean.setTxtSrlNo(oRow.get("SRL_NO").getString()); oHrmEmployePDEduDtlBean.setTxtSchoolColInst(oRow.get("INST_CODE").getString()); oHrmEmployePDEduDtlBean.setTxtQualificationId(oRow.get("QUAL_MST_ID").getString()); oHrmEmployePDEduDtlBean.setTxtQualificationCode(oRow.get("QUAL_CODE").getString()); oHrmEmployePDEduDtlBean.setTxtExamDegreePassed(oRow.get("NAME").getString()); oHrmEmployePDEduDtlBean.setTxtPercentageDivision(oRow.get("PERC_MARKS").getString()); oHrmEmployePDEduDtlBean.setTxtPassYear(oRow.get("PASS_YEAR").getString()); oHrmEmployePDEduDtlBean.setTxtMajorSubjects(oRow.get("MAJOR_SUBJECTS").getString()); oHrmEmployePDEduDtlBean.setTxtSpecialisation(oRow.get("SPECIALIZATION").getString()); oHrmEmployePDEduDtlBean.setTxtOtherProfQualification(oRow.get("OTHER_QUAL").getString()); oHrmEmployePDEduDtlBean.setTxtSpecialisedCourses(oRow.get("SPECIAL_COURSES_ATTENDED").getString()); arylstEmpPerEduDetail.add(oHrmEmployePDEduDtlBean); } return arylstEmpPerEduDetail; } public RecordMetaInfo getHrmEmpPersPriorExpMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersPriorExpCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersPriorExpInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerPriorExpDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersPriorExpInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerPriorExpDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = new HrmEmpPersPriorExpDtlBean(); oHrmEmpPersPriorExpDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersPriorExpDtlBean.setTxtOrgName(oRow.get("ORG_NAME").getString()); oHrmEmpPersPriorExpDtlBean.setTxtOrgAdd(oRow.get("LOCATION").getString()); oHrmEmpPersPriorExpDtlBean.setTxtFromDate(oRow.get("FROM_MMYYYY").getString()); oHrmEmpPersPriorExpDtlBean.setTxtToDate(oRow.get("TO_MMYYYY").getString()); oHrmEmpPersPriorExpDtlBean.setTxtWorkExp(oRow.get("WORK_EXPERIENCE").getString()); oHrmEmpPersPriorExpDtlBean.setTxtDesignation(oRow.get("DESIGNATION").getString()); oHrmEmpPersPriorExpDtlBean.setTxtReportTo(oRow.get("REPORT_TO").getString()); oHrmEmpPersPriorExpDtlBean.setTxtJobDesc(oRow.get("JOB_DESC").getString()); oHrmEmpPersPriorExpDtlBean.setTxtPersonnelSupervised(oRow.get("PERSONNEL_SUPERVISED").getString()); oHrmEmpPersPriorExpDtlBean.setTxtSalStarting(oRow.get("STARTING_SALARY").getString()); oHrmEmpPersPriorExpDtlBean.setTxtSalLeaving(oRow.get("LEAVING_SALARY").getString()); oHrmEmpPersPriorExpDtlBean.setTxtBasic(oRow.get("BASIC").getString()); oHrmEmpPersPriorExpDtlBean.setTxtDa(oRow.get("DA").getString()); oHrmEmpPersPriorExpDtlBean.setTxtHra(oRow.get("HRA").getString()); oHrmEmpPersPriorExpDtlBean.setTxtConveyance(oRow.get("CONV_ALLOWANCE").getString()); oHrmEmpPersPriorExpDtlBean.setTxtOtherAllowance(oRow.get("OTHERS_ALLOWANCES").getString()); oHrmEmpPersPriorExpDtlBean.setTxtIncentives(oRow.get("INCENTIVES").getString()); oHrmEmpPersPriorExpDtlBean.setTxtBonus(oRow.get("BONUS").getString()); arylstEmpPerPriorExpDetail.add(oHrmEmpPersPriorExpDtlBean); } return arylstEmpPerPriorExpDetail; } public RecordMetaInfo getHrmEmpPerPFDtlMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersPFCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersPFDtlsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerPFDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersPFInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstEmpPerPFDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersPFDtlBean oHrmEmpPersPFDtlBean = new HrmEmpPersPFDtlBean(); oHrmEmpPersPFDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersPFDtlBean.setTxtRelationId(oRow.get("RELA_ID").getString()); oHrmEmpPersPFDtlBean.setTxtNomineeName(oRow.get("DEPD_NAME").getString()); oHrmEmpPersPFDtlBean.setTxtNomineeId(oRow.get("RELA_ID").getString()); oHrmEmpPersPFDtlBean.setTxtRelation(oRow.get("NAME").getString()); oHrmEmpPersPFDtlBean.setTxtTotalAmount(oRow.get("TOTAL_FLAG").getString()); oHrmEmpPersPFDtlBean.setTxtMinorDetails(oRow.get("MINOR_DETAILS").getString()); oHrmEmpPersPFDtlBean.setTxtPercentage(oRow.get("PF_PER").getString()); oHrmEmpPersPFDtlBean.setTxtDob(EnrgiseUtil.convertToString(oRow.get("DOB").getDate())); oHrmEmpPersPFDtlBean.setTxtAddress(oRow.get("ADDRESS").getString()); arylstEmpPerPFDetail.add(oHrmEmpPersPFDtlBean); } return arylstEmpPerPFDetail; } public ArrayList getHrEmpScaleDesigId() throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstHrClassHeader = null; ArrayList arylstClassHeaderBean = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 2, -10)); arylstParam.add(new DBObject(2, 2, 12)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procGetScaleDesigId(?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstHrClassHeader = new ArrayList(); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arylstHrClassHeader = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmOrgClassHdrBean oClassHeaderBean = new HrmOrgClassHdrBean(); oClassHeaderBean.setDesigId(oRow.get("DSGN_MST_ID").getString()); oClassHeaderBean.setScaleId(oRow.get("SCALE_MST_ID").getString()); arylstHrClassHeader.add(oClassHeaderBean); } return arylstHrClassHeader; } public RecordMetaInfo getHrmEmpPersEmpHistMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); ArrayList arylstClass = null; String sScaleId = null; String sDesignationId = null; HrmOrgClassHdrBean def = null; arylstClass = getHrEmpScaleDesigId(); Iterator itrBean = arylstClass.iterator(); while (itrBean.hasNext()) { def = itrBean.next(); sScaleId = def.getScaleId(); sDesignationId = def.getDesigId(); } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 1, 12, sDesignationId)); arylstParam.add(new DBObject(3, 1, 12, sScaleId)); arylstParam.add(new DBObject(4, 2, -5)); arylstParam.add(new DBObject(5, 2, 93)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 12)); arylstParam.add(new DBObject(8, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersEmpHistCount(?,?,?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersEmpHistInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstEmpPerHisDetail = null; ArrayList arylstClass = null; String sScaleId = null; String sDesignationId = null; HrmOrgClassHdrBean def = null; arylstClass = getHrEmpScaleDesigId(); Iterator itrBean = arylstClass.iterator(); while (itrBean.hasNext()) { def = itrBean.next(); sScaleId = def.getScaleId(); sDesignationId = def.getDesigId(); } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, sDesignationId)); arylstParam.add(new DBObject(5, 1, 12, sScaleId)); arylstParam.add(new DBObject(6, 2, -10)); arylstParam.add(new DBObject(7, 2, 12)); arylstParam.add(new DBObject(8, 2, 12)); arylstParam.add(new DBObject(9, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersEmpHistInfo(?,?,?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean4 = arylstParam.iterator(); while (itrBean4.hasNext()) { if (count == 0) arylstEmpPerHisDetail = new ArrayList(); count++; oRow = (QueryRow)itrBean4.next(); HrmEmpPersHstDtlBean oHrmEmpPersHstDtlBean = new HrmEmpPersHstDtlBean(); oHrmEmpPersHstDtlBean.setDetailId(oRow.get("SRL_NO").getString()); String effecDate = String.valueOf(oRow.get("EFFECTIVE_DATE").getDate()); System.out.println(effecDate); if (effecDate.equalsIgnoreCase("null")) { oHrmEmpPersHstDtlBean.setTxtEffectiveDate(""); } else { oHrmEmpPersHstDtlBean.setTxtEffectiveDate(EnrgiseUtil.convertToString(oRow.get("EFFECTIVE_DATE").getDate())); } oHrmEmpPersHstDtlBean.setTxtFromDesig(oRow.get("FROM_DSGN").getString()); oHrmEmpPersHstDtlBean.setTxtFromDesigId(oRow.get("FROM_DSGN_ID").getString()); oHrmEmpPersHstDtlBean.setTxtToDesigId(oRow.get("TO_DSGN_ID").getString()); oHrmEmpPersHstDtlBean.setTxtToDesig(oRow.get("TO_DSGN").getString()); oHrmEmpPersHstDtlBean.setTxtFromGrade(oRow.get("FROM_GRADE").getString()); oHrmEmpPersHstDtlBean.setTxtToGrade(oRow.get("TO_GRADE").getString()); oHrmEmpPersHstDtlBean.setTxtFromLocation(oRow.get("FR_SITE").getString()); oHrmEmpPersHstDtlBean.setTxtToLocation(oRow.get("TO_SITE").getString()); oHrmEmpPersHstDtlBean.setTxtFromDepartment(oRow.get("FR_DEPT").getString()); oHrmEmpPersHstDtlBean.setTxtToDepartment(oRow.get("TO_DEPT").getString()); oHrmEmpPersHstDtlBean.setTxtFromBasic(oRow.get("BASIC").getString()); oHrmEmpPersHstDtlBean.setTxtToBasic(oRow.get("TO_BASIC").getString()); String prmFlag = String.valueOf(oRow.get("PROMOTION_FLAG").getString()); if (prmFlag.equalsIgnoreCase("P")) { oHrmEmpPersHstDtlBean.setTxtActivity("PROMOTION"); } else if (prmFlag.equalsIgnoreCase("T")) { oHrmEmpPersHstDtlBean.setTxtActivity("TRANSFER"); } else if (prmFlag.equalsIgnoreCase("I")) { oHrmEmpPersHstDtlBean.setTxtActivity("INCREMENT"); } else if (prmFlag.equalsIgnoreCase("S")) { oHrmEmpPersHstDtlBean.setTxtActivity("SEPARATION"); } else if (prmFlag.equalsIgnoreCase("D")) { oHrmEmpPersHstDtlBean.setTxtActivity("DEPUTATION"); } arylstEmpPerHisDetail.add(oHrmEmpPersHstDtlBean); } return arylstEmpPerHisDetail; } public RecordMetaInfo getHrmEmpPersTrngDtlsMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersTrngDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersTrngDtlsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeTrng = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersTrngDtlsInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeTrng = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersTrngDtlsDtlBean oHrmEmpPersTrngDtlBean = new HrmEmpPersTrngDtlsDtlBean(); oHrmEmpPersTrngDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersTrngDtlBean.setTxtNameOfInst(oRow.get("INST_NAME").getString()); oHrmEmpPersTrngDtlBean.setTxtCourseName(oRow.get("CourseName").getString()); oHrmEmpPersTrngDtlBean.setTxtFromDate(EnrgiseUtil.convertToString(oRow.get("START_DATE").getDate())); oHrmEmpPersTrngDtlBean.setTxtToDate(EnrgiseUtil.convertToString(oRow.get("END_DATE").getDate())); oHrmEmpPersTrngDtlBean.setTxtCalendarName(oRow.get("CalName").getString()); if (oRow.get("EMPLOYEE_RATING").getString() != null) { oHrmEmpPersTrngDtlBean.setTxtRating(oRow.get("EMPLOYEE_RATING").getString()); } else { oHrmEmpPersTrngDtlBean.setTxtRating(""); } temp = oRow.get("NONPART_FLAG").getString(); if (temp == null) { oHrmEmpPersTrngDtlBean.setTxtParticipation("Off"); } else if (temp.equalsIgnoreCase("N")) { oHrmEmpPersTrngDtlBean.setTxtParticipation("Off"); } else { oHrmEmpPersTrngDtlBean.setTxtParticipation("On"); } if (oRow.get("NONPART_REASON").getString() != null) { oHrmEmpPersTrngDtlBean.setTxtNonPart(oRow.get("NONPART_REASON").getString()); } else { oHrmEmpPersTrngDtlBean.setTxtNonPart(""); } oHrmEmployeeTrng.add(oHrmEmpPersTrngDtlBean); } return oHrmEmployeeTrng; } public RecordMetaInfo getHrmEmpPersAwardMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersAwardDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersAwardInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeAwd = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersAwardInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeAwd = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersAwardDtlBean oHrmEmpPersAwardDtlBean = new HrmEmpPersAwardDtlBean(); oHrmEmpPersAwardDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersAwardDtlBean.setTxtAwdName(oRow.get("AWARD_NAME").getString()); oHrmEmpPersAwardDtlBean.setTxtAwdYear(oRow.get("AWARD_YEAR").getString()); oHrmEmpPersAwardDtlBean.setTxtAwdField(oRow.get("AWARD_FIELD").getString()); oHrmEmpPersAwardDtlBean.setTxtAwdDate(EnrgiseUtil.convertToString(oRow.get("AWARD_DATE").getDate())); oHrmEmployeeAwd.add(oHrmEmpPersAwardDtlBean); } return oHrmEmployeeAwd; } public RecordMetaInfo getHrmEmpPersInsMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersInsDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersInsInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeIns = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersInsInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeIns = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersInsDtlBean oHrmEmpPersInsDtlBean = new HrmEmpPersInsDtlBean(); oHrmEmpPersInsDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersInsDtlBean.setInvDtls(oRow.get("INVESTMENT_DETAILS").getString()); oHrmEmpPersInsDtlBean.setInvAmount(oRow.get("INVESTMENT_AMOUNT").getString()); oHrmEmpPersInsDtlBean.setInvPolicyNo(oRow.get("POLICY_NO").getString()); oHrmEmpPersInsDtlBean.setInvDate(EnrgiseUtil.convertToString(oRow.get("INVESTMENT_DATE").getDate())); oHrmEmployeeIns.add(oHrmEmpPersInsDtlBean); } return oHrmEmployeeIns; } public RecordMetaInfo getHrmEmpPersHealthMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersHealthCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersHealthInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeHealth = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersHealthInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeHealth = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersHealthBean oHrmEmpPersHealthBean = new HrmEmpPersHealthBean(); oHrmEmpPersHealthBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersHealthBean.setHealthDtls(oRow.get("problem_details").getString()); oHrmEmpPersHealthBean.setHealthStartDate(EnrgiseUtil.convertToString(oRow.get("start_date").getDate())); oHrmEmpPersHealthBean.setHealthEndDate(EnrgiseUtil.convertToString(oRow.get("end_date").getDate())); oHrmEmployeeHealth.add(oHrmEmpPersHealthBean); } return oHrmEmployeeHealth; } public RecordMetaInfo getHrmEmpPersLngMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersLngCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersLngInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeLng = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersLngInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeLng = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersLngDtlBean oHrmEmpPersLngDtlBean = new HrmEmpPersLngDtlBean(); oHrmEmpPersLngDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersLngDtlBean.setLngName(oRow.get("language_name").getString()); oHrmEmpPersLngDtlBean.setLngSpeak(oRow.get("language_speak").getString()); oHrmEmpPersLngDtlBean.setLngRead(oRow.get("language_read").getString()); oHrmEmpPersLngDtlBean.setLngWrite(oRow.get("language_write").getString()); oHrmEmployeeLng.add(oHrmEmpPersLngDtlBean); } return oHrmEmployeeLng; } public RecordMetaInfo getHrmEmpPersRefMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersRefDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersRefInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList oParameters = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList oHrmEmployeeRef = null; oParameters = new ArrayList(); oParameters.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); oParameters.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); oParameters.add(new DBObject(3, 1, 12, lPrimaryKey)); oParameters.add(new DBObject(4, 2, -10)); oParameters.add(new DBObject(5, 2, 12)); oParameters.add(new DBObject(6, 2, 12)); oParameters.add(new DBObject(7, 2, 4)); ArrayList oOutArray = oBean.callProc(oParameters, "HRMEMPPERDTL.procHrmEmpPersRefInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = oOutArray.get(0); ArrayList oList = (ArrayList)oOutObject.getObject(); if (oList.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator oIt = oList.iterator(); String temp = null; while (oIt.hasNext()) { if (count == 0) oHrmEmployeeRef = new ArrayList(); count++; oRow = oIt.next(); HrmEmpPersRefDtlBean oHrmEmpPersRefDtlBean = new HrmEmpPersRefDtlBean(); oHrmEmpPersRefDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersRefDtlBean.setTxtName(oRow.get("REF_NAME").getString()); oHrmEmpPersRefDtlBean.setTxtAddress(oRow.get("ADDRESS").getString()); oHrmEmpPersRefDtlBean.setTxtPositionOccupation(oRow.get("POS_OCCUPATION").getString()); oHrmEmpPersRefDtlBean.setTxtTelephoneNo(oRow.get("PHONE").getString()); oHrmEmployeeRef.add(oHrmEmpPersRefDtlBean); } return oHrmEmployeeRef; } public RecordMetaInfo getHrmEmpPersAssetMetaInfo(String lPrimaryKey) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(2, 2, -5)); arylstParam.add(new DBObject(3, 2, 93)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersAssetDtlsCount(?,?,?,?,?,?)"); RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo(); DBObject oTotalRecord = arylstOutArray.get(0); oRecordMetaInfo.setRecordCount(((Long)oTotalRecord.getObject()).longValue()); DBObject oTimeObject = arylstOutArray.get(1); oRecordMetaInfo.setOWhenPicked((Timestamp)oTimeObject.getObject()); return oRecordMetaInfo; } public ArrayList getHrmEmpPersAssetInfo(String lPrimaryKey, long lDetailFirstPosition, long lDetailLastPosition) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arrEmpPersDtlAsset = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, -5, new Long(lDetailFirstPosition))); arylstParam.add(new DBObject(2, 1, -5, new Long(lDetailLastPosition))); arylstParam.add(new DBObject(3, 1, 12, lPrimaryKey)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procHrmEmpPersAssetInfo(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) throw new EnrgiseApplicationException("wenrgise.hrms.norecordfound", "M"); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { if (count == 0) arrEmpPersDtlAsset = new ArrayList(); count++; oRow = (QueryRow)itrBean.next(); HrmEmpPersAssetDtlBean oHrmEmpPersAssetDtlBean = new HrmEmpPersAssetDtlBean(); oHrmEmpPersAssetDtlBean.setDetailId(oRow.get("ID").getString()); oHrmEmpPersAssetDtlBean.setFullAddress(oRow.get("FULL_ADDR").getString()); oHrmEmpPersAssetDtlBean.setDetailOfProperty(oRow.get("PROP_DTL").getString()); oHrmEmpPersAssetDtlBean.setCostOfConstruction(oRow.get("CONSTRUCTION_COST").getString()); oHrmEmpPersAssetDtlBean.setYearOfPurchase(oRow.get("YEAR_OF_PURCHASE").getString()); oHrmEmpPersAssetDtlBean.setPresentValue(oRow.get("PRESENT_VALUE").getString()); oHrmEmpPersAssetDtlBean.setNameHeld(oRow.get("NAME_HELD").getString()); oHrmEmpPersAssetDtlBean.setHowAquired(oRow.get("HOW_ACQUIRED").getString()); oHrmEmpPersAssetDtlBean.setDetailOfPerson(oRow.get("DTL_PERSON_ACQUIRED").getString()); oHrmEmpPersAssetDtlBean.setTotalIncome(oRow.get("TOTAL_INCOME").getString()); oHrmEmpPersAssetDtlBean.setRemarks(oRow.get("REMARKS").getString()); arrEmpPersDtlAsset.add(oHrmEmpPersAssetDtlBean); } return arrEmpPersDtlAsset; } public void initializeBOImpl() { this.headerTable = "HRM_EMP_PERS"; } public String saveHeaderImpl(BaseHeaderBean oBaseHeaderBean, String ScreenMode) throws EnrgiseSystemException { String returnString = null; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); DateUtility d = new DateUtility(); HrmEmpPersHdrBean oHrmEmpPersHdrBean = (HrmEmpPersHdrBean)oBaseHeaderBean; if (ScreenMode.equalsIgnoreCase("N")) { arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "i")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersHdrBean.getFirstName())); arylstParam.add(new DBObject(3, 1, 12, oHrmEmpPersHdrBean.getMiddleName())); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersHdrBean.getLastName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersHdrBean.getEmployeeNo())); arylstParam.add(new DBObject(6, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(7, 1, 12, this.oUserInfo.getSiteId())); arylstParam.add(new DBObject(8, 1, 12, null)); arylstParam.add(new DBObject(9, 2, 12)); arylstParam.add(new DBObject(10, 2, 12)); arylstParam.add(new DBObject(11, 2, 12)); arylstParam.add(new DBObject(12, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procUpsertHrmEmpPersHdr(?,?,?,?,?,?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); returnString = (String)oOutObject.getObject(); System.out.println(returnString); } else if (ScreenMode.equalsIgnoreCase("U")) { arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "u")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersHdrBean.getFirstName())); arylstParam.add(new DBObject(3, 1, 12, oHrmEmpPersHdrBean.getMiddleName())); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersHdrBean.getLastName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersHdrBean.getEmployeeNo())); arylstParam.add(new DBObject(6, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(7, 1, 12, this.oUserInfo.getSiteId())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersHdrBean.getHeaderPrimaryKey())); arylstParam.add(new DBObject(9, 2, 12)); arylstParam.add(new DBObject(10, 2, 12)); arylstParam.add(new DBObject(11, 2, 12)); arylstParam.add(new DBObject(12, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procUpsertHrmEmpPersHdr(?,?,?,?,?,?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); returnString = (String)oOutObject.getObject(); } return returnString; } public void saveDetailImpl(String sHeaderPrimaryKey, String sScreenName, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { if (sScreenName.equalsIgnoreCase("HrmEmpPersAddDtls")) { saveHrmEmpPDAddDtl(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersJoinInf")) { saveHrmEmpPDJoinDtl(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersEmpHst")) { saveHrmEmpPDEmpHist(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersPFDtls")) { saveHrmEmpPDEmpPF(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersEduDtls")) { saveHrmEmpPDEmpEdu(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersPriorExp")) { saveHrmEmpPDEmpPriorExp(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersAward")) { saveHrmEmpPDAwdDtls(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersIns")) { saveHrmEmpPDInsDtls(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersHealth")) { saveHrmEmpPDHealth(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersLng")) { saveHrmEmpPDLng(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersRef")) { saveHrmEmpPDRefDtls(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersDtls")) { saveHrmEmpPerDtl(sHeaderPrimaryKey, arylstDetailBeanArray); } else if (sScreenName.equalsIgnoreCase("HrmEmpPersAsset")) { saveHrmEmpAssetDtls(sHeaderPrimaryKey, arylstDetailBeanArray); } } private void saveHrmEmpPDAddDtl(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); String metro = null; while (itrBean.hasNext()) { HrmEmpPersAddDtlBean oHrmEmpPersAddDtlBean = itrBean.next(); if (oHrmEmpPersAddDtlBean.getStatus().equals("U") || oHrmEmpPersAddDtlBean.getStatus().equals("N") || oHrmEmpPersAddDtlBean.getStatus().equals("Q")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrEmpPersAdd(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersAddDtlBean.getAddress())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersAddDtlBean.getCity())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersAddDtlBean.getState())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersAddDtlBean.getCountry())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersAddDtlBean.getPinCode())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersAddDtlBean.getPhone())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersAddDtlBean.getExtension())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersAddDtlBean.getSecPhone())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersAddDtlBean.getSecExtension())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersAddDtlBean.getMobileNo())); arylstParam.add(new DBObject(14, 1, 12, oHrmEmpPersAddDtlBean.getEmail())); arylstParam.add(new DBObject(15, 1, 12, oHrmEmpPersAddDtlBean.getFax())); arylstParam.add(new DBObject(16, 1, 12, oHrmEmpPersAddDtlBean.getPrAddress())); arylstParam.add(new DBObject(17, 1, 12, oHrmEmpPersAddDtlBean.getPrCity())); arylstParam.add(new DBObject(18, 1, 12, oHrmEmpPersAddDtlBean.getPrState())); arylstParam.add(new DBObject(19, 1, 12, oHrmEmpPersAddDtlBean.getPrCountry())); arylstParam.add(new DBObject(20, 1, 12, oHrmEmpPersAddDtlBean.getPrPinCode())); arylstParam.add(new DBObject(21, 1, 12, oHrmEmpPersAddDtlBean.getPrPhone())); arylstParam.add(new DBObject(22, 1, 12, oHrmEmpPersAddDtlBean.getPeAddress())); arylstParam.add(new DBObject(23, 1, 12, oHrmEmpPersAddDtlBean.getPeCity())); arylstParam.add(new DBObject(24, 1, 12, oHrmEmpPersAddDtlBean.getPeState())); arylstParam.add(new DBObject(25, 1, 12, oHrmEmpPersAddDtlBean.getPeCountry())); arylstParam.add(new DBObject(26, 1, 12, oHrmEmpPersAddDtlBean.getPePinCode())); arylstParam.add(new DBObject(27, 1, 12, oHrmEmpPersAddDtlBean.getPePhone())); arylstParam.add(new DBObject(28, 1, 12, oHrmEmpPersAddDtlBean.getHtAddress())); arylstParam.add(new DBObject(29, 1, 12, oHrmEmpPersAddDtlBean.getHtCity())); arylstParam.add(new DBObject(30, 1, 12, oHrmEmpPersAddDtlBean.getHtState())); arylstParam.add(new DBObject(31, 1, 12, oHrmEmpPersAddDtlBean.getHtCountry())); arylstParam.add(new DBObject(32, 1, 12, oHrmEmpPersAddDtlBean.getHtPinCode())); arylstParam.add(new DBObject(33, 1, 12, oHrmEmpPersAddDtlBean.getHtPhone())); arylstParam.add(new DBObject(34, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(35, 1, 12, this.oUserInfo.getSiteId())); arylstParam.add(new DBObject(36, 1, 12, oHrmEmpPersAddDtlBean.getDistrict())); arylstParam.add(new DBObject(37, 1, 12, oHrmEmpPersAddDtlBean.getTehsil())); arylstParam.add(new DBObject(38, 1, 12, oHrmEmpPersAddDtlBean.getPrDistrict())); arylstParam.add(new DBObject(39, 1, 12, oHrmEmpPersAddDtlBean.getPrTehsil())); arylstParam.add(new DBObject(40, 1, 12, oHrmEmpPersAddDtlBean.getPeDistrict())); arylstParam.add(new DBObject(41, 1, 12, oHrmEmpPersAddDtlBean.getPeTehsil())); arylstParam.add(new DBObject(42, 1, 12, oHrmEmpPersAddDtlBean.getHtDistrict())); arylstParam.add(new DBObject(43, 1, 12, oHrmEmpPersAddDtlBean.getHtTehsil())); oBean.addToBatch(arylstParam); } } if (bUpdate) oBean.executeBatch(); } private void saveHrmEmpPDJoinDtl(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfDtlBean = itrBean.next(); if (oHrmEmpPersJoinInfDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersJoinInf(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersJoinInfDtlBean.getCompJoiningDate()))); arylstParam.add(new DBObject(5, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersJoinInfDtlBean.getTentativeConfDate()))); arylstParam.add(new DBObject(6, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersJoinInfDtlBean.getRetirementDate()))); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersJoinInfDtlBean.getBaseSiteId())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersJoinInfDtlBean.getBankCode())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersJoinInfDtlBean.getEntryModeCode())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersJoinInfDtlBean.getAccountNumber())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersJoinInfDtlBean.getEmployeeStatusCode())); arylstParam.add(new DBObject(12, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersJoinInfDtlBean.getStatusEffectDate()))); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersJoinInfDtlBean.getSeparationId())); arylstParam.add(new DBObject(14, 1, 12, oHrmEmpPersJoinInfDtlBean.getBranchName())); arylstParam.add(new DBObject(15, 1, 12, oHrmEmpPersJoinInfDtlBean.getBankId())); arylstParam.add(new DBObject(16, 1, 12, oHrmEmpPersJoinInfDtlBean.getCostId())); arylstParam.add(new DBObject(17, 1, 12, oHrmEmpPersJoinInfDtlBean.getAccSiteId())); arylstParam.add(new DBObject(18, 1, 12, oHrmEmpPersJoinInfDtlBean.getPaymentType())); arylstParam.add(new DBObject(19, 1, 12, oHrmEmpPersJoinInfDtlBean.getJobRespId())); arylstParam.add(new DBObject(20, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(21, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); } } if (bUpdate) oBean.executeBatch(); } private void saveHrmEmpPDEmpHist(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException {} private void saveHrmEmpPDEmpPF(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersPFDtlBean oHrmEmpPersPFDtlBean = itrBean.next(); if (oHrmEmpPersPFDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersPF(?,?,?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersPFDtlBean.getTxtRelationId())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersPFDtlBean.getTxtDob())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersPFDtlBean.getTxtAddress())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersPFDtlBean.getTxtPercentage())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersPFDtlBean.getTxtTotalAmount())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersPFDtlBean.getTxtMinorDetails())); arylstParam.add(new DBObject(10, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(11, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersPFDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersPF(?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersPFDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersPFDtlBean.getTxtRelationId())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersPFDtlBean.getTxtDob())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersPFDtlBean.getTxtAddress())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersPFDtlBean.getTxtPercentage())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersPFDtlBean.getTxtTotalAmount())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersPFDtlBean.getTxtMinorDetails())); arylstParam.add(new DBObject(10, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(11, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersPFDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersPF(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersPFDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPDEmpEdu(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean = itrBean.next(); if (oHrmEmpPersEduDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersEdu(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersEduDtlBean.getTxtSrlNo())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersEduDtlBean.getTxtSchoolColInst())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersEduDtlBean.getTxtQualificationId())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersEduDtlBean.getTxtPercentageDivision())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersEduDtlBean.getTxtPassYear())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersEduDtlBean.getTxtMajorSubjects())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersEduDtlBean.getTxtSpecialisation())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersEduDtlBean.getTxtOtherProfQualification())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersEduDtlBean.getTxtSpecialisedCourses())); arylstParam.add(new DBObject(13, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(14, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersEduDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersEdu(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersEduDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersEduDtlBean.getTxtSrlNo())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersEduDtlBean.getTxtSchoolColInst())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersEduDtlBean.getTxtQualificationId())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersEduDtlBean.getTxtPercentageDivision())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersEduDtlBean.getTxtPassYear())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersEduDtlBean.getTxtMajorSubjects())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersEduDtlBean.getTxtSpecialisation())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersEduDtlBean.getTxtOtherProfQualification())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersEduDtlBean.getTxtSpecialisedCourses())); arylstParam.add(new DBObject(13, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(14, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); } private void saveHrmEmpPDEmpPriorExp(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; String sWorkExp = new String(); ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = itrBean.next(); sWorkExp = CalculateWorkExp(oHrmEmpPersPriorExpDtlBean); if (oHrmEmpPersPriorExpDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersPriorExp(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtFromDate())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtToDate())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOrgName())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOrgAdd())); arylstParam.add(new DBObject(8, 1, 12, sWorkExp)); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtDesignation())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtReportTo())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtJobDesc())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtPersonnelSupervised())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtSalStarting())); arylstParam.add(new DBObject(14, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtSalLeaving())); arylstParam.add(new DBObject(15, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtBasic())); arylstParam.add(new DBObject(16, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtDa())); arylstParam.add(new DBObject(17, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtHra())); arylstParam.add(new DBObject(18, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtConveyance())); arylstParam.add(new DBObject(19, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOtherAllowance())); arylstParam.add(new DBObject(20, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtIncentives())); arylstParam.add(new DBObject(21, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtBonus())); arylstParam.add(new DBObject(22, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(23, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersPriorExpDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersPriorExp(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersPriorExpDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtFromDate())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtToDate())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOrgName())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOrgAdd())); arylstParam.add(new DBObject(8, 1, 12, sWorkExp)); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtDesignation())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtReportTo())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtJobDesc())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtPersonnelSupervised())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtSalStarting())); arylstParam.add(new DBObject(14, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtSalLeaving())); arylstParam.add(new DBObject(15, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtBasic())); arylstParam.add(new DBObject(16, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtDa())); arylstParam.add(new DBObject(17, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtHra())); arylstParam.add(new DBObject(18, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtConveyance())); arylstParam.add(new DBObject(19, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtOtherAllowance())); arylstParam.add(new DBObject(20, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtIncentives())); arylstParam.add(new DBObject(21, 1, 12, oHrmEmpPersPriorExpDtlBean.getTxtBonus())); arylstParam.add(new DBObject(22, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(23, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersPriorExpDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersPriorExp(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersPriorExpDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private String CalculateWorkExp(HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean) throws EnrgiseSystemException { ArrayList oList = new ArrayList(); int iFromDate = 0; int iFromYear = 0; int iToDate = 0; int iToYear = 0; int iExp = 0; int iNewToDate = 0; if (EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtFromDate())) { iFromDate = Integer.parseInt(oHrmEmpPersPriorExpDtlBean.getTxtFromDate().substring(0, 2)); iFromYear = Integer.parseInt(oHrmEmpPersPriorExpDtlBean.getTxtFromDate().substring(2, 6)); } if (EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtToDate())) { iToDate = Integer.parseInt(oHrmEmpPersPriorExpDtlBean.getTxtToDate().substring(0, 2)); iToYear = Integer.parseInt(oHrmEmpPersPriorExpDtlBean.getTxtToDate().substring(2, 6)); } if (iToDate < iFromDate) { iNewToDate = iToDate + 12; if (iToYear > iFromYear) { iExp = (iToYear - iFromYear) * 12 + iNewToDate - iFromDate - 12; } else if (iToYear == iFromYear) { iExp = iNewToDate - iFromDate; } } else if (iToDate > iFromDate) { if (iToYear > iFromYear) { iExp = (iToYear - iFromYear) * 12 + iToDate - iFromDate; } else if (iToYear == iFromYear) { iExp = iToDate - iFromDate; } } else if (iFromDate == iToDate) { if (iToYear > iFromYear) { iExp = (iToYear - iFromYear) * 12; } else if (iToYear == iFromYear) { iExp = iFromDate - iToDate; } } return String.valueOf(iExp); } private void saveHrmEmpPDAwdDtls(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersAwardDtlBean oHrmEmpPersAwardDtlBean = itrBean.next(); if (oHrmEmpPersAwardDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersAwd(?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdYear())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdField())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdDate())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersAwardDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersAwd(?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersAwardDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdYear())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdField())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersAwardDtlBean.getTxtAwdDate())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersAwardDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersAwd(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersAwardDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPDInsDtls(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersInsDtlBean oHrmEmpPersInsDtlBean = itrBean.next(); if (oHrmEmpPersInsDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersIns(?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersInsDtlBean.getInvDtls())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersInsDtlBean.getInvAmount())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersInsDtlBean.getInvPolicyNo())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersInsDtlBean.getInvDate())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersInsDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersIns(?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersInsDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersInsDtlBean.getInvDtls())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersInsDtlBean.getInvAmount())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersInsDtlBean.getInvPolicyNo())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersInsDtlBean.getInvDate())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersInsDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersIns(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersInsDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPDHealth(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersHealthBean oHrmEmpPersHealthBean = itrBean.next(); if (oHrmEmpPersHealthBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersHealth(?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersHealthBean.getHealthDtls())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersHealthBean.getHealthStartDate())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersHealthBean.getHealthEndDate())); arylstParam.add(new DBObject(7, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersHealthBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersHealth(?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersHealthBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersHealthBean.getHealthDtls())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersHealthBean.getHealthStartDate())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersHealthBean.getHealthEndDate())); arylstParam.add(new DBObject(7, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersHealthBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersHealth(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersHealthBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPDLng(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersLngDtlBean oHrmEmpPersLngDtlBean = itrBean.next(); if (oHrmEmpPersLngDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersLng(?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersLngDtlBean.getLngName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersLngDtlBean.getLngSpeak())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersLngDtlBean.getLngRead())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersLngDtlBean.getLngWrite())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersLngDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersLng(?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersLngDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersLngDtlBean.getLngName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersLngDtlBean.getLngSpeak())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersLngDtlBean.getLngRead())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersLngDtlBean.getLngWrite())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersLngDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersLng(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersLngDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPDRefDtls(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersRefDtlBean oHrmEmpPersRefDtlBean = itrBean.next(); if (oHrmEmpPersRefDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersRef(?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersRefDtlBean.getTxtName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersRefDtlBean.getTxtAddress())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersRefDtlBean.getTxtPositionOccupation())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersRefDtlBean.getTxtTelephoneNo())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersRefDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersRef(?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersRefDtlBean.getDetailId())); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersRefDtlBean.getTxtName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersRefDtlBean.getTxtAddress())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersRefDtlBean.getTxtPositionOccupation())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersRefDtlBean.getTxtTelephoneNo())); arylstParam.add(new DBObject(8, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(9, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersRefDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersRef(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersRefDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpAssetDtls(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersAssetDtlBean oHrmEmpPersAssetDtlBean = itrBean.next(); if (oHrmEmpPersAssetDtlBean.getStatus().equals("N")) { if (!bInsert) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersAsset(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bInsert = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "I")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersAssetDtlBean.getFullAddress())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersAssetDtlBean.getDetailOfProperty())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersAssetDtlBean.getCostOfConstruction())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersAssetDtlBean.getYearOfPurchase())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersAssetDtlBean.getPresentValue())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersAssetDtlBean.getNameHeld())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersAssetDtlBean.getHowAquired())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersAssetDtlBean.getDetailOfPerson())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersAssetDtlBean.getTotalIncome())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersAssetDtlBean.getRemarks())); arylstParam.add(new DBObject(14, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(15, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersAssetDtlBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersAsset(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, oHrmEmpPersAssetDtlBean.getDetailId())); String S = oHrmEmpPersAssetDtlBean.getDetailId(); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersAssetDtlBean.getFullAddress())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersAssetDtlBean.getDetailOfProperty())); arylstParam.add(new DBObject(6, 1, 12, oHrmEmpPersAssetDtlBean.getCostOfConstruction())); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersAssetDtlBean.getYearOfPurchase())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersAssetDtlBean.getPresentValue())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersAssetDtlBean.getNameHeld())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersAssetDtlBean.getHowAquired())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersAssetDtlBean.getDetailOfPerson())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersAssetDtlBean.getTotalIncome())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersAssetDtlBean.getRemarks())); arylstParam.add(new DBObject(14, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(15, 1, 12, this.oUserInfo.getSiteId())); oBean.addToBatch(arylstParam); continue; } if (oHrmEmpPersAssetDtlBean.getStatus().equals("D")) { if (!bDelete) { oBean1 = new DBUtilitiesBean(); oBean1.createBatch("HRMEMPPERDTL.procDeleteHrmEmpPersAsset(?)"); bDelete = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersAssetDtlBean.getDetailId())); oBean1.addToBatch(arylstParam); } } if (bInsert) oBean.executeBatch(); if (bUpdate) oBean.executeBatch(); if (bDelete) oBean1.executeBatch(); } private void saveHrmEmpPerDtl(String sHeaderPrimaryKey, ArrayList arylstDetailBeanArray) throws EnrgiseSystemException { boolean bInsert = false; boolean bUpdate = false; boolean bDelete = false; String sScale = new String(); ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = null; DBUtilitiesBean oBean1 = null; Iterator itrBean = arylstDetailBeanArray.iterator(); while (itrBean.hasNext()) { HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = itrBean.next(); if (oHrmEmpPersDtlsBean.getStatus().equals("U")) { if (!bUpdate) { oBean = new DBUtilitiesBean(); oBean.createBatch("HRMEMPPERDTL.procUpsertHrmEmpPersDtls(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); bUpdate = true; } arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, "U")); arylstParam.add(new DBObject(2, 1, 12, null)); arylstParam.add(new DBObject(3, 1, 12, sHeaderPrimaryKey)); arylstParam.add(new DBObject(4, 1, 12, oHrmEmpPersDtlsBean.getGuardianName())); arylstParam.add(new DBObject(5, 1, 12, oHrmEmpPersDtlsBean.getMotherTongueCode())); arylstParam.add(new DBObject(6, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getDateOfBirth()))); arylstParam.add(new DBObject(7, 1, 12, oHrmEmpPersDtlsBean.getNationalityCode())); arylstParam.add(new DBObject(8, 1, 12, oHrmEmpPersDtlsBean.getBloodGroup())); arylstParam.add(new DBObject(9, 1, 12, oHrmEmpPersDtlsBean.getSex())); arylstParam.add(new DBObject(10, 1, 12, oHrmEmpPersDtlsBean.getMaritalCode())); arylstParam.add(new DBObject(11, 1, 12, oHrmEmpPersDtlsBean.getDependants())); arylstParam.add(new DBObject(12, 1, 12, oHrmEmpPersDtlsBean.getDepartmentId())); arylstParam.add(new DBObject(13, 1, 12, oHrmEmpPersDtlsBean.getDesignationId())); arylstParam.add(new DBObject(14, 1, 12, oHrmEmpPersDtlsBean.getSocialStatusId())); arylstParam.add(new DBObject(15, 1, 12, oHrmEmpPersDtlsBean.getReligionId())); arylstParam.add(new DBObject(16, 1, 12, oHrmEmpPersDtlsBean.getGradeId())); arylstParam.add(new DBObject(17, 1, 12, oHrmEmpPersDtlsBean.getHandicappedFlag())); arylstParam.add(new DBObject(18, 1, 12, null)); arylstParam.add(new DBObject(19, 1, 12, oHrmEmpPersDtlsBean.getPanNumber())); arylstParam.add(new DBObject(20, 1, 12, oHrmEmpPersDtlsBean.getGirNumber())); arylstParam.add(new DBObject(21, 1, 12, oHrmEmpPersDtlsBean.getPfNumber())); arylstParam.add(new DBObject(22, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getLastPromotionDate()))); arylstParam.add(new DBObject(23, 1, 12, oHrmEmpPersDtlsBean.getReportingEmpId())); arylstParam.add(new DBObject(24, 1, 12, oHrmEmpPersDtlsBean.getPassportNo())); arylstParam.add(new DBObject(25, 1, 12, oHrmEmpPersDtlsBean.getPlaceOfIssue())); arylstParam.add(new DBObject(26, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getPassportExpDate()))); arylstParam.add(new DBObject(27, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getPassportIssueDate()))); arylstParam.add(new DBObject(28, 1, 12, String.valueOf(oHrmEmpPersDtlsBean.getRelatedToEmployee()).equalsIgnoreCase("on") ? "Y" : "N")); arylstParam.add(new DBObject(29, 1, 12, oHrmEmpPersDtlsBean.getRelatedEmpId())); arylstParam.add(new DBObject(30, 1, 12, oHrmEmpPersDtlsBean.getSpouseName())); arylstParam.add(new DBObject(31, 1, 12, oHrmEmpPersDtlsBean.getSpouseOccupation())); arylstParam.add(new DBObject(32, 1, 12, oHrmEmpPersDtlsBean.getDrivingLicenseNo())); arylstParam.add(new DBObject(33, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getValidUpto()))); arylstParam.add(new DBObject(34, 1, 12, oHrmEmpPersDtlsBean.getIdMark())); arylstParam.add(new DBObject(35, 1, 12, oHrmEmpPersDtlsBean.getPlaceOfBirth())); arylstParam.add(new DBObject(36, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getLocJoiningDate()))); arylstParam.add(new DBObject(37, 1, 12, oHrmEmpPersDtlsBean.getLocationId())); arylstParam.add(new DBObject(38, 1, 12, oHrmEmpPersDtlsBean.getMobile())); arylstParam.add(new DBObject(39, 1, 12, oHrmEmpPersDtlsBean.getPersonalEmail())); arylstParam.add(new DBObject(40, 1, 12, String.valueOf(oHrmEmpPersDtlsBean.getFlat()).equalsIgnoreCase("on") ? "Y" : "N")); arylstParam.add(new DBObject(41, 1, 93, EnrgiseUtil.convertToSqlDate(oHrmEmpPersDtlsBean.getAnniversaryDate()))); arylstParam.add(new DBObject(42, 1, 12, oHrmEmpPersDtlsBean.getMotherName())); arylstParam.add(new DBObject(43, 1, 12, oHrmEmpPersDtlsBean.getScsmemershipNo())); arylstParam.add(new DBObject(44, 1, 12, oHrmEmpPersDtlsBean.getGunLicenseNo())); arylstParam.add(new DBObject(45, 1, 12, oHrmEmpPersDtlsBean.getGunLicenseRenDate())); arylstParam.add(new DBObject(46, 1, 12, oHrmEmpPersDtlsBean.getSpouseOrganization())); arylstParam.add(new DBObject(47, 1, 12, oHrmEmpPersDtlsBean.getSpOrgType())); arylstParam.add(new DBObject(48, 1, 12, oHrmEmpPersDtlsBean.getSpTransferable())); arylstParam.add(new DBObject(49, 1, 12, oHrmEmpPersDtlsBean.getClubMembership())); arylstParam.add(new DBObject(50, 1, 12, oHrmEmpPersDtlsBean.getUnionInfo())); arylstParam.add(new DBObject(51, 1, 12, this.oUserInfo.getUserTypeId())); arylstParam.add(new DBObject(52, 1, 12, this.oUserInfo.getSiteId())); arylstParam.add(new DBObject(53, 1, 12, oHrmEmpPersDtlsBean.getAadharInfo())); arylstParam.add(new DBObject(54, 1, 12, oHrmEmpPersDtlsBean.getUanInfo())); oBean.addToBatch(arylstParam); } } if (bUpdate) oBean.executeBatch(); } public void updateHeaderImpl(BaseHeaderBean oBaseHeaderBean) throws EnrgiseSystemException {} public String saveNewHeaderImpl(BaseHeaderBean oBaseHeaderBean) throws EnrgiseSystemException { return new String(); } public void additionalFieldValidationImpl(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList arylstDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); HrmEmpPersHdrBean oHrmEmpPersHdrBean = (HrmEmpPersHdrBean)oBaseHeaderBean; if (bHeaderDataChanged) if (!sScreenMode.equalsIgnoreCase("D")); if (bDetailDataChanged) if (!sScreenMode.equalsIgnoreCase("D")) { if (sScreenName.equalsIgnoreCase("HrmEmpPersDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = itrBean1.next(); if (!oHrmEmpPersDtlsBean.getStatus().equalsIgnoreCase("D")) checkMandatoryPersDtls(oHrmEmpPersDtlsBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersAddDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersAddDtlBean oHrmEmpPersAddDtlBean = itrBean1.next(); if (!oHrmEmpPersAddDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryAddrDtls(oHrmEmpPersAddDtlBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersJoinInf")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfDtlBean = itrBean1.next(); if (!oHrmEmpPersJoinInfDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryJoinInfDtls(oHrmEmpPersJoinInfDtlBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersEduDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean = itrBean1.next(); if (!oHrmEmpPersEduDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryEduDtls(oHrmEmpPersEduDtlBean, rowCount); } rowCount++; } int percentPF = 0; if (sScreenName.equalsIgnoreCase("HrmEmpPersPFDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPFDtlBean oHrmEmpPersPFDtlBean = itrBean1.next(); if (!oHrmEmpPersPFDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryPFDtls(oHrmEmpPersPFDtlBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersTrngDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersTrngDtlsDtlBean oHrmEmpPersTrngDtlsDtlBean = itrBean1.next(); if (!oHrmEmpPersTrngDtlsDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryTrngDtls(oHrmEmpPersTrngDtlsDtlBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersPriorExp")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = itrBean1.next(); if (!oHrmEmpPersPriorExpDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryPriExpDtls(oHrmEmpPersPriorExpDtlBean, rowCount); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersRef")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersRefDtlBean oHrmEmpPersRefDtlBean = itrBean1.next(); if (!oHrmEmpPersRefDtlBean.getStatus().equalsIgnoreCase("D")) checkMandatoryRefDtls(oHrmEmpPersRefDtlBean, rowCount); } rowCount++; } } } private void checkMandatoryHeader(HrmEmpPersHdrBean oHrmEmpPersHdrBean) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oParams = new ArrayList(); ArrayList oErrorList = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersHdrBean.getEmployeeNo())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.employeeNo"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.header.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersHdrBean.getFirstName())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.firstName"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.header.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersHdrBean.getLastName())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.lastName"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.header.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } private void checkMandatoryPersDtls(HrmEmpPersDtlsBean oHrmEmpPersDtlsBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getMotherTongue())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.motherTongue"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getDateOfBirth())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.dateOfBirth"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getNationality())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.nationality"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getSex())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.sex"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getMaritalStatus())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.maritalStatus"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getReligion())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.religion"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getGrade())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.grade"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getReportingEmployee())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetails.reportingEmployee"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy"); DateUtility d = new DateUtility(); System.out.println(d.getSysDate()); HrmCommonBO oBO = new HrmCommonBO(); String sysDate = oBO.getddmmmyyyyDateFormat(d.getSysDate()); int dateFlag = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersDtlsBean.getDateOfBirth(), sysDate); if (dateFlag == 1 && dateFlag != -2) oErrorList.add(new EnrgiseApplicationException("wenrgise.dateOfBirth.dateConstraintViolated")); reportError(oErrorList); } private void checkMandatoryAddrDtls(HrmEmpPersAddDtlBean oHrmEmpPersAddDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getCity())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.city"); oParams = new ArrayList(); oParams.add("Office Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getAddress())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.address"); oParams = new ArrayList(); oParams.add("Office Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getState())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.state"); oParams = new ArrayList(); oParams.add("Office Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getCountry())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.country"); oParams = new ArrayList(); oParams.add("Office Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPrAddress())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.prAddress"); oParams = new ArrayList(); oParams.add("Present Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPrCity())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.prCity"); oParams = new ArrayList(); oParams.add("Present Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPrState())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.prState"); oParams = new ArrayList(); oParams.add("Present Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPrCountry())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.prCountry"); oParams = new ArrayList(); oParams.add("Present Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPeAddress())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.peAddress"); oParams = new ArrayList(); oParams.add("Permanent Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPeCity())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.peCity"); oParams = new ArrayList(); oParams.add("Permanent Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPeState())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.peState"); oParams = new ArrayList(); oParams.add("Permanent Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersAddDtlBean.getPeCountry())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsAddress.peCountry"); oParams = new ArrayList(); oParams.add("Home Town Address"); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetailAdd.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } private void checkMandatoryJoinInfDtls(HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getCompJoiningDate())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsJoinInf.compJoiningDate"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getEmployeeStatus())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsJoinInf.employeeStatus"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getPlaceOfInitialPosting())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsJoinInf.placeOfInitialPosting"); oParams = new ArrayList(); oParams.add(oMessageKey); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.onlyDetail.mandatoryFieldMissing", oParams, "E")); } DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy"); int dateFlag = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersJoinInfDtlBean.getCompJoiningDate(), oHrmEmpPersJoinInfDtlBean.getRetirementDate()); if (dateFlag == 1 && dateFlag != -2) oErrorList.add(new EnrgiseApplicationException("wenrgise.retirementDate.dateConstraintViolated")); dateFlag = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersJoinInfDtlBean.getCompJoiningDate(), oHrmEmpPersJoinInfDtlBean.getTentativeConfDate()); if (dateFlag == 1 && dateFlag != -2) oErrorList.add(new EnrgiseApplicationException("wenrgise.confDate.dateConstraintViolated")); reportError(oErrorList); } private void checkMandatoryEduDtls(HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersEduDtlBean.getTxtSchoolColInst())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsEdu.schoolColInst"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersEduDtlBean.getTxtExamDegreePassed())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsEdu.examDegreePassed"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersEduDtlBean.getTxtPercentageDivision())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsEdu.percentageDivision"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersEduDtlBean.getTxtPassYear())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsEdu.passYear"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } private void checkMandatoryPFDtls(HrmEmpPersPFDtlBean oHrmEmpPersPFDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersPFDtlBean.getTxtNomineeName())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPF.nomineeName"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersPFDtlBean.getTxtDob())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPF.dob"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersPFDtlBean.getTxtPercentage())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPF.percentage"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } private void checkMandatoryTrngDtls(HrmEmpPersTrngDtlsDtlBean oHrmEmpPersTrngDtlsDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList arylstErrorList = new ArrayList(); } private void checkMandatoryPriExpDtls(HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtOrgName())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPriorExp.orgName"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtOrgAdd())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPriorExp.orgAdd"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtFromDate())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPriorExp.fromDate"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersPriorExpDtlBean.getTxtToDate())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsPriorExp.toDate"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } private void checkMandatoryRefDtls(HrmEmpPersRefDtlBean oHrmEmpPersRefDtlBean, int rowCount) throws EnrgiseSystemException, EnrgiseApplicationException { ArrayList oErrorList = new ArrayList(); ArrayList oParams = new ArrayList(); if (!EnrgiseUtil.checkString(oHrmEmpPersRefDtlBean.getTxtName())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsRef.name"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } if (!EnrgiseUtil.checkString(oHrmEmpPersRefDtlBean.getTxtAddress())) { MessageKey oMessageKey = new MessageKey("hrm.HrmEmpPersonalDetailsRef.address"); oParams = new ArrayList(); oParams.add(oMessageKey); oParams.add(String.valueOf(rowCount)); oErrorList.add(new EnrgiseMessageKeyException("wenrgise.common.detail.mandatoryFieldMissing", oParams, "E")); } reportError(oErrorList); } public void additionalTimestampValidationImpl(BaseHeaderBean param1, Timestamp param2, String param3, String param4, boolean param5, ArrayList param6, boolean param7, Timestamp param8) {} public void additionalBusinessValidationImpl(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList arylstDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstErrorList = new ArrayList(); additionalFieldValidationImpl(oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, arylstDetailBeanArray, bDetailDataChanged, oDetailPicked); HrmEmpPersHdrBean oHrmEmpPersHdrBean = (HrmEmpPersHdrBean)oBaseHeaderBean; if (bHeaderDataChanged) if (!sScreenMode.equalsIgnoreCase("D")) checkUniqueHeader((HrmEmpPersHdrBean)oBaseHeaderBean); if (bDetailDataChanged) { int percentPF = 0; if (sScreenName.equalsIgnoreCase("HrmEmpPersPFDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPFDtlBean oHrmEmpPersPFDtlBean = itrBean1.next(); if (!oHrmEmpPersPFDtlBean.getStatus().equals("D")) { EnrgiseUtil.checkDuplicate(arylstDetailBeanArray, "txtRelationId", "hrm.HrmEmpPersonalDetailsPF.nomineeName", arylstErrorList, true); percentPF += Integer.parseInt(oHrmEmpPersPFDtlBean.getTxtPercentage()); } } if (percentPF > 100) arylstErrorList.add(new EnrgiseApplicationException("wenrgise.hrmEmpPers.error.PFpercent")); if (percentPF < 100) arylstErrorList.add(new EnrgiseApplicationException("wenrgise.hrmEmpPers.error.PFpercent")); rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersEduDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean = itrBean1.next(); if (!oHrmEmpPersEduDtlBean.getStatus().equals("D")) { checkPercentage(arylstDetailBeanArray); getyyyyDateFormat(arylstDetailBeanArray); } } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersPriorExp")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = itrBean1.next(); if (!oHrmEmpPersPriorExpDtlBean.getStatus().equals("D")) checkDateValidation(arylstDetailBeanArray, arylstErrorList); } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersJoinInf")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfoDtlBean = itrBean1.next(); if (!oHrmEmpPersJoinInfoDtlBean.getStatus().equals("D")) { checkDateValidationJoin(arylstDetailBeanArray, arylstErrorList); checkBaseSiteId(oHrmEmpPersHdrBean, arylstErrorList); } } rowCount++; } if (sScreenName.equalsIgnoreCase("HrmEmpPersDtls")) { Iterator itrBean1 = arylstDetailBeanArray.iterator(); int rowCount = 1; while (itrBean1.hasNext()) { HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = itrBean1.next(); if (!oHrmEmpPersDtlsBean.getStatus().equals("D")) { checkDateValidationPers(arylstDetailBeanArray, arylstErrorList); checkAadharUanValidationPers(arylstDetailBeanArray, arylstErrorList); } } rowCount++; } } if (!oHrmEmpPersHdrBean.getDraftSave().equalsIgnoreCase("true")) finalSave(oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, arylstDetailBeanArray, bDetailDataChanged, oDetailPicked); reportError(arylstErrorList); } private void checkPercentage(ArrayList arylstDetailBeanArray) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstList = new ArrayList(); ArrayList arylstParam = new ArrayList(); int count = 0; Iterator itrBean = arylstDetailBeanArray.iterator(); int totalDuration = 0; while (itrBean.hasNext()) { HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean = arylstDetailBeanArray.get(count); if (EnrgiseUtil.checkString(oHrmEmpPersEduDtlBean.getTxtPercentageDivision())) { float fPercent = Float.parseFloat(oHrmEmpPersEduDtlBean.getTxtPercentageDivision()); if (fPercent > 100) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetailsEdu.checkPercent", arylstParam)); } } count++; itrBean.next(); } reportError(arylstList); } private void checkUniqueHeader(HrmEmpPersHdrBean oHrmEmpPersHdrBean) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstList1 = new ArrayList(); ArrayList arylstParam = new ArrayList(); String sQuery = String.valueOf(String.valueOf(" Select ID as ID from HRM_EMP_PERS where EMP_NO='").concat(String.valueOf(oHrmEmpPersHdrBean.getEmployeeNo()))).concat(String.valueOf("'")); System.out.println(sQuery); DBUtilitiesBean oBean = new DBUtilitiesBean(); ArrayList arylstList = oBean.executeQuery(sQuery); Iterator itrBean = arylstList.iterator(); if (itrBean.hasNext()) { QueryRow oRow = itrBean.next(); if (!oRow.get("ID").getString().equalsIgnoreCase(oHrmEmpPersHdrBean.getHeaderPrimaryKey())) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstList1.add(new EnrgiseMessageKeyException("wenrgise.common.uniqueConstraintViolated", arylstParam)); } } reportError(arylstList1); } public LovVO getHrmEmpPersDtlsEmpNoLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); String sEmpId = null; if (oLovQueryVO.getProperty("employeeId") != null) sEmpId = oLovQueryVO.getProperty("employeeId"); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.employeeNo"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.firstName"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.middleName"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.lastName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 1, 12, sEmpId)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMaintEmpLOVdata(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("EMP_NO").getString()); oLOVBean.setDetailField3(oRow.get("FIRST_NAME").getString()); oLOVBean.setDetailField4(oRow.get("MIDDLE_NAME").getString()); oLOVBean.setDetailField5(oRow.get("LAST_NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsGradeLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.level"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntGrdLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); oLOVBean.setDetailField4(oRow.get("HIERARCHY_LEVEL").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsDesigLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("DESGN_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.level"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntDsgnLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("DESGN_ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); oLOVBean.setDetailField4(oRow.get("HIERARCHY_LEVEL").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsDeptLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.level"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntDeptLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); oLOVBean.setDetailField4(oRow.get("HEIRARCHY_LEVEL").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsNationalityLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("GLOBAL_CODE_TYPE"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntNatLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("GLOBAL_CODE_TYPE").getString()); oLOVBean.setDetailField2(oRow.get("GLOBAL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("GLOBAL_CODE_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsReligionLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.religion"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntRelLOVdata(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("DESCRIPTION").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsMotTngLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntLngLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("DESCRIPTION").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsMaritalStatusLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("GLOBAL_CODE_TYPE"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntMarLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("GLOBAL_CODE_TYPE").getString()); oLOVBean.setDetailField2(oRow.get("GLOBAL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("GLOBAL_CODE_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsSocialStatusLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.desc"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.level"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntRsvLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); oLOVBean.setDetailField4(oRow.get("HIERARCHY_LEVEL").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsRepEmpLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.employeeName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); String empId = null; String sLevel = null; DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getProperty("empNumberId") != null) empId = oLovQueryVO.getProperty("empNumberId"); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, empId)); arylstParam.add(new DBObject(3, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetRptEmpNoLOV(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("EMPID").getString()); oLOVBean.setDetailField2(oRow.get("EMPNAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersDtlsRelatedEmpLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetails.employeeName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); String empId = null; String sLevel = null; DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetRelatedEmpNoLOV(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("EMPID").getString()); oLOVBean.setDetailField2(oRow.get("EMPNAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersAddDtlsStateLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("GLOBAL_CODE_TYPE"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntStateLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("GLOBAL_CODE_TYPE").getString()); oLOVBean.setDetailField2(oRow.get("GLOBAL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("GLOBAL_CODE_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersAddDtlsCountryLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("COUNTRY_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntCntryLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("COUNTRY_ID").getString()); oLOVBean.setDetailField2(oRow.get("COUNTRY_CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersAddDtlsDistrictLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("DISTRICT_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntDistLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("DISTRICT_ID").getString()); oLOVBean.setDetailField2(oRow.get("DISTRICT_CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersAddDtlsTehsilLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("TEHSIL_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsAddress.desc"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntTehLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("TEHSIL_ID").getString()); oLOVBean.setDetailField2(oRow.get("TEHSIL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfBaseSiteLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.siteCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.siteName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmBaseSiteLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfEntryLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("GLOBAL_CODE_TYPE"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.description"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntEntryLOVdata(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("GLOBAL_CODE_TYPE").getString()); oLOVBean.setDetailField2(oRow.get("GLOBAL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("GLOBAL_CODE_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfStatusLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("GLOBAL_CODE_TYPE"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.code"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.description"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntStatusLOVdata(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("GLOBAL_CODE_TYPE").getString()); oLOVBean.setDetailField2(oRow.get("GLOBAL_CODE").getString()); oLOVBean.setDetailField3(oRow.get("GLOBAL_CODE_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfSepTypeLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("SRL_NO"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.separationCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.description"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.proc_GetHrmEmpMntSepLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("SEPARATION_CODE").getString()); oLOVBean.setDetailField3(oRow.get("DESCRIPTION").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfCostCentreLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("COST_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.costCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.description"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpMntCostLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("COST_ID").getString()); oLOVBean.setDetailField2(oRow.get("COST_CODE").getString()); oLOVBean.setDetailField3(oRow.get("COST_DESC").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfBankLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("COST_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.bankCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.bank"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.branchName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetEmpPersJoinBankLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("BANK").getString()); oLOVBean.setDetailField4(oRow.get("BRANCH").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersJoinInfJobRespLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("JOB_RESP_ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsJoinInf.responsibility"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetEmpPersJoinJobRespLOV(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("CODE").getString()); oLOVBean.setDetailField2(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersPriorExpSkillLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("SRL_NO"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPriorExp.skillCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPriorExp.skillDescription"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpPExpSkillLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("SRL_NO").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersPriorExpDesigLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("DESG ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPriorExp.desgCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPriorExp.desgDescription"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpPExpDesgLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersEduDtlsInstLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("INST ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsEdu.instCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsEdu.instName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpEduInstLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmEmpPersEduDtlsQualLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("QUALIFICATION ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsEdu.qualificationCode"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsEdu.qualificationName"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmEmpEduQualLOVdata(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("CODE").getString()); oLOVBean.setDetailField3(oRow.get("NAME").getString()); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public LovVO getHrmRelationLOVdata(LovQueryVO oLovQueryVO) throws EnrgiseSystemException { LovVO oLovVO = new LovVO(); ArrayList arylstHeaderList = new ArrayList(); arylstHeaderList.add("ID"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPF.nomineeName"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPF.relation"); arylstHeaderList.add("hrm.HrmEmpPersonalDetailsPF.dob"); oLovVO.setHeaderList(arylstHeaderList); ArrayList arylstVisibility = new ArrayList(); arylstVisibility.add("H"); arylstVisibility.add("V"); arylstVisibility.add("V"); arylstVisibility.add("V"); oLovVO.setVisibilityList(arylstVisibility); int count = 0; ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); String sQuerySearch1 = new String(); String sQuerySearch2 = new String(); String vEmpId = null; if (oLovQueryVO.getProperty("employeeNo") != null) { vEmpId = oLovQueryVO.getProperty("employeeNo"); System.out.println(String.valueOf("emp no=").concat(String.valueOf(vEmpId))); } if (oLovQueryVO.getSearchField1() != null) sQuerySearch1 = oLovQueryVO.getSearchField1(); if (oLovQueryVO.getSearchField2() != null) sQuerySearch2 = oLovQueryVO.getSearchField2(); arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, sQuerySearch1)); arylstParam.add(new DBObject(2, 1, 12, sQuerySearch2)); arylstParam.add(new DBObject(3, 1, 12, vEmpId)); arylstParam.add(new DBObject(4, 2, -10)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 12)); arylstParam.add(new DBObject(7, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPMAINTLOV.procGetHrmRelationLOVdata(?,?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); QueryRow oRow = null; Iterator iter = arylstParam.iterator(); while (iter.hasNext()) { if (count == 0) arylstParam = new ArrayList(); count++; oRow = (QueryRow)iter.next(); LOVBean oLOVBean = new LOVBean(); oLOVBean.setDetailField1(oRow.get("ID").getString()); oLOVBean.setDetailField2(oRow.get("Nominee").getString()); oLOVBean.setDetailField3(oRow.get("relation").getString()); oLOVBean.setDetailField4(EnrgiseUtil.convertToString(oRow.get("dob").getDate())); arylstParam.add(oLOVBean); } oLovVO.setDetailList(arylstParam); return oLovVO; } public void finalSave(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList arylstDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstErrorList = new ArrayList(); HrmEmpPersHdrBean oHrmEmpPersHdrBean = (HrmEmpPersHdrBean)oBaseHeaderBean; String empId = ""; DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; ArrayList arylstHrmEmployeeTrng = null; ArrayList arylstParam = new ArrayList(); if (String.valueOf(oHrmEmpPersHdrBean.getDraftFlag()).equalsIgnoreCase("On")) { arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersHdrBean.getHeaderPrimaryKey())); arylstParam.add(new DBObject(2, 2, 12)); arylstParam.add(new DBObject(3, 2, -10)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 12)); arylstParam.add(new DBObject(6, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.procvalidationFinalSave(?,?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); String validation = oOutObject.getObject().toString(); if (validation.equals("5")) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.draftSave", arylstParam)); reportError(arylstErrorList); return; } if (validation.equals("0")) { DBUtilitiesBean oBean3 = new DBUtilitiesBean(); String sQuery = String.valueOf("update hrm_emp_pers t set t.draft_flag = 'N' where t.id=").concat(String.valueOf(oHrmEmpPersHdrBean.getHeaderPrimaryKey())); System.out.println(sQuery); int i = oBean3.executeUpsert(sQuery); } else if (validation.equals("2")) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.deputation", arylstParam)); } else if (validation.equals("4")) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.address", arylstParam)); } DBObject oOutObject1 = arylstOutArray.get(1); ArrayList arylstParam1 = (ArrayList)oOutObject1.getObject(); QueryRow oRow = null; QueryValue oValue = null; HashMap oColumns = null; Iterator itrBean = arylstParam1.iterator(); String apprType = null; while (itrBean.hasNext()) { oRow = itrBean.next(); if (oRow.get("nationality").getString() == null || oRow.get("nationality").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Nationality"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("mother_tongue").getString() == null || oRow.get("mother_tongue").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Mother Tongue"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("dob").getString() == null || oRow.get("dob").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Date Of birth"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("sex").getString() == null || oRow.get("sex").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Sex"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("marital_status").getString() == null || oRow.get("marital_status").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Marital Status"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("rlgn_mst_id").getString() == null || oRow.get("rlgn_mst_id").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Religion"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("comp_join_date").getString() == null || oRow.get("comp_join_date").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Joining Info : Company Joining Date"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("retirement_date").getString() == null || oRow.get("retirement_date").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Joining Info : Retirement Date"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } if (oRow.get("base_site_id").getString() == null || oRow.get("base_site_id").getString().equals("")) { arylstParam = new ArrayList(); arylstParam.add("Personal Details : Base Site"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.error.incomplete", arylstParam)); } } } reportError(arylstErrorList); } private void checkDateValidationPers(ArrayList arylstDetailBeanArray, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = itrBean1.next(); if (!oHrmEmpPersDtlsBean.getStatus().equalsIgnoreCase("D")) { DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy"); if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getLastPromotionDate()) && EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getDateOfBirth())) { int dateFlag = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersDtlsBean.getLastPromotionDate(), oHrmEmpPersDtlsBean.getDateOfBirth()); if (dateFlag == -1 && dateFlag != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkPersDateValidation1", arylstParam)); } } if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getLocJoiningDate()) && EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getDateOfBirth())) { int dateFlag3 = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersDtlsBean.getLocJoiningDate(), oHrmEmpPersDtlsBean.getDateOfBirth()); if (dateFlag3 == -1 && dateFlag3 != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkPersDateValidation", arylstParam)); } } if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getPassportExpDate()) && EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getPassportIssueDate())) { int dateFlag1 = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersDtlsBean.getPassportExpDate(), oHrmEmpPersDtlsBean.getPassportIssueDate()); if (dateFlag1 == -1 && dateFlag1 != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkPersDateValidation2", arylstParam)); } } if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getDateOfBirth())) { int dateFlag2 = EnrgiseUtil.compareDates(dateFormat, EnrgiseUtil.convertToString(EnrgiseUtil.getSysDate()), oHrmEmpPersDtlsBean.getDateOfBirth()); if (dateFlag2 == -1 && dateFlag2 != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkJoinDateValidation3", arylstParam)); } } } } } private void checkDateValidationJoin(ArrayList arylstDetailBeanArray, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersJoinInfDtlBean oHrmEmpPersJoinInfDtlBean = itrBean1.next(); if (!oHrmEmpPersJoinInfDtlBean.getStatus().equalsIgnoreCase("D")) { DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy"); if (EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getStatusEffectDate()) && EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getCompJoiningDate())) { int dateFlag = EnrgiseUtil.compareDates(dateFormat, oHrmEmpPersJoinInfDtlBean.getStatusEffectDate(), oHrmEmpPersJoinInfDtlBean.getCompJoiningDate()); if (dateFlag == -1 && dateFlag != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkJoinDateValidation1", arylstParam)); } } if (EnrgiseUtil.checkString(oHrmEmpPersJoinInfDtlBean.getCompJoiningDate())) { int dateFlag1 = EnrgiseUtil.compareDates(dateFormat, EnrgiseUtil.convertToString(EnrgiseUtil.getSysDate()), oHrmEmpPersJoinInfDtlBean.getCompJoiningDate()); if (dateFlag1 == -1 && dateFlag1 != -2) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkJoinDateValidation2", arylstParam)); } } } } } private void checkBaseSiteId(HrmEmpPersHdrBean oHrmEmpPersHdrBean, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; String sSiteId = null; ArrayList arylstBaseSiteId = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, oHrmEmpPersHdrBean.getHeaderPrimaryKey())); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.proc_GetBaseSiteId(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstBaseSiteId = new ArrayList(); QueryRow oRow = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { oRow = (QueryRow)itrBean.next(); sSiteId = oRow.get("Site_Id").getString(); } if (sSiteId == null) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkBaseSiteId", arylstParam)); } } public String getLastPromoInfo(String EmpId) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); DBUtilitiesBean oBean = new DBUtilitiesBean(); int count = 0; BaseDetailVO oBaseDetailVO = null; String sLastPromo = ""; ArrayList arylstLastpromoDetail = null; arylstParam = new ArrayList(); arylstParam.add(new DBObject(1, 1, 12, EmpId)); arylstParam.add(new DBObject(2, 2, -10)); arylstParam.add(new DBObject(3, 2, 12)); arylstParam.add(new DBObject(4, 2, 12)); arylstParam.add(new DBObject(5, 2, 4)); ArrayList arylstOutArray = oBean.callProc(arylstParam, "HRMEMPPERDTL.proc_GetLastPromoInfo(?,?,?,?,?)"); DBObject oOutObject = arylstOutArray.get(0); arylstParam = (ArrayList)oOutObject.getObject(); if (arylstParam.size() == 0) arylstLastpromoDetail = new ArrayList(); QueryRow oRow = null; HashMap oColumns = null; Iterator itrBean = arylstParam.iterator(); while (itrBean.hasNext()) { oRow = (QueryRow)itrBean.next(); sLastPromo = EnrgiseUtil.convertToString(oRow.get("EFFECTIVE_DATE").getDate()); } return sLastPromo; } private void checkFromDateExperience(ArrayList arylstDetailBeanArray, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = itrBean1.next(); if (!oHrmEmpPersPriorExpDtlBean.getStatus().equalsIgnoreCase("D")) { String sEffectFrom = oHrmEmpPersPriorExpDtlBean.getTxtFromDate(); String sMMEffectFrom = sEffectFrom.substring(0, 2); String sYYEffectFrom = sEffectFrom.substring(2, 6); if (Integer.parseInt(sMMEffectFrom) > 12) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.fromExpLessThan12", arylstParam)); } String sFromYYYYMM = String.valueOf(sYYEffectFrom).concat(String.valueOf(sMMEffectFrom)); int iFromYYYYMM = Integer.parseInt(sFromYYYYMM); String sEffectTo = oHrmEmpPersPriorExpDtlBean.getTxtToDate(); String sMMEffectTo = sEffectTo.substring(0, 2); String sYYEffectTo = sEffectTo.substring(2, 6); if (Integer.parseInt(sMMEffectTo) > 12) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.toExpLessThan12", arylstParam)); } String sToYYYYMM = String.valueOf(sYYEffectTo).concat(String.valueOf(sMMEffectTo)); int iToYYYYMM = Integer.parseInt(sToYYYYMM); if (iToYYYYMM < iFromYYYYMM) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrms.HrmEmpPersonalDetails.exp", arylstParam)); } } } } private void getyyyyDateFormat(ArrayList arylstDetailBeanArray) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); ArrayList arylstErrorList = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersEduDtlBean oHrmEmpPersEduDtlBean = itrBean1.next(); if (!oHrmEmpPersEduDtlBean.getStatus().equalsIgnoreCase("D")) { String sEffectFrom = oHrmEmpPersEduDtlBean.getTxtPassYear(); System.out.println(sEffectFrom); int iMMEffectFrom = Integer.parseInt(sEffectFrom); System.out.println(iMMEffectFrom); if (iMMEffectFrom <= 1900) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Educational Details"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.empPers.detail.dateConstraintViolated", arylstParam)); continue; } if (iMMEffectFrom > 2100) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Educational Details"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.empPers.detail.dateConstraintViolated", arylstParam)); } } } reportError(arylstErrorList); } private void checkDateValidation(ArrayList arylstDetailBeanArray, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersPriorExpDtlBean oHrmEmpPersPriorExpDtlBean = itrBean1.next(); if (!oHrmEmpPersPriorExpDtlBean.getStatus().equalsIgnoreCase("D")) { String sEffectFrom = oHrmEmpPersPriorExpDtlBean.getTxtFromDate(); String sEffectTo = oHrmEmpPersPriorExpDtlBean.getTxtToDate(); HrmCommonBO oBO = new HrmCommonBO(); String sysDate = oBO.getSysDate(); int year = Integer.parseInt(sysDate.substring(6, sysDate.length())); int month = Integer.parseInt(sysDate.substring(3, 5)); if (sEffectFrom.length() < 6) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExpFromLength", arylstParam)); } if (sEffectTo.length() < 6) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExpToLength", arylstParam)); } if (sEffectFrom.length() == 6 && sEffectTo.length() == 6) { if (year < Integer.parseInt(sEffectTo.substring(2, 6))) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExpTo", arylstParam)); } if (year == Integer.parseInt(sEffectTo.substring(2, 6))) if (month < Integer.parseInt(sEffectTo.substring(0, 2))) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExpTo", arylstParam)); } if (Integer.parseInt(sEffectFrom.substring(0, 2)) < 1 || Integer.parseInt(sEffectFrom.substring(0, 2)) > 12) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.dateValidation.month", arylstParam)); } if (Integer.parseInt(sEffectFrom.substring(2, 3)) == 0) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.dateValidation.year", arylstParam)); } if (Integer.parseInt(sEffectTo.substring(0, 2)) < 1 || Integer.parseInt(sEffectTo.substring(0, 2)) > 12) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.dateValidation.month", arylstParam)); } if (Integer.parseInt(sEffectTo.substring(2, 3)) == 0) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("wenrgise.dateValidation.year", arylstParam)); } int iFromMonth = Integer.parseInt(sEffectFrom.substring(0, 2)); int iFromYear = Integer.parseInt(sEffectFrom.substring(2, 6)); int iToMonth = Integer.parseInt(sEffectTo.substring(0, 2)); int iToYear = Integer.parseInt(sEffectTo.substring(2, 6)); if (iFromYear > iToYear) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExp", arylstParam)); } if (iFromYear == iToYear) if (iFromMonth >= iToMonth) { arylstParam = new ArrayList(); arylstParam.add("Prior Experience : Experience Period"); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkExp", arylstParam)); } } } } } private void checkAadharUanValidationPers(ArrayList arylstDetailBeanArray, ArrayList arylstErrorList) throws EnrgiseApplicationException, EnrgiseSystemException { ArrayList arylstParam = new ArrayList(); Iterator itrBean1 = arylstDetailBeanArray.iterator(); int iCount = 1; while (itrBean1.hasNext()) { HrmEmpPersDtlsBean oHrmEmpPersDtlsBean = itrBean1.next(); if (!oHrmEmpPersDtlsBean.getStatus().equalsIgnoreCase("D")) { if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getAadharInfo())) if (oHrmEmpPersDtlsBean.getAadharInfo().length() != 12) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkAddharValidation", arylstParam)); } if (EnrgiseUtil.checkString(oHrmEmpPersDtlsBean.getUanInfo())) if (oHrmEmpPersDtlsBean.getUanInfo().length() != 12) { arylstParam = new ArrayList(); arylstParam.add(""); arylstParam.add(new Integer(0)); arylstErrorList.add(new EnrgiseMessageKeyException("hrm.HrmEmpPersonalDetails.checkUanValidation", arylstParam)); } } } } }