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) {
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);