/** * <p>Get Owner Type if exist e.g. PurchaseInvoice 1.</p> * @return Integer **/ @Override public final Integer getOwnerType() { return new GoodsLoss().constTypeCode(); }
/** * <p>Get Owner Type if exist e.g. PurchaseInvoice 1.</p> * @return Integer **/ @Override public final Integer getOwnerType() { return new GoodsLoss().constTypeCode(); }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final GoodsLoss createEntity( final Map<String, Object> pAddParam) throws Exception { GoodsLoss entity = new GoodsLoss(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity with its itsOwner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pIdEntityItsOwner entity itsOwner ID * @return entity instance * @throws Exception - an exception **/ @Override public final GoodsLossLine createEntityWithOwnerById( final Map<String, Object> pAddParam, final Object pIdEntityItsOwner) throws Exception { GoodsLossLine entity = new GoodsLossLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); GoodsLoss itsOwner = new GoodsLoss(); itsOwner.setItsId(Long.valueOf(pIdEntityItsOwner.toString())); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
typeCodeMap.put(new PrepaymentFrom().constTypeCode(), PrepaymentFrom.class); typeCodeMap.put(new GoodsLoss().constTypeCode(), GoodsLoss.class); typeCodeMap.put(new GoodsLossLine().constTypeCode(),
typeCodeMap.put(new PrepaymentFrom().constTypeCode(), PrepaymentFrom.class); typeCodeMap.put(new GoodsLoss().constTypeCode(), GoodsLoss.class); typeCodeMap.put(new GoodsLossLine().constTypeCode(),
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final GoodsLossLine createEntity( final Map<String, Object> pAddParam) throws Exception { GoodsLossLine entity = new GoodsLossLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); GoodsLoss itsOwner = new GoodsLoss(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
GoodsLoss reversed = new GoodsLoss(); reversed.setItsId(pEntity.getReversedId()); gll.setItsOwner(reversed);