Files
HRMS/hrmsEjb/wenrgise/hrms/businessdelegate/HrmRecAdvAttrBD.java
2025-07-28 13:56:49 +05:30

155 lines
7.9 KiB
Java

package wenrgise.hrms.businessdelegate;
import java.rmi.RemoteException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.ejb.CreateException;
import wenrgise.common.bean.BaseHeaderBean;
import wenrgise.common.exception.EnrgiseApplicationException;
import wenrgise.common.exception.EnrgiseSystemException;
import wenrgise.common.utility.EnrgiseUtil;
import wenrgise.common.utility.RecordMetaInfo;
import wenrgise.common.vo.BaseQueryVO;
import wenrgise.common.vo.ThisPageVO;
import wenrgise.ejb.common.utility.ServiceLocator;
import wenrgise.hrms.bean.HrmRecAdvAttrHdrBean;
import wenrgise.hrms.ejb.facade.HrmSecondFacade;
import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome;
public class HrmRecAdvAttrBD extends HrmBaseBD {
public RecordMetaInfo getTotalDetailRecordCountImpl(String lPrimaryKey, String sScreenName) throws EnrgiseApplicationException, EnrgiseSystemException {
RecordMetaInfo oRecordMetaInfo = new RecordMetaInfo();
try {
HrmSecondFacade oHrmSecondFacade = (HrmSecondFacade)getModuleFacade("SecHRMS");
if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrLocVacencyDtl")) {
oRecordMetaInfo = oHrmSecondFacade.getRecLocVacencyDetailMetaInfo(lPrimaryKey);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrLngReqDtl")) {
oRecordMetaInfo = oHrmSecondFacade.getRecLngReqDetailMetaInfo(lPrimaryKey);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrQualReqDtl")) {
oRecordMetaInfo = oHrmSecondFacade.getRecQualReqDetailMetaInfo(lPrimaryKey);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrSkillReqDtl")) {
oRecordMetaInfo = oHrmSecondFacade.getRecSkillReqDetailMetaInfo(lPrimaryKey);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrWorkExpDtl")) {
oRecordMetaInfo = oHrmSecondFacade.getRecWorkExpDetailMetaInfo(lPrimaryKey);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrJobDesc")) {
oRecordMetaInfo = oHrmSecondFacade.getRecJobDescDetailMetaInfo(lPrimaryKey);
}
} catch (RemoteException oRe) {
throw new EnrgiseSystemException(oRe);
} catch (CreateException oCrt) {
throw new EnrgiseSystemException(oCrt);
}
return oRecordMetaInfo;
}
public ArrayList getDetailRecordImpl(String lPrimaryKey, String sScreenName, long lAbsoluteStart, long lAbsoluteEnd) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
ArrayList oAdvAttrDtl = new ArrayList();
try {
HrmSecondFacade oHrmSecondFacade = (HrmSecondFacade)getModuleFacade("SecHRMS");
if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrLocVacencyDtl")) {
oAdvAttrDtl = oHrmSecondFacade.getRecLocVacencyDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrLngReqDtl")) {
oAdvAttrDtl = oHrmSecondFacade.getRecLngReqDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrQualReqDtl")) {
oAdvAttrDtl = oHrmSecondFacade.getRecQualReqDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrSkillReqDtl")) {
oAdvAttrDtl = oHrmSecondFacade.getRecSkillReqDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrWorkExpDtl")) {
oAdvAttrDtl = oHrmSecondFacade.getRecWorkExpDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
} else if (sScreenName.equalsIgnoreCase("HrmRecAdvAttrJobDesc")) {
oAdvAttrDtl = oHrmSecondFacade.getRecJobDescDetail(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
}
return oAdvAttrDtl;
} catch (RemoteException oRe) {
throw new EnrgiseSystemException(oRe);
} catch (CreateException oCrt) {
throw new EnrgiseSystemException(oCrt);
}
}
public String saveImpl(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList oDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
try {
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
HrmSecondFacade oHrmSecondFacade = oHome.create();
return oHrmSecondFacade.saveHrmRecAdvAttrDtl(oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, oDetailBeanArray, bDetailDataChanged, oDetailPicked, this.oUserInfo);
} catch (CreateException oCrtExcep) {
throw new EnrgiseSystemException(oCrtExcep);
}
}
public boolean updateHeaderRecordImpl(BaseHeaderBean oBaseHeaderBean) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
return true;
}
public String getInsertDataImpl(BaseQueryVO oQueryVO) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
return "Only Implementation";
}
public RecordMetaInfo getHeaderMetaImpl(BaseQueryVO oQueryVO) throws EnrgiseApplicationException, EnrgiseSystemException {
RecordMetaInfo oRecordMetaInfo = null;
return oRecordMetaInfo;
}
public ArrayList getHeaderRecordImpl(BaseQueryVO oQueryVO, long lStartPosition, long lLastPosition) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
ArrayList oRet = null;
return oRet;
}
public Map getDisabledFieldsImpl(ThisPageVO oThisPageVO) throws EnrgiseApplicationException, EnrgiseSystemException {
HashMap oHashMap = new HashMap();
ArrayList oEnableList = new ArrayList();
ArrayList oDisableList = new ArrayList();
ArrayList oDetailList = oThisPageVO.getODetailList();
BaseHeaderBean oBaseHeaderBean = oThisPageVO.getOHeaderBean();
HrmRecAdvAttrHdrBean oHrmRecAdvAttrHdrBean = (HrmRecAdvAttrHdrBean)oBaseHeaderBean;
if (!EnrgiseUtil.checkString(oHrmRecAdvAttrHdrBean.getRefNo())) {
oDisableList.add("butPosition");
} else if (oHrmRecAdvAttrHdrBean.getChangeEnb().equalsIgnoreCase("S")) {
oEnableList.add("butPosition");
}
if (oHrmRecAdvAttrHdrBean.getChangeEnb().equalsIgnoreCase("S") && oThisPageVO.getODetailList() == null)
if (!EnrgiseUtil.checkString(oHrmRecAdvAttrHdrBean.getDesgn())) {
oDisableList.add("butAddRow");
oDisableList.add("butGetDetail");
oDisableList.add("butDelRow");
} else {
oDisableList.add("butAddRow");
oEnableList.add("butGetDetail");
oDisableList.add("butDelRow");
}
if (oHrmRecAdvAttrHdrBean.getChangeEnb().equalsIgnoreCase("T") && oThisPageVO.getODetailList() == null) {
oEnableList.add("butAddRow");
oDisableList.add("butDelRow");
oDisableList.add("butGetDetail");
oDisableList.add("butrefNo");
oDisableList.add("butPosition");
oEnableList.add("butQuery");
}
if (oHrmRecAdvAttrHdrBean.getChangeEnb().equalsIgnoreCase("T") && oThisPageVO.getODetailList() != null) {
oEnableList.add("butAddRow");
oDisableList.add("butGetDetail");
oEnableList.add("butSave");
oEnableList.add("butDelRow");
oDisableList.add("butrefNo");
oDisableList.add("butPosition");
oEnableList.add("butQuery");
}
oDisableList.add("butExecute");
oDisableList.add("butInsert");
oDisableList.add("butDelete");
oDisableList.add("butPrevHeader");
oDisableList.add("butNextHeader");
oDisableList.add("newPositionRequested");
oDisableList.add("butJumpHeader");
oHashMap.put("D", oDisableList);
oHashMap.put("E", oEnableList);
return oHashMap;
}
public String submitImpl(String sButtonName, BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList oDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
return new String("");
}
}