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.HrmGenEligRuleQueryHdrBean; import wenrgise.hrms.ejb.facade.HrmSecondFacade; import wenrgise.hrms.ejb.facade.HrmSecondFacadeHome; import wenrgise.hrms.vo.HrmGenEligRuleQueryQVO; public class HrmGenEligRuleQueryBD extends HrmBaseBD { public String getInsertDataImpl(BaseQueryVO oQueryVO) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { return "Only Implementation"; } public RecordMetaInfo getHeaderMetaImpl(BaseQueryVO oQueryVO) throws EnrgiseApplicationException, EnrgiseSystemException { return null; } public ArrayList getHeaderRecordImpl(BaseQueryVO oQueryVO, long lStartPosition, long lLastPosition) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { return null; } public boolean updateHeaderRecordImpl(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 { try { HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade"); HrmSecondFacade oHrmSecondFacade = oHome.create(); return oHrmSecondFacade.saveHrmGenEligRuleQuery((HrmGenEligRuleQueryHdrBean)oBaseHeaderBean, oWhenPicked, sScreenName, sScreenMode, bHeaderDataChanged, oDetailBeanArray, bDetailDataChanged, oDetailPicked, this.oUserInfo); } catch (CreateException oCrtExcep) { throw new EnrgiseSystemException(oCrtExcep); } } public String getInsertDataImpl(HrmGenEligRuleQueryQVO oQueryVO) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { return "Only Implementation"; } public ArrayList getDetailRecordImpl(BaseQueryVO oQVO, String sScreenName, long lAbsoluteStart, long lAbsoluteEnd) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { try { HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade"); HrmSecondFacade oHrmSecondFacade = oHome.create(); return oHrmSecondFacade.getHrmGenEligRuleQueryDetail((HrmGenEligRuleQueryQVO)oQVO, lAbsoluteStart, lAbsoluteEnd); } catch (RemoteException oRe) { throw new EnrgiseSystemException(oRe); } catch (CreateException oCrt) { throw new EnrgiseSystemException(oCrt); } } public ArrayList getDetailRecordImpl(String sHeaderPrimaryKey, String sScreenName, long lAbsoluteStart, long lAbsoluteEnd) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { return null; } public RecordMetaInfo getTotalDetailRecordCountImpl(String headerPrimaryKey, String sScreenName) throws EnrgiseApplicationException, EnrgiseSystemException { return null; } public RecordMetaInfo getTotalDetailRecordCountImpl(BaseQueryVO oQVO, String sScreenName) throws EnrgiseApplicationException, EnrgiseSystemException { try { HrmSecondFacadeHome oHome = (HrmSecondFacadeHome)ServiceLocator.getLocator().getService("HrmSecondFacade"); HrmSecondFacade oHrmSecondFacade = oHome.create(); return oHrmSecondFacade.getHrmGenEligRuleQueryDetailMetaInfo((HrmGenEligRuleQueryQVO)oQVO); } catch (RemoteException oRe) { throw new EnrgiseSystemException(oRe); } catch (CreateException oCrt) { throw new EnrgiseSystemException(oCrt); } } public RecordMetaInfo getHeaderMetaImpl(HrmGenEligRuleQueryQVO oQueryVO) throws EnrgiseApplicationException, EnrgiseSystemException { return null; } public ArrayList getHeaderRecordImpl(HrmGenEligRuleQueryQVO oQueryVO, long lStartPosition, long lLastPosition) throws RemoteException, EnrgiseApplicationException, EnrgiseSystemException { return null; } public Map getDisabledFieldsImpl(ThisPageVO oThisPageVO) throws EnrgiseApplicationException, EnrgiseSystemException { HashMap oHashMap = new HashMap(); ArrayList arylstEnab = new ArrayList(); ArrayList arylstDisab = new ArrayList(); arylstEnab.add("butQuery"); arylstDisab.add("butInsert"); arylstDisab.add("butAddRow"); arylstDisab.add("butDelete"); if (oThisPageVO.getScreenMode().equals("U")) { arylstDisab.add("docType"); arylstEnab.add("butSave"); } else { arylstEnab.add("docType"); } HrmGenEligRuleQueryHdrBean oHdrBean = (HrmGenEligRuleQueryHdrBean)oThisPageVO.getOHeaderBean(); if (EnrgiseUtil.checkString(oHdrBean.getDocType())) { arylstEnab.add("butGetDetail"); } else { arylstDisab.add("butGetDetail"); } if (oThisPageVO.getScreenMode().equals("Q")); oHashMap.put("E", arylstEnab); oHashMap.put("D", arylstDisab); 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(""); } }