/** * <p>Retrieve other data of entity e.g. warehouse entries.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void retrieveOtherDataFor(final Map<String, Object> pAddParam, final PrepaymentTo pEntity) throws Exception { addTypeCodeIntoAttrs(pAddParam); }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final PrepaymentTo createEntity( final Map<String, Object> pAddParam) throws Exception { PrepaymentTo entity = new PrepaymentTo(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); addTypeCodeIntoAttrs(pAddParam); return entity; }
/** * <p>Make save preparations before insert/update block if it's need.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void makeFirstPrepareForSave(final Map<String, Object> pAddParam, final PrepaymentTo pEntity) throws Exception { //BeigeORM refresh: pEntity.setAccCash(getSrvOrm() .retrieveEntity(pEntity.getAccCash())); if (pEntity.getAccCash().getSubaccType() != null && pEntity.getSubaccCashId() == null) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "select_subaccount"); } }
factoryAppBeans.getBeansMap().put(pSrvName, srvEntity); } else if (entityClass == PrepaymentTo.class) { srvEntity = new SrvPrepaymentTo<RS>(factoryAppBeans.lazyGetSrvOrm(), lazyGetSrvAccSettings(), lazyGetSrvAccEntry(), factoryAppBeans.lazyGetSrvI18n(), lazyGetEntryDateFormatter(),
/** * <p>Make additional preparations on entity copy.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void makeAddPrepareForCopy(final Map<String, Object> pAddParam, final PrepaymentTo pEntity) throws Exception { pEntity.setPurchaseInvoiceId(null); addTypeCodeIntoAttrs(pAddParam); }