130 lines
6.3 KiB
Java
130 lines
6.3 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.RecordMetaInfo;
|
|
import wenrgise.common.vo.BaseQueryVO;
|
|
import wenrgise.common.vo.ThisPageVO;
|
|
import wenrgise.ejb.common.utility.ServiceLocator;
|
|
import wenrgise.hrms.bean.HrmRoasterEntryHdrBean;
|
|
import wenrgise.hrms.ejb.facade.HrmSecondFacade;
|
|
import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome;
|
|
import wenrgise.hrms.vo.HrmRoasterEntryQVO;
|
|
|
|
public class HrmRoasterEntryBD extends HrmBaseBD {
|
|
public RecordMetaInfo getHeaderMetaImpl(BaseQueryVO oQueryVO) throws EnrgiseApplicationException, EnrgiseSystemException {
|
|
try {
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oHrmSecondFacade = oHome.create();
|
|
return oHrmSecondFacade.getHrmRoasterHdrMetaInfo((HrmRoasterEntryQVO)oQueryVO);
|
|
} catch (RemoteException oRe) {
|
|
throw new EnrgiseSystemException(oRe);
|
|
} catch (CreateException oCrt) {
|
|
throw new EnrgiseSystemException(oCrt);
|
|
}
|
|
}
|
|
|
|
public ArrayList getHeaderRecordImpl(BaseQueryVO oQueryVO, long lStartPosition, long lLastPosition) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
try {
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oHrmSecondFacade = oHome.create();
|
|
ArrayList oHeaderList = oHrmSecondFacade.getHrmRoasterHdrInfo((HrmRoasterEntryQVO)oQueryVO, lStartPosition, lLastPosition);
|
|
return oHeaderList;
|
|
} catch (RemoteException oRe) {
|
|
throw new EnrgiseSystemException(oRe);
|
|
} catch (CreateException oCrt) {
|
|
throw new EnrgiseSystemException(oCrt);
|
|
}
|
|
}
|
|
|
|
public RecordMetaInfo getTotalDetailRecordCountImpl(String lPrimaryKey, String sScreenName) throws EnrgiseApplicationException, EnrgiseSystemException {
|
|
try {
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oHrmSecondFacade = oHome.create();
|
|
if (sScreenName.equalsIgnoreCase("HrmRoasterEntry"))
|
|
return oHrmSecondFacade.getHrmRoasterEntryDetailMetaInfo(lPrimaryKey);
|
|
RecordMetaInfo obj = new RecordMetaInfo();
|
|
return obj;
|
|
} catch (RemoteException oRe) {
|
|
throw new EnrgiseSystemException(oRe);
|
|
} catch (CreateException oCrt) {
|
|
throw new EnrgiseSystemException(oCrt);
|
|
}
|
|
}
|
|
|
|
public ArrayList getDetailRecordImpl(String lPrimaryKey, String sScreenName, long lAbsoluteStart, long lAbsoluteEnd) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
try {
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oHrmSecondFacade = oHome.create();
|
|
if (sScreenName.equalsIgnoreCase("HrmRoasterEntry"))
|
|
return oHrmSecondFacade.getHrmRoasterEntryDetailInfo(lPrimaryKey, lAbsoluteStart, lAbsoluteEnd);
|
|
ArrayList obj = new ArrayList();
|
|
return obj;
|
|
} catch (RemoteException oRe) {
|
|
throw new EnrgiseSystemException(oRe);
|
|
} catch (CreateException oCrt) {
|
|
throw new EnrgiseSystemException(oCrt);
|
|
}
|
|
}
|
|
|
|
public boolean checkHeaderTimestampImpl(String lHeaderPrimaryKey, Timestamp oWhenPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return true;
|
|
}
|
|
|
|
public boolean validateHeaderRecordImpl(BaseHeaderBean oBaseHeaderBean) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return true;
|
|
}
|
|
|
|
public boolean updateHeaderRecordImpl(BaseHeaderBean oBaseHeaderBean) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return true;
|
|
}
|
|
|
|
public boolean insertHeaderRecordImpl(BaseHeaderBean oBaseHeaderBean) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return true;
|
|
}
|
|
|
|
public String saveImpl(BaseHeaderBean oBaseHeaderBean, Timestamp oWhenPicked, String sScreenName, String sScreenMode, boolean bHeaderDataChanged, ArrayList oDetailBeanArray, boolean bDetailDataChanged, Timestamp oDetailPicked) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
oWhenPicked = oDetailPicked;
|
|
try {
|
|
HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade");
|
|
HrmSecondFacade oHrmSecondFacade = oHome.create();
|
|
if (sScreenName.equalsIgnoreCase("HrmRoasterEntry"))
|
|
return oHrmSecondFacade.saveRoasterHdr((HrmRoasterEntryHdrBean)oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, oDetailBeanArray, bDetailDataChanged, oDetailPicked, this.oUserInfo);
|
|
} catch (CreateException oCrtExcep) {
|
|
throw new EnrgiseSystemException(oCrtExcep);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public String getInsertDataImpl(BaseQueryVO oQueryVO) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException {
|
|
return "Only Implementation";
|
|
}
|
|
|
|
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();
|
|
HrmRoasterEntryHdrBean oHrmRoasterEntryHdrBean = (HrmRoasterEntryHdrBean)oBaseHeaderBean;
|
|
if (!oThisPageVO.getScreenMode().equalsIgnoreCase("N")) {
|
|
oDisableList.add("txtRoasterDescription");
|
|
oDisableList.add("txtRoasterCode");
|
|
}
|
|
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("");
|
|
}
|
|
}
|