Author: echatellier Date: 2012-05-04 16:44:00 +0200 (Fri, 04 May 2012) New Revision: 3404 Url: http://chorem.org/repositories/revision/lima/3404 Log: Just another topia query removal Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2012-05-04 14:36:29 UTC (rev 3403) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/accountingrules/DefaultAccountingRules.java 2012-05-04 14:44:00 UTC (rev 3404) @@ -53,7 +53,6 @@ import org.chorem.lima.entity.LimaCallaoDAOHelper; import org.nuiton.topia.TopiaContext; import org.nuiton.topia.TopiaException; -import org.nuiton.topia.framework.TopiaQuery; /** * Defaults rules, if no localized rules classes is instantiated @@ -195,6 +194,8 @@ LimaCallaoDAOHelper.getFinancialTransactionDAO(topiaContext); // Check if all financial transactions of closedperiodicentrybook are equilibrate + // FIMXE echatellier 20120504 unutile de recuperer une liste + // entiere juste pour tester l'existence List<FinancialTransaction> result = financialTransactionDAO.getAllUnbalancedTransaction(closedPeriodicEntryBook.getFinancialPeriod(), closedPeriodicEntryBook.getEntryBook()); if (result.size() > 0) { @@ -204,14 +205,16 @@ // Check if all financial transactions of this closedperiodicentrybook/financialPeriod are well filled in result = financialTransactionDAO.getAllUnfilledTransaction(closedPeriodicEntryBook.getFinancialPeriod(), closedPeriodicEntryBook.getEntryBook()); - + // FIMXE echatellier 20120504 unutile de recuperer une liste + // entiere juste pour tester l'existence if (result.size() > 0) { throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingelements")); } // Check if all financial transactions have EntryBooks result = financialTransactionDAO.getAllTransactionWithoutEntryBook(); - + // FIMXE echatellier 20120504 unutile de recuperer une liste + // entiere juste pour tester l'existence if (result.size() > 0) { throw new LimaBusinessException(_("lima-business.defaultaccountingrules.missingentrybook")); } @@ -332,10 +335,7 @@ LimaCallaoDAOHelper.getFiscalPeriodDAO(topiaContext); //search fiscalperiod have financialperiod in params - TopiaQuery query = fiscalPeriodDAO.createQuery() - .addInElements(":financialPeriod", "financialPeriod") - .addParam("financialPeriod", financialPeriod); - FiscalPeriod fiscalPeriod = fiscalPeriodDAO.findByQuery(query); + FiscalPeriod fiscalPeriod = fiscalPeriodDAO.findByFinancialPeriod(financialPeriod); Date beginDateFiscalPeriod = fiscalPeriod.getBeginDate(); Date endDateFiscalPeriod = fiscalPeriod.getEndDate();
participants (1)
-
echatellier@users.chorem.org