/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final T retrieveCopyEntity(final Map<String, Object> pAddParam, final Object pId) throws Exception { T entity = this.srvOrm.retrieveCopyEntity(this.entityClass, pId); entity.setIsNew(true); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final T retrieveCopyEntity(final Map<String, Object> pAddParam, final Object pId) throws Exception { T entity = this.srvOrm.retrieveCopyEntity(this.entityClass, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final T retrieveCopyEntity(final Map<String, Object> pAddParam, final Object pId) throws Exception { T entity = getSrvOrm().retrieveCopyEntity(this.entityClass, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final MoveItemsLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { MoveItemsLine entity = getSrvOrm().retrieveCopyEntity( MoveItemsLine.class, pId); @SuppressWarnings("unchecked") Map<String, String[]> parameterMap = (Map<String, String[]>) pAddParam. get("parameterMap"); if (parameterMap.get("actionAdd") != null && "reverse".equals(parameterMap.get("actionAdd")[0])) { throw new ExceptionWithCode(ExceptionWithCode.FORBIDDEN, "reverse_not_supported"); } entity.setItsQuantity(BigDecimal.ZERO); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final SalesInvoiceServiceLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { SalesInvoiceServiceLine entity = getSrvOrm().retrieveCopyEntity( SalesInvoiceServiceLine.class, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final ReplicationAccMethod retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { ReplicationAccMethod entity = getSrvOrm() .retrieveCopyEntity(ReplicationAccMethod.class, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final PurchaseInvoiceServiceLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { PurchaseInvoiceServiceLine entity = getSrvOrm().retrieveCopyEntity( PurchaseInvoiceServiceLine.class, pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
final Map<String, Object> pAddParam, final Object pId) throws Exception { GoodsLossLine entity = getSrvOrm().retrieveCopyEntity( GoodsLossLine.class, pId); @SuppressWarnings("unchecked")
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final T retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { T entity = getSrvOrm() .retrieveCopyEntity(getEntityClass(), pId); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final SubaccountLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { SubaccountLine entity = getSrvOrm().retrieveCopyEntity( SubaccountLine.class, pId); entity.setIsNew(true); addTypeCodeIntoAttrs(pAddParam); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final Account retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { Account entity = getSrvOrm() .retrieveCopyEntity(Account.class, pId); entity.setIsNew(true); addTypeCodeIntoAttrs(pAddParam); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final InvItemTaxCategoryLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { InvItemTaxCategoryLine entity = getSrvOrm().retrieveCopyEntity( InvItemTaxCategoryLine.class, pId); entity.setTax(null); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
final Map<String, Object> pAddParam, final Object pId) throws Exception { BeginningInventoryLine entity = getSrvOrm().retrieveCopyEntity( BeginningInventoryLine.class, pId); @SuppressWarnings("unchecked")
final Map<String, Object> pAddParam, final Object pId) throws Exception { UsedMaterialLine entity = getSrvOrm().retrieveCopyEntity( UsedMaterialLine.class, pId); @SuppressWarnings("unchecked")
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final AccountingEntries retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { AccountingEntries entity = getSrvOrm() .retrieveCopyEntity(AccountingEntries.class, pId); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; } }
final Map<String, Object> pAddParam, final Object pId) throws Exception { PurchaseInvoiceLine entity = getSrvOrm().retrieveCopyEntity( PurchaseInvoiceLine.class, pId); @SuppressWarnings("unchecked")
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final WageTaxLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { WageTaxLine entity = getSrvOrm().retrieveCopyEntity( WageTaxLine.class, pId); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final WageLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { WageLine entity = getSrvOrm().retrieveCopyEntity( WageLine.class, pId); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final AdditionCostLine retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { AdditionCostLine entity = getSrvOrm().retrieveCopyEntity( AdditionCostLine.class, pId); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); addTypeCodeIntoAttrs(pAddParam); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Retrieve copy of entity from DB by given ID.</p> * @param pAddParam additional param * @param pId ID * @return entity or null * @throws Exception - an exception **/ @Override public final AccountingEntry retrieveCopyEntity( final Map<String, Object> pAddParam, final Object pId) throws Exception { AccountingEntry entity = getSrvOrm().retrieveCopyEntity( AccountingEntry.class, pId); if (!entity.getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_make_entry_for_foreign_src"); } entity.setIdDatabaseBirth(getSrvDatabase().getIdDatabase()); entity.setSourceDatabaseBirth(getSrvDatabase().getIdDatabase()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }