/** * <p>Geter for database ID.</p> * @return ID database **/ @Override public final int getIdDatabase() { return this.srvDatabase.getIdDatabase(); }
/** * <p>Get FactoryAccountingEntriesSimple (create and put into map).</p> * @return requested IFactoryAccountingEntriesSimple * @throws Exception - an exception */ protected final FactoryAccountingEntries createPutFactoryAccountingEntries() throws Exception { FactoryAccountingEntries factory = new FactoryAccountingEntries(); factory.setDatabaseId(this.srvDatabase.getIdDatabase()); //assigning fully initialized object: this.factoriesMap .put(AccountingEntries.class, factory); return factory; }
/** * <p>Get FactoryAccDocSimple (create and put into map).</p> * @param pBeanClass - bean class * @return requested IFactoryAccDocSimple * @throws Exception - an exception */ protected final FactoryAccDoc createPutFactoryAccDoc( final Class<?> pBeanClass) throws Exception { FactoryAccDoc factory = new FactoryAccDoc(); factory.setObjectClass(pBeanClass); factory.setDatabaseId(this.srvDatabase.getIdDatabase()); //assigning fully initialized object: this.factoriesMap .put(pBeanClass, factory); return factory; }
/** * <p>Get FactoryPersistableBaseSimple (create and put into map).</p> * @param pBeanClass - bean class * @return requested IFactoryPersistableBaseSimple * @throws Exception - an exception */ protected final FactoryPersistableBase createPutFactoryPersistableBase( final Class<?> pBeanClass) throws Exception { FactoryPersistableBase factory = new FactoryPersistableBase(); factory.setObjectClass(pBeanClass); factory.setDatabaseId(this.srvDatabase.getIdDatabase()); //assigning fully initialized object: this.factoriesMap .put(pBeanClass, factory); return factory; }
/** * <p>Get FactoryPersistableBaseSimple (create and put into map).</p> * @param pBeanClass - bean class * @return requested IFactoryPersistableBaseSimple * @throws Exception - an exception */ protected final FactoryPersistableBase createPutFactoryPersistableBase( final Class<?> pBeanClass) throws Exception { FactoryPersistableBase factory = new FactoryPersistableBase(); factory.setObjectClass(pBeanClass); factory.setDatabaseId(this.srvDatabase.getIdDatabase()); //assigning fully initialized object: this.factoriesMap .put(pBeanClass, factory); return factory; }
if (requestedDatabaseId != null) { if (Integer.parseInt(requestedDatabaseId) == getSrvDatabase().getIdDatabase()) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "requested_database_must_be_different");
if (requestedDatabaseId != null) { if (Integer.parseInt(requestedDatabaseId) == getSrvDatabase().getIdDatabase()) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "requested_database_must_be_different");
do { AccountingEntry accEntry = new AccountingEntry(); accEntry.setIdDatabaseBirth(getSrvDatabase().getIdDatabase()); if (itsDateLong == null) { itsDateLong = pEntity.getItsDate().getTime();
for (AccountingEntry source : sources) { if (!source.getIdDatabaseBirth() .equals(getSrvDatabase().getIdDatabase())) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "can_not_reverse_foreign_acconting_entries"); accEntry.setIdDatabaseBirth(getSrvDatabase().getIdDatabase()); accEntry.setSourceType(pReversing.constTypeCode()); Long reversingDocId = pReversing.getItsId();