r3476 - in trunk: . lima-callao/src/main/java/org/chorem/lima/entity
Author: echatellier Date: 2012-06-26 17:48:13 +0200 (Tue, 26 Jun 2012) New Revision: 3476 Url: http://chorem.org/repositories/revision/lima/3476 Log: Update topia and some other libs. Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java trunk/pom.xml Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/AccountDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -88,7 +88,7 @@ protected List<Account> findIntervalAccountByNumber(String accountNumberLow, String accountNumberHigh) throws TopiaException { String query = "FROM " + Account.class.getName() + " WHERE :accountNumberLow <= accountNumber AND accountNumber <= :accountNumberHigh"; - return (List<Account>) context.find(query, "accountNumberLow", + return (List<Account>) context.findAll(query, "accountNumberLow", accountNumberLow, "accountNumberHigh", accountNumberHigh); } @@ -102,7 +102,7 @@ public List<Account> findAllSubAccounts(Account account) throws TopiaException { String query = "FROM " + Account.class.getName() + " a WHERE a.accountNumber LIKE concat(:accountNumber, '_%')"; - List<Account> accounts = context.find(query, "accountNumber", account.getAccountNumber()); + List<Account> accounts = context.findAll(query, "accountNumber", account.getAccountNumber()); return accounts; } @@ -165,7 +165,7 @@ String query = "FROM " + Account.class.getName() + " a WHERE NOT IN (" + "FROM " + Account.class.getName() + " b where b.accountNumber like a.accountNumber+'%')" + " AND a.accountNumber LIKE ?"; - List<Account> accountsResult = getContext().find(query, s); + List<Account> accountsResult = getContext().findAll(query, s); if (accountsResult != null) { //if first if (first) { Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/ClosedPeriodicEntryBookDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -77,10 +77,10 @@ if (financialPeriod != null) { query += " AND financialPeriod = :financialPeriod"; //context.find(query, 0, 0, "entryBook", entryBook, "financialPeriod", financialPeriod); - closedPeriodicEntryBooks = context.find(query, "entryBook", entryBook, "financialPeriod", financialPeriod); + closedPeriodicEntryBooks = context.findAll(query, "entryBook", entryBook, "financialPeriod", financialPeriod); } else { //context.find(query, 0, 0, "entryBook", entryBook); - closedPeriodicEntryBooks = context.find(query, "entryBook", entryBook); + closedPeriodicEntryBooks = context.findAll(query, "entryBook", entryBook); } } else { if (financialPeriod != null) { @@ -88,7 +88,7 @@ } //context.find(query, 0, 0, "financialPeriod", financialPeriod); - closedPeriodicEntryBooks = context.find(query, "financialPeriod", financialPeriod); + closedPeriodicEntryBooks = context.findAll(query, "financialPeriod", financialPeriod); } // get only first one @@ -115,7 +115,7 @@ " WHERE :beginDate <= financialPeriod.beginDate " + " AND financialPeriod.beginDate <= :endDate" + " ORDER BY entryBook.code"; - return context.find(query, "beginDate", beginDate, "endDate", endDate); + return context.findAll(query, "beginDate", beginDate, "endDate", endDate); } /** @@ -135,7 +135,7 @@ " WHERE :beginDate <= financialPeriod.beginDate " + " AND financialPeriod.beginDate <= :endDate" + " AND entryBook = :entryBook"; - return context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); + return context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); } /** @@ -156,7 +156,7 @@ " AND financialPeriod.beginDate <= :endDate" + " AND entryBook = :entryBook" + " AND locked = true"; - return context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); + return context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); } /** @@ -172,7 +172,7 @@ " AND F.locked = false" + " ORDER BY C.financialPeriod.beginDate"; - List<ClosedPeriodicEntryBook> result = context.find(query); + List<ClosedPeriodicEntryBook> result = context.findAll(query); return result; } @@ -189,7 +189,7 @@ " AND F = :fiscalPeriod" + " ORDER BY C.financialPeriod.beginDate"; - List<ClosedPeriodicEntryBook> result = context.find(query, "fiscalPeriod", fiscalPeriod); + List<ClosedPeriodicEntryBook> result = context.findAll(query, "fiscalPeriod", fiscalPeriod); return result; } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/EntryDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -68,7 +68,7 @@ // concerne le compte " AND E.account = :account"; - List<Entry> entries = context.find(query, "beginDate", beginDate, + List<Entry> entries = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "account", account); return entries; } @@ -91,7 +91,7 @@ " AND E.account = :account" + " GROUP BY E.debit"; - List<Object[]> result = context.find(query, "beginDate", beginDate, + List<Object[]> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "account", account); return result; } @@ -113,7 +113,7 @@ // fix order " ORDER BY E.financialTransaction.transactionDate, E.financialTransaction.topiaId"; - List<Entry> entries = context.find(query, "beginDate", beginDate, + List<Entry> entries = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return entries; } @@ -136,7 +136,7 @@ " AND E.financialTransaction.entryBook = :entryBook" + " GROUP BY E.debit"; - List<Object[]> result = context.find(query, "beginDate", beginDate, + List<Object[]> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return result; } @@ -159,7 +159,7 @@ // concerne le journal " AND E.financialTransaction.entryBook = :entryBook"; - List<Entry> entries = context.find(query, "beginDate", beginDate, + List<Entry> entries = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return entries; } @@ -185,7 +185,7 @@ " AND E.financialTransaction.entryBook = :entryBook" + " GROUP BY E.debit"; - List<Object[]> result = context.find(query, "beginDate", beginDate, + List<Object[]> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return result; } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialPeriodDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -47,12 +47,8 @@ " AND :date <= endDate"; // add unique result here - List<FinancialPeriod> financialPeriod = context.find(query, "date", date); - FinancialPeriod result = null; - if (!financialPeriod.isEmpty()) { - result = financialPeriod.get(0); - } - return result; + FinancialPeriod financialPeriod = (FinancialPeriod)context.findUnique(query, "date", date); + return financialPeriod; } /** @@ -71,7 +67,7 @@ " ORDER by beginDate"; // add unique result here - List<FinancialPeriod> financialPeriod = context.find(query, "beginDate", beginDate, "endDate", endDate); + List<FinancialPeriod> financialPeriod = context.findAll(query, "beginDate", beginDate, "endDate", endDate); return financialPeriod; } @@ -86,7 +82,7 @@ " ORDER BY beginDate"; // add unique result here - List<FinancialPeriod> financialPeriod = context.find(query); + List<FinancialPeriod> financialPeriod = context.findAll(query); return financialPeriod; } @@ -102,7 +98,7 @@ " ORDER BY beginDate"; // add unique result here - List<FinancialPeriod> financialPeriod = context.find(query); + List<FinancialPeriod> financialPeriod = context.findAll(query); return financialPeriod; } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialStatementDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -47,7 +47,7 @@ public List<FinancialStatement> findAllOrderedByCreateDate() throws TopiaException { String query = "FROM " + FinancialStatement.class.getName() + " ORDER BY " + FinancialStatement.TOPIA_CREATE_DATE; - List<FinancialStatement> result = context.find(query); + List<FinancialStatement> result = context.findAll(query); return result; } @@ -59,7 +59,7 @@ String query = "FROM " + FinancialStatement.class.getName() + " WHERE masterFinancialStatement = :masterFinancialStatement" + " ORDER BY " + FinancialStatement.TOPIA_CREATE_DATE; - List<FinancialStatement> result = context.find(query, "masterFinancialStatement", financialStatement); + List<FinancialStatement> result = context.findAll(query, "masterFinancialStatement", financialStatement); return result; } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FinancialTransactionDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -70,7 +70,7 @@ */ public long getCountByEntryBook(EntryBook entryBook) throws TopiaException { String query = "SELECT count(*) FROM " + FinancialTransaction.class.getName() + " t WHERE t.entryBook = :entryBook"; - Number count = (Number)context.find(query, "entryBook", entryBook).get(0); + Number count = (Number)context.findAll(query, "entryBook", entryBook).get(0); return count.longValue(); } @@ -87,7 +87,7 @@ " WHERE :beginDate <= T.transactionDate" + " AND T.transactionDate <= :endDate" + " ORDER BY T.transactionDate, T." + FinancialTransaction.TOPIA_CREATE_DATE; - List<FinancialTransaction> result = context.find(query, "beginDate", + List<FinancialTransaction> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate); return result; } @@ -107,7 +107,7 @@ " AND T.transactionDate <= :endDate" + " AND T.entryBook = :entryBook" + " ORDER BY T.transactionDate, T." + FinancialTransaction.TOPIA_CREATE_DATE; - List<FinancialTransaction> result = context.find(query, "beginDate", + List<FinancialTransaction> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return result; } @@ -133,9 +133,9 @@ List<FinancialTransaction> result = null; if (entryBook != null) { query += " AND T.entryBook = :entryBook"; - result = context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); } else { - result = context.find(query, "beginDate", beginDate, "endDate", endDate); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate); } return result; @@ -162,9 +162,9 @@ List<FinancialTransaction> result = null; if (entryBook != null) { query += " AND T.entryBook = :entryBook"; - result = context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); } else { - result = context.find(query, "beginDate", beginDate, "endDate", endDate); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate); } return result; @@ -201,9 +201,9 @@ List<FinancialTransaction> result = null; if (entryBook != null) { query += " AND T.entryBook = :entryBook"; - result = context.find(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); } else { - result = context.find(query, "beginDate", beginDate, "endDate", endDate); + result = context.findAll(query, "beginDate", beginDate, "endDate", endDate); } return result; @@ -230,7 +230,7 @@ " AND T.entryBook = :entryBook" + " AND :beginDate <= T.transactionDate" + " AND T.transactionDate <= :endDate"; - List<FinancialTransaction> result = context.find(query, "beginDate", beginDate, + List<FinancialTransaction> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate, "entryBook", entryBook); return result; } @@ -256,7 +256,7 @@ " AND entryBook = null" + " AND :beginDate <= T.transactionDate" + " AND T.transactionDate <= :endDate"; - List<FinancialTransaction> result = context.find(query, "beginDate", + List<FinancialTransaction> result = context.findAll(query, "beginDate", beginDate, "endDate", endDate); return result; @@ -377,7 +377,7 @@ } // perform query - List<FinancialTransaction> result = context.find(query, args.toArray()); + List<FinancialTransaction> result = context.findAll(query, args.toArray()); return result; } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/FiscalPeriodDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -67,7 +67,7 @@ String query = "FROM " + FiscalPeriod.class.getName() + " WHERE :financialPeriod in elements(financialPeriod)"; - List<FiscalPeriod> fiscalPeriods = context.find(query, "financialPeriod", financialPeriod); + List<FiscalPeriod> fiscalPeriods = context.findAll(query, "financialPeriod", financialPeriod); FiscalPeriod result = null; if (!fiscalPeriods.isEmpty()) { result = fiscalPeriods.get(0); @@ -85,7 +85,7 @@ String query = "FROM " + FiscalPeriod.class.getName() + " ORDER BY endDate desc"; - List<FiscalPeriod> fiscalPeriods = context.find(query); + List<FiscalPeriod> fiscalPeriods = context.findAll(query); FiscalPeriod result = null; if (!fiscalPeriods.isEmpty()) { result = fiscalPeriods.get(0); @@ -104,7 +104,7 @@ String query = "FROM " + FiscalPeriod.class.getName() + " ORDER BY endDate"; - List<FiscalPeriod> fiscalPeriods = context.find(query); + List<FiscalPeriod> fiscalPeriods = context.findAll(query); FiscalPeriod result = null; if (!fiscalPeriods.isEmpty()) { result = fiscalPeriods.get(0); @@ -123,12 +123,7 @@ " WHERE locked = false" + " ORDER BY endDate desc"; - List<FiscalPeriod> fiscalPeriods = context.find(query); - FiscalPeriod result = null; - if (!fiscalPeriods.isEmpty()) { - result = fiscalPeriods.get(0); - } - - return result; + FiscalPeriod fiscalPeriod = (FiscalPeriod)context.findUnique(query); + return fiscalPeriod; } } Modified: trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/lima-callao/src/main/java/org/chorem/lima/entity/VatStatementDAOImpl.java 2012-06-26 15:48:13 UTC (rev 3476) @@ -48,7 +48,7 @@ public List<VatStatement> findAllOrderedByCreateDate() throws TopiaException { String query = "FROM " + VatStatement.class.getName() + " ORDER BY " + VatStatement.TOPIA_CREATE_DATE; - List<VatStatement> result = context.find(query); + List<VatStatement> result = context.findAll(query); return result; } @@ -63,7 +63,7 @@ String query = "FROM " + VatStatement.class.getName() + " WHERE masterVatStatement = :masterVatStatement" + " ORDER BY " + VatStatement.TOPIA_CREATE_DATE; - List<VatStatement> result = context.find(query, "masterVatStatement", masterVatStatement); + List<VatStatement> result = context.findAll(query, "masterVatStatement", masterVatStatement); return result; } @@ -79,7 +79,7 @@ public VatStatement findVatStatementByLabel(String label) throws TopiaException { String query = "FROM " + VatStatement.class.getName() + " WHERE label LIKE :label"; - List<VatStatement> statements = context.find(query, "label", "%" + label + "%"); + List<VatStatement> statements = context.findAll(query, "label", "%" + label + "%"); VatStatement result = null; if (!statements.isEmpty()) { result = statements.get(0); Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2012-06-25 16:45:50 UTC (rev 3475) +++ trunk/pom.xml 2012-06-26 15:48:13 UTC (rev 3476) @@ -10,7 +10,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>mavenpom4redmine</artifactId> - <version>3.3.2</version> + <version>3.3.3</version> </parent> <groupId>org.chorem</groupId> @@ -130,7 +130,7 @@ <dependency> <groupId>org.apache.openejb</groupId> <artifactId>javaee-api</artifactId> - <version>6.0-3</version> + <version>6.0-4</version> <scope>runtime</scope> </dependency> @@ -172,7 +172,7 @@ <dependency> <groupId>org.jdom</groupId> <artifactId>jdom</artifactId> - <version>2.0.1</version> + <version>2.0.2</version> <scope>compile</scope> </dependency> @@ -221,7 +221,7 @@ <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> - <version>1.6.0</version> + <version>1.7.0</version> </dependency> </dependencies> @@ -324,13 +324,13 @@ <projectId>lima</projectId> <!-- customized libs version --> - <nuitonUtilsVersion>2.4.8</nuitonUtilsVersion> + <nuitonUtilsVersion>2.5</nuitonUtilsVersion> <eugenePluginVersion>2.4.2</eugenePluginVersion> - <topiaVersion>2.6.10</topiaVersion> + <topiaVersion>2.6.11</topiaVersion> <jaxxVersion>2.5-SNAPSHOT</jaxxVersion> <nuitonI18nVersion>2.4.1</nuitonI18nVersion> <openEjbVersion>4.0.0</openEjbVersion> - <slf4jVersion>1.6.5</slf4jVersion> + <slf4jVersion>1.6.6</slf4jVersion> <!-- license to use --> <license.licenseName>gpl_v3</license.licenseName>
participants (1)
-
echatellier@users.chorem.org