/** * <p>Delete entity from DB.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final T pEntity) throws Exception { if (APersistableBase.class.isAssignableFrom(pEntity.getClass()) && !((APersistableBase) pEntity).getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_delete_foreign_src"); } getSrvOrm().deleteEntity(this.entityClass, pEntity.getItsId()); }
/** * <p>Delete entity from DB.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final T pEntity) throws Exception { if (APersistableBase.class.isAssignableFrom(pEntity.getClass()) && !((APersistableBase) pEntity).getIdDatabaseBirth() .equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_delete_foreign_src"); } getSrvOrm().deleteEntity(getEntityClass(), pEntity.getItsId()); }
/** * <p>Delete entity from DB.</p> * @param pAddParam additional param * @param pEntity entity * @throws Exception - an exception **/ @Override public final void deleteEntity(final Map<String, Object> pAddParam, final T pEntity) throws Exception { if (!pEntity.getIdDatabaseBirth().equals(getSrvOrm().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_delete_foreign_src"); } deleteEntity(pAddParam, pEntity.getItsId()); }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final PurchaseInvoice createEntity( final Map<String, Object> pAddParam) throws Exception { PurchaseInvoice entity = new PurchaseInvoice(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final BeginningInventory createEntity( final Map<String, Object> pAddParam) throws Exception { BeginningInventory entity = new BeginningInventory(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final AccountingEntries createEntity( final Map<String, Object> pAddParam) throws Exception { AccountingEntries entity = new AccountingEntries(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final ManufacturingProcess createEntity( final Map<String, Object> pAddParam) throws Exception { ManufacturingProcess entity = new ManufacturingProcess(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <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.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesReturn createEntity( final Map<String, Object> pAddParam) throws Exception { SalesReturn entity = new SalesReturn(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final Wage createEntity( final Map<String, Object> pAddParam) throws Exception { Wage entity = new Wage(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final PurchaseReturn createEntity( final Map<String, Object> pAddParam) throws Exception { PurchaseReturn entity = new PurchaseReturn(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoice createEntity( final Map<String, Object> pAddParam) throws Exception { SalesInvoice entity = new SalesInvoice(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final PaymentFrom createEntity( final Map<String, Object> pAddParam) throws Exception { PaymentFrom entity = new PaymentFrom(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); addTypeCodeIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final PrepaymentFrom createEntity( final Map<String, Object> pAddParam) throws Exception { PrepaymentFrom entity = new PrepaymentFrom(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsDate(new Date()); entity.setIsNew(true); addAccSettingsIntoAttrs(pAddParam); addTypeCodeIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity with its itsOwner e.g. invoice line * for invoice.</p> * @param pAddParam additional param * @param pEntityItsOwner itsOwner * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceLine createEntityWithOwner( final Map<String, Object> pAddParam, final SalesInvoice pEntityItsOwner) throws Exception { SalesInvoiceLine entity = new SalesInvoiceLine(); entity.setIsNew(true); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setItsOwner(pEntityItsOwner); 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 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>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final WageLine createEntity( final Map<String, Object> pAddParam) throws Exception { WageLine entity = new WageLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); Wage itsOwner = new Wage(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final UsedMaterialLine createEntity( final Map<String, Object> pAddParam) throws Exception { UsedMaterialLine entity = new UsedMaterialLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); ManufacturingProcess itsOwner = new ManufacturingProcess(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final InvItemTaxCategoryLine createEntity( final Map<String, Object> pAddParam) throws Exception { InvItemTaxCategoryLine entity = new InvItemTaxCategoryLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); InvItemTaxCategory itsOwner = new InvItemTaxCategory(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }
/** * <p>Create entity.</p> * @param pAddParam additional param * @return entity instance * @throws Exception - an exception **/ @Override public final SalesInvoiceLine createEntity( final Map<String, Object> pAddParam) throws Exception { SalesInvoiceLine entity = new SalesInvoiceLine(); entity.setIdDatabaseBirth(getSrvOrm().getIdDatabase()); entity.setIsNew(true); SalesInvoice itsOwner = new SalesInvoice(); entity.setItsOwner(itsOwner); addAccSettingsIntoAttrs(pAddParam); return entity; }