📄 cardholderaccessdelegate.java
字号:
throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Search a list of cardholders that satisfied with * the passed value in the specified cardholder value. * If there is a value in SIN, it will use it for the * search. Otherwise it will use the cardholder's names * and DOB etc. for the search * @return: CardholderValue */ public static ValueList searchCardholder(CardholderValue value) throws SystemException, BusinessException { ValueList results; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); results = cardholderAccessLocal.searchCardholder(value); } else { CardholderAccess cardholderAccess = home.create(); results = cardholderAccess.searchCardholder(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return results; } /** * @Description: Update cardholder data * @param: CardholderValue * @return: CardholderValue */ public static CardholderValue updateCardholder(CardholderValue value) throws SystemException, BusinessException { CardholderValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.updateCardholder(value); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.updateCardholder(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Insert a new record for cardholder table * @param: CardholderValue * @return: CardholderValue */ public static CardholderValue createCardholder(CardholderValue value) throws SystemException, BusinessException { CardholderValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.createCardholder(value); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.createCardholder(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Approve the cardholder registered online. Used by Bank Clerk only * @param: CardholderValue * @return: CardholderValue */ public static CardholderValue approveCardholder(CardholderValue value) throws SystemException, BusinessException { CardholderValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.approveCardholder(value); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.approveCardholder(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Delete cardholder data. Used by Admin User only * @param: CardholderValue * @return: */ public static void deleteCardholder(CardholderValue value) throws SystemException, BusinessException { try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); cardholderAccessLocal.deleteCardholder(value); } else { CardholderAccess cardholderAccess = home.create(); cardholderAccess.deleteCardholder(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } } /** * @Description: View address data for the specified Object ID * @return: AddressValue */ public static AddressValue viewAddressByOID(long oid) throws SystemException, BusinessException { AddressValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.viewAddressByOID(oid); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.viewAddressByOID(oid); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Update Address data * @param: AddressValue * @return: AddressValue */ public static AddressValue updateAddress(AddressValue value) throws SystemException, BusinessException { AddressValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.updateAddress(value); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.updateAddress(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Insert a new record for Address table * @param: AddressValue * @return: AddressValue */ public static AddressValue createAddress(AddressValue value) throws SystemException, BusinessException { AddressValue newValue; try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); newValue = cardholderAccessLocal.createAddress(value); } else { CardholderAccess cardholderAccess = home.create(); newValue = cardholderAccess.createAddress(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } return newValue; } /** * @Description: Delete Address data. Used by Bank Clerk only * @param: AddressValue * @return: */ public static void deleteAddress(AddressValue value) throws SystemException, BusinessException { try { if(isLocal) { CardholderAccessLocal cardholderAccessLocal = localHome.create(); cardholderAccessLocal.deleteAddress(value); } else { CardholderAccess cardholderAccess = home.create(); cardholderAccess.deleteAddress(value); } } catch(CreateException ce) { throw new SystemException(ce); } catch(EJBException ee) { throw new SystemException(ee); } catch(RemoteException re) { throw new SystemException(re); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -