final Object pEntity) throws Exception { AccountingEntry entityPb = (AccountingEntry) pEntity; int currDbId = getSrvOrm().getIdDatabase(); if (currDbId == entityPb.getIdDatabaseBirth()) { throw new ExceptionWithCode(ExceptionWithCode.SOMETHING_WRONG, String whereStr = " where " + tblNm + ".IDBIRTH=" + entityPb.getItsId() + " and " + tblNm + ".IDDATABASEBIRTH=" + entityPb.getIdDatabaseBirth(); AccountingEntry entityPbDb = getSrvOrm() .retrieveEntityWithConditions(pAddParam, entityPb.getClass(), whereStr); if (entityPb.getSourceType().equals(this.accountingEntriesCode)) { whereStr = " where " + tblNm + ".IDBIRTH=" + entityPb.getSourceId() + " and " + tblNm + ".IDDATABASEBIRTH=" + entityPb.getIdDatabaseBirth(); AccountingEntries accountingEntries = getSrvOrm() .retrieveEntityWithConditions(pAddParam, AccountingEntries.class, whereStr); isNew = false; getSrvBalance().handleNewAccountEntry(pAddParam, null, null,
srvEntitySyncPersistableBaseVersion); SrvEntitySyncAccEntry<RS> srvEntitySyncAccEntry = new SrvEntitySyncAccEntry<RS>(); srvEntitySyncAccEntry.setSrvOrm(this.factoryAppBeans.lazyGetSrvOrm()); srvEntitySyncAccEntry.setSrvBalance(lazyGetSrvBalanceStd()); srvEntitySyncMap.put("SrvEntitySyncAccEntry", srvEntitySyncAccEntry); databaseReaderSyncStdXml.setSrvEntitySyncMap(srvEntitySyncMap);
srvEntitySyncPersistableBaseVersion); SrvEntitySyncAccEntry<RS> srvEntitySyncAccEntry = new SrvEntitySyncAccEntry<RS>(); srvEntitySyncAccEntry.setSrvOrm(this.factoryAppBeans.lazyGetSrvOrm()); srvEntitySyncAccEntry.setSrvBalance(lazyGetSrvBalanceStd()); srvEntitySyncMap.put("SrvEntitySyncAccEntry", srvEntitySyncAccEntry); databaseReaderSyncStdXml.setSrvEntitySyncMap(srvEntitySyncMap);
final Map<String, Object> pAddParam) throws Exception { AccountingEntry entityPb = (AccountingEntry) pEntity; int currDbId = getSrvOrm().getIdDatabase(); if (currDbId == entityPb.getIdDatabaseBirth()) { throw new ExceptionWithCode(ExceptionWithCode.SOMETHING_WRONG, String whereStr = " where " + tblNm + ".IDBIRTH=" + entityPb.getItsId() + " and " + tblNm + ".IDDATABASEBIRTH=" + entityPb.getIdDatabaseBirth(); AccountingEntry entityPbDb = getSrvOrm() .retrieveEntityWithConditions(entityPb.getClass(), whereStr); if (entityPb.getSourceType().equals(this.accountingEntriesCode)) { whereStr = " where " + tblNm + ".IDBIRTH=" + entityPb.getSourceId() + " and " + tblNm + ".IDDATABASEBIRTH=" + entityPb.getIdDatabaseBirth(); AccountingEntries accountingEntries = getSrvOrm() .retrieveEntityWithConditions(AccountingEntries.class, whereStr); if (accountingEntries == null) { isNew = false; getSrvBalance().handleNewAccountEntry(null, null,