r3799 - in trunk: lima-business/src/main/java/org/chorem/lima lima-business/src/main/java/org/chorem/lima/business lima-business/src/main/java/org/chorem/lima/business/migration lima-business-api/src/main/java/org/chorem/lima/business/api lima-callao/src/main/java/org/chorem/lima lima-callao/src/main/xmi lima-swing/src/main/java/org/chorem/lima lima-swing/src/main/java/org/chorem/lima/ui/common lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports lima-swing/src/main/java/org/chorem/l
Author: dcosse Date: 2014-05-16 15:27:34 +0200 (Fri, 16 May 2014) New Revision: 3799 Url: http://forge.chorem.org/projects/lima/repository/revisions/3799 Log: refs#934 migration topia3 en cours Removed: trunk/lima-callao/src/main/xmi/accounting.properties trunk/lima-callao/src/main/xmi/accounting.zargo Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java trunk/lima-business/src/main/java/org/chorem/lima/business/migration/DatabaseMigrationClass.java trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0V0_5.java trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java trunk/lima-callao/src/main/java/org/chorem/lima/DefaultServiceContext.java trunk/lima-callao/src/main/xmi/accounting-model.properties trunk/lima-callao/src/main/xmi/accounting-model.zargo trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodErrorDetector.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodErrorDetector.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java Modified: trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/LimaXAResource.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -30,6 +30,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.topia.persistence.TopiaException; +import org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext; /** * Topia XA ressource containing TopiaContext to commit or rollback. @@ -44,11 +45,11 @@ private static Log log = LogFactory.getLog(LimaXAResource.class); - protected TopiaContext context; + protected AbstractTopiaPersistenceContext context; protected int timeout; - public LimaXAResource(TopiaContext context) { + public LimaXAResource(AbstractTopiaPersistenceContext context) { this.context = context; } @@ -58,7 +59,7 @@ @Override public void commit(Xid arg0, boolean arg1) throws XAException { try { - context.commitTransaction(); + context.commit(); } catch (TopiaException ex) { if (log.isErrorEnabled()) { log.error("Error", ex); @@ -125,7 +126,7 @@ @Override public void rollback(Xid arg0) throws XAException { try { - context.rollbackTransaction(); + context.rollback(); } catch (TopiaException ex) { throw new XAException(XAException.XA_HEURCOM); } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaConfig.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -31,7 +31,6 @@ import org.chorem.lima.business.accountingrules.FranceAccountingRules; import org.chorem.lima.business.migration.DatabaseMigrationClass; import org.chorem.lima.entity.LimaCallaoEntityEnum; -import org.chorem.lima.entity.LimaCallaoTopiaDaoSupplier; import org.nuiton.topia.persistence.TopiaConfigurationConstants; import org.nuiton.topia.migration.TopiaMigrationEngine; import org.nuiton.topia.migration.TopiaMigrationService; Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/LimaInterceptor.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -35,10 +35,7 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.LimaXAResource; import org.chorem.lima.entity.AccountImpl; -import org.nuiton.topia.TopiaContext; -import org.nuiton.topia.persistence.TopiaConfigurationConstants; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.framework.TopiaUtil; /** * Interceptor for topia context transaction. @@ -81,19 +78,20 @@ } LimaConfig config = LimaConfig.getInstance(); - TopiaContext rootContext = TopiaContextFactory.getContext(config.getFlatOptions()); - TopiaContext tx = rootContext.beginTransaction(); + // TODO DCossé 16/05/14 +// TopiaContext rootContext = TopiaContextFactory.getContext(config.getFlatOptions()); +// TopiaContext tx = rootContext.beginTransaction(); +// +// createShemaIfNeeded(tx); +// +// LimaDaoHelper helper = new LimaDaoHelper(tx); +// DAO_HELPER.set(helper); - createShemaIfNeeded(tx); - - LimaDaoHelper helper = new LimaDaoHelper(tx); - DAO_HELPER.set(helper); - Transaction tr = transactionManager.getTransaction(); // enlist topia xaresource, will will commited or rollback // by container - tr.enlistResource(new LimaXAResource(tx)); +// tr.enlistResource(new LimaXAResource(tx)); try { result = context.proceed(); @@ -119,19 +117,19 @@ * @param tx transaction * @throws TopiaException */ - protected void createShemaIfNeeded(TopiaContext tx) throws TopiaException { - - if (!schemaExistChecked) { - boolean exist = TopiaUtil.isSchemaExist(tx, AccountImpl.class.getName()); - if (!exist) { - - if (log.isInfoEnabled()) { - log.info("Creating to schema in database"); - } - tx.createSchema(); - } - - schemaExistChecked = true; - } - } +// protected void createShemaIfNeeded(TopiaContext tx) throws TopiaException { +// +// if (!schemaExistChecked) { +// boolean exist = TopiaUtil.isSchemaExist(tx, AccountImpl.class.getName()); +// if (!exist) { +// +// if (log.isInfoEnabled()) { +// log.info("Creating to schema in database"); +// } +// tx.createSchema(); +// } +// +// schemaExistChecked = true; +// } +// } } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/migration/DatabaseMigrationClass.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/migration/DatabaseMigrationClass.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/migration/DatabaseMigrationClass.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -24,59 +24,61 @@ */ package org.chorem.lima.business.migration; -import org.chorem.lima.entity.LimaCallaoTopiaPersistenceContext; -import org.nuiton.topia.migration.TopiaMigrationCallbackByClass; -import org.nuiton.topia.persistence.TopiaPersistenceContext; -import org.nuiton.topia.persistence.support.TopiaSqlSupport; +import org.chorem.lima.DefaultServiceContext; +import org.nuiton.topia.migration.TopiaMigrationCallbackByClassNG; +import org.nuiton.topia.persistence.TopiaException; import org.nuiton.util.Version; +import org.nuiton.topia.migration.TopiaMigrationCallbackByClassNG.MigrationCallBackForVersion; import java.util.List; +import java.util.Set; -public class DatabaseMigrationClass extends TopiaMigrationCallbackByClass<LimaCallaoTopiaPersistenceContext> { +public class DatabaseMigrationClass extends MigrationCallBackForVersion<DefaultServiceContext> { protected static final Version VERSION_0_5 = new Version("0.5"); protected static final Version VERSION_0_6 = new Version("0.6"); - public DatabaseMigrationClass() { - super(new MigrationResolver()); + @Override + public Version getVersion() { + return null; } - protected static class MigrationResolver implements MigrationCallBackForVersionResolver { + @Override + protected void prepareMigrationScript(DefaultServiceContext defaultServiceContext, List<String> strings, boolean b, boolean b2) throws TopiaException { + } + + protected static class MigrationResolver implements TopiaMigrationCallbackByClassNG.MigrationCallBackForVersionResolver { + @Override - public Class<? extends MigrationCallBackForVersion> getCallBack(Version version) { - Class<? extends MigrationCallBackForVersion> result = null; + public Set<Version> getAllVersions() { + return null; + } + @Override + public MigrationCallBackForVersion getCallBack(Version version) { + MigrationCallBackForVersion result = null; + if (version.equals(VERSION_0_5)) { - result = MigrationV0V0_5.class; + result = new MigrationV0V0_5(); } else if (version.equals(VERSION_0_6)) { - result = MigrationV0_6.class; + result = new MigrationV0_6(); } return result; } - } +// @Override +// public Class<? extends MigrationCallBackForVersion> getCallBack(Version version) { +// Class<? extends MigrationCallBackForVersion> result = null; +// +// if (version.equals(VERSION_0_5)) { +// result = MigrationV0V0_5.class; +// } else if (version.equals(VERSION_0_6)) { +// result = MigrationV0_6.class; +// } +// return result; +// } - @Override - public Version[] getAvailableVersions() { - Version[] result = new Version[]{VERSION_0_5, VERSION_0_6}; - return result; } -// @Override -// public Version getApplicationVersion() { -// // TODO DCossé 15/05/14 do it when i know how to do it -// //Version appVersion = new Version(LimaCallaoDAOHelper.getModelVersion()); -// return new Version(); -// } - - @Override - public boolean askUser(Version dbVersion, List<Version> versions) { - return true; - } - - @Override - protected TopiaSqlSupport getSqlSupport(LimaCallaoTopiaPersistenceContext topiaPersistenceContext) { - return topiaPersistenceContext.getSqlSupport(); - } } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0V0_5.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0V0_5.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0V0_5.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -24,8 +24,7 @@ */ package org.chorem.lima.business.migration; -import org.nuiton.topia.migration.TopiaMigrationCallbackByClass; -import org.nuiton.topia.migration.TopiaMigrationCallbackByClass.MigrationCallBackForVersion; +import org.nuiton.topia.migration.TopiaMigrationCallbackByClassNG.MigrationCallBackForVersion; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaPersistenceContext; import org.nuiton.util.Version; @@ -33,15 +32,16 @@ public class MigrationV0V0_5 extends MigrationCallBackForVersion { - public MigrationV0V0_5(Version version, TopiaMigrationCallbackByClass callBack) { - super(version, callBack); - } - @Override protected void prepareMigrationScript(TopiaPersistenceContext tx, - List<String> queries, + List queries, boolean showSql, boolean showProgression) throws TopiaException { queries.add("Alter table record alter AMOUNT clob;"); } + + @Override + public Version getVersion() { + return null; + } } Modified: trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java =================================================================== --- trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business/src/main/java/org/chorem/lima/business/migration/MigrationV0_6.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -28,10 +28,12 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.topia.migration.TopiaMigrationCallbackByClass; +import org.nuiton.topia.migration.TopiaMigrationCallbackByClassNG; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaPersistenceContext; import org.nuiton.util.Version; + import java.util.List; /** @@ -40,18 +42,14 @@ * @author tchemit <chemit@codelutin.com> * @since 0.6 */ -public class MigrationV0_6 extends TopiaMigrationCallbackByClass.MigrationCallBackForVersion { +public class MigrationV0_6 extends TopiaMigrationCallbackByClassNG.MigrationCallBackForVersion { /** Logger. */ private static final Log log = LogFactory.getLog(MigrationV0_6.class); - public MigrationV0_6(Version version, TopiaMigrationCallbackByClass callBack) { - super(version, callBack); - } - @Override protected void prepareMigrationScript(TopiaPersistenceContext tx, - List<String> queries, + List queries, boolean showSql, boolean showProgression) throws TopiaException { @@ -81,4 +79,9 @@ queries.add("drop table record"); queries.add("drop table letter"); } + + @Override + public Version getVersion() { + return null; + } } Modified: trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java =================================================================== --- trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-business-api/src/main/java/org/chorem/lima/business/api/AccountService.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -27,7 +27,7 @@ import org.chorem.lima.business.LimaException; import org.chorem.lima.entity.Account; -import org.nuiton.topia.TopiaException; +import org.nuiton.topia.persistence.TopiaException; import java.util.List; Modified: trunk/lima-callao/src/main/java/org/chorem/lima/DefaultServiceContext.java =================================================================== --- trunk/lima-callao/src/main/java/org/chorem/lima/DefaultServiceContext.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-callao/src/main/java/org/chorem/lima/DefaultServiceContext.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -23,12 +23,20 @@ */ import com.google.common.base.Supplier; +import org.nuiton.topia.persistence.TopiaDao; +import org.nuiton.topia.persistence.TopiaEntity; +import org.nuiton.topia.persistence.TopiaIdFactory; +import org.nuiton.topia.persistence.TopiaPersistenceContext; +import org.nuiton.topia.persistence.TopiaReplicationDestination; import org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext; +import org.nuiton.topia.persistence.internal.support.TopiaFiresSupport; +import java.util.List; + /** * Created by davidcosse on 15/05/14. */ -public class DefaultServiceContext implements ServiceContext { +public class DefaultServiceContext implements ServiceContext, TopiaPersistenceContext { protected AbstractTopiaPersistenceContext persistenceContext; protected Supplier<AbstractTopiaPersistenceContext> transactionSupplier; @@ -62,4 +70,84 @@ } return persistenceContext; } + + @Override + public <E extends TopiaEntity> E findByTopiaId(String s) { + return null; + } + + @Override + public void update(TopiaEntity topiaEntity) { + + } + + @Override + public void delete(TopiaEntity topiaEntity) { + + } + + @Override + public <E extends TopiaEntity> void deleteAll(Iterable<E> es) { + + } + + @Override + public TopiaIdFactory getTopiaIdFactory() { + return null; + } + + @Override + public void closeContext() { + + } + + @Override + public boolean isClosed() { + return false; + } + + @Override + public TopiaFiresSupport getTopiaFiresSupport() { + return null; + } + + @Override + public <E extends TopiaEntity> TopiaDao<E> getDao(Class<E> eClass) { + return null; + } + + @Override + public <E extends TopiaEntity, D extends TopiaDao<E>> D getDao(Class<E> eClass, Class<D> dClass) { + return null; + } + + @Override + public void replicate(TopiaEntity topiaEntity) { + + } + + @Override + public void replicate(TopiaReplicationDestination topiaReplicationDestination, Object... objects) throws IllegalArgumentException { + + } + + @Override + public <T extends TopiaEntity> void replicateEntity(TopiaReplicationDestination topiaReplicationDestination, T t) throws IllegalArgumentException { + + } + + @Override + public <T extends TopiaEntity> void replicateEntities(TopiaReplicationDestination topiaReplicationDestination, List<T> ts) throws IllegalArgumentException { + + } + + @Override + public void commit() { + + } + + @Override + public void rollback() { + + } } Modified: trunk/lima-callao/src/main/xmi/accounting-model.properties =================================================================== --- trunk/lima-callao/src/main/xmi/accounting-model.properties 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-callao/src/main/xmi/accounting-model.properties 2014-05-16 13:27:34 UTC (rev 3799) @@ -28,6 +28,7 @@ model.tagvalue.constantPrefix=PROPERTY_ model.tagValue.notGenerateToString=true model.tagvalue.String=text +model.tagValue.doNotGenerateBooleanGetMethods=false # natural id org.chorem.lima.entity.Account.class.tagvalue.naturalIdMutable=false Modified: trunk/lima-callao/src/main/xmi/accounting-model.zargo =================================================================== (Binary files differ) Deleted: trunk/lima-callao/src/main/xmi/accounting.properties =================================================================== --- trunk/lima-callao/src/main/xmi/accounting.properties 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-callao/src/main/xmi/accounting.properties 2014-05-16 13:27:34 UTC (rev 3799) @@ -1,62 +0,0 @@ -### -# #%L -# Lima callao -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2008 - 2012 CodeLutin, Chatellier Eric -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/gpl-3.0.html>. -# #L% -### -# Precise l'entete de l'ensemble des fichiers generes -model.tagvalue.copyright=/*\n Copyright (C) 2009-2012 Lima Callao\n */ -model.tagvalue.version=0.6 -model.tagvalue.constantPrefix=PROPERTY_ -model.tagValue.notGenerateToString=true -model.tagvalue.String=text - -# natural id -org.chorem.lima.entity.Account.class.tagvalue.naturalIdMutable=false -org.chorem.lima.entity.Account.attribute.accountNumber.tagvalue.naturalId=true -org.chorem.lima.entity.Account.attribute.accountNumber.tagvalue.notNull=true - -org.chorem.lima.entity.FinancialPeriod.class.tagvalue.naturalIdMutable=false -org.chorem.lima.entity.FinancialPeriod.attribute.beginDate.tagvalue.naturalId=true -org.chorem.lima.entity.FinancialPeriod.attribute.beginDate.tagvalue.notNull=true -org.chorem.lima.entity.FinancialPeriod.attribute.endDate.tagvalue.naturalId=true -org.chorem.lima.entity.FinancialPeriod.attribute.endDate.tagvalue.notNull=true - -org.chorem.lima.entity.FiscalPeriod.class.tagvalue.naturalIdMutable=true -org.chorem.lima.entity.FiscalPeriod.attribute.beginDate.tagvalue.naturalId=true -org.chorem.lima.entity.FiscalPeriod.attribute.beginDate.tagvalue.notNull=true -org.chorem.lima.entity.FiscalPeriod.attribute.endDate.tagvalue.naturalId=true -org.chorem.lima.entity.FiscalPeriod.attribute.endDate.tagvalue.notNull=true - -# lazy -org.chorem.lima.entity.ClosedPeriodicEntryBook.attribute.entryBook.tagvalue.lazy=false -org.chorem.lima.entity.ClosedPeriodicEntryBook.attribute.financialPeriod.tagvalue.lazy=false - -org.chorem.lima.entity.Entry.attribute.account.tagvalue.lazy=false -org.chorem.lima.entity.Entry.attribute.financialTransaction.tagvalue.lazy=false - -org.chorem.lima.entity.FinancialTransaction.attribute.entry.tagvalue.lazy=false -org.chorem.lima.entity.FinancialTransaction.attribute.entryBook.tagvalue.lazy=false -org.chorem.lima.entity.FinancialStatement.attribute.subFinancialStatements.tagvalue.lazy=false -org.chorem.lima.entity.FinancialStatement.attribute.masterFinancialStatement.tagvalue.lazy=false - -org.chorem.lima.entity.VatStatement.attribute.subVatStatements.tagvalue.lazy=false -org.chorem.lima.entity.VatStatement.attribute.masterVatStatement.tagvalue.lazy=false Deleted: trunk/lima-callao/src/main/xmi/accounting.zargo =================================================================== (Binary files differ) Modified: trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/LimaConfig.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -32,12 +32,12 @@ import org.apache.commons.logging.LogFactory; import org.chorem.lima.actions.MiscAction; import org.chorem.lima.business.api.OptionsService; -import org.chorem.lima.entity.LimaCallaoDAOHelper; +import org.chorem.lima.entity.LimaCallaoEntityEnum; import org.chorem.lima.service.LimaServiceFactory; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ArgumentsParserException; import org.nuiton.config.ConfigOptionDef; -import org.nuiton.topia.TopiaContextFactory; +import org.nuiton.topia.persistence.TopiaConfigurationConstants; import org.nuiton.util.Version; import org.nuiton.util.VersionUtil; import org.nuiton.util.converter.ConverterUtil; @@ -150,8 +150,8 @@ log.error("Can't read configuration", ex); } } - instance.setOption(TopiaContextFactory.CONFIG_PERSISTENCE_CLASSES, - LimaCallaoDAOHelper.getImplementationClassesAsString()); + instance.setOption(TopiaConfigurationConstants.CONFIG_PERSISTENCE_CLASSES, + LimaCallaoEntityEnum.getImplementationClassesAsString()); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/common/FinancialTransactionTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -130,7 +130,7 @@ newEntry.setAccount(entry.getAccount()); newEntry.setDescription(entry.getDescription()); newEntry.setAmount(entry.getAmount()); - newEntry.setDebit(entry.getDebit()); + newEntry.setDebit(entry.isDebit()); newEntry = financialTransactionService.createEntry(newEntry); transaction.addEntry(newEntry); @@ -190,7 +190,7 @@ newEntry.setAccount(entry.getAccount()); newEntry.setDescription(entry.getDescription()); newEntry.setAmount(entry.getAmount()); - newEntry.setDebit(entry.getDebit()); + newEntry.setDebit(entry.isDebit()); newEntry = financialTransactionService.createEntry(newEntry); newTransaction.addEntry(newEntry); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/entrybooksreports/EntryBooksReportsTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -161,10 +161,10 @@ result = currentRow.getLettering(); break; case 5: - result = currentRow.getDebit() ? currentRow.getAmount() : BigDecimal.ZERO; + result = currentRow.isDebit() ? currentRow.getAmount() : BigDecimal.ZERO; break; case 6: - result = currentRow.getDebit() ? BigDecimal.ZERO : currentRow.getAmount(); + result = currentRow.isDebit() ? BigDecimal.ZERO : currentRow.getAmount(); break; } } else { Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodErrorDetector.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodErrorDetector.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodErrorDetector.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -45,7 +45,7 @@ ClosedPeriodicEntryBook closedPeriodicEntryBook = model.get(row); - error = closedPeriodicEntryBook.getLocked(); + error = closedPeriodicEntryBook.isLocked(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialperiod/FinancialPeriodTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -83,7 +83,7 @@ public Object getValueAt(int row) { ClosedPeriodicEntryBook closedPeriodicEntryBook = tableModel.get(row); String status = t("lima.common.open"); - if (closedPeriodicEntryBook.getLocked()) { + if (closedPeriodicEntryBook.isLocked()) { status = t("lima.common.closed"); } return status; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialstatementchart/FinancialStatementChartViewHandler.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -254,8 +254,8 @@ treePath = new TreePath(treeTableModel.getRoot()); } //test if selectedrow is account or ledger - log.debug(financialStatement.getHeader()); - if (financialStatement.getHeader()) { + log.debug(financialStatement.isHeader()); + if (financialStatement.isHeader()) { final FinancialStatementHeaderForm financialStatementHeaderForm = new FinancialStatementHeaderForm(view); financialStatementHeaderForm.setFinancialStatement(financialStatement); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/CreditColumn.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -44,7 +44,7 @@ @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); - return entry.getDebit() ? BigDecimal.ZERO : entry.getAmount(); + return entry.isDebit() ? BigDecimal.ZERO : entry.getAmount(); } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/DebitColumn.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -44,7 +44,7 @@ @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); - return entry.getDebit() ? entry.getAmount() : BigDecimal.ZERO; + return entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO; } @Override Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/financialtransaction/FinancialTransactionViewHandler.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -434,7 +434,7 @@ entry.setAccount(entryTmp.getAccount()); entry.setDescription(entryTmp.getDescription()); entry.setAmount(entryTmp.getAmount()); - entry.setDebit(entryTmp.getDebit()); + entry.setDebit(entryTmp.isDebit()); if (table.isEditing()) { TableCellEditor editor = table.getCellEditor(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodErrorDetector.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodErrorDetector.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodErrorDetector.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -45,7 +45,7 @@ FiscalPeriod fiscalPeriod = model.get(row); - error = fiscalPeriod.getLocked(); + error = fiscalPeriod.isLocked(); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -79,7 +79,7 @@ public Object getValueAt(int row) { FiscalPeriod fiscalPeriod = tableModel.get(row); String status = t("lima.ui.fiscalperiod.open"); - if (fiscalPeriod.getLocked()) { + if (fiscalPeriod.isLocked()) { status = t("lima.ui.fiscalperiod.closed"); } return status; Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/fiscalperiod/FiscalPeriodViewHandler.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -462,7 +462,7 @@ } //no action possible for fiscal period closed - if (!fiscalPeriodAt.getLocked()){ + if (!fiscalPeriodAt.isLocked()){ if (log.isDebugEnabled()) { log.debug("selectedFiscalPeriod not locked"); } Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/ledger/LedgerTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -191,7 +191,7 @@ Entry currentRow = (Entry) result; BigDecimal amountDebit = BigDecimal.ZERO, amountCredit = BigDecimal.ZERO; - if (currentRow.getDebit()) { + if (currentRow.isDebit()) { amountDebit = currentRow.getAmount(); } else { amountCredit = currentRow.getAmount(); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringTableModel.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -93,7 +93,7 @@ @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); - return entry.getDebit() ? entry.getAmount() : BigDecimal.ZERO; + return entry.isDebit() ? entry.getAmount() : BigDecimal.ZERO; } }); @@ -101,7 +101,7 @@ @Override public Object getValueAt(int row) { Entry entry = tableModel.get(row); - return entry.getDebit() ? BigDecimal.ZERO : entry.getAmount(); + return entry.isDebit() ? BigDecimal.ZERO : entry.getAmount(); } }); Modified: trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2014-05-16 08:39:35 UTC (rev 3798) +++ trunk/lima-swing/src/main/java/org/chorem/lima/ui/lettering/LetteringViewHandler.java 2014-05-16 13:27:34 UTC (rev 3799) @@ -187,7 +187,7 @@ BigDecimal firstSelectedEntryAmount = firstSelectedEntry.getAmount(); BigDecimal secondSelectedEntryAmount = secondSelectedEntry.getAmount(); - if ( secondSelectedEntry.getDebit() != firstSelectedEntry.getDebit() + if ( secondSelectedEntry.isDebit() != firstSelectedEntry.isDebit() && (firstSelectedEntryAmount.subtract(secondSelectedEntryAmount).abs().compareTo(BigDecimal.ZERO) >0 && firstSelectedEntryAmount.subtract(secondSelectedEntryAmount).abs().compareTo(BigDecimal.ONE) <0) ) { onButtonModeChanged(ButtonMode.EQUALIZED); @@ -270,7 +270,7 @@ editModel.setDebit(BigDecimal.ZERO); editModel.setSolde(BigDecimal.ZERO, false); } else { - balanceCalculation(balance.getAmount(), balance.getDebit()); + balanceCalculation(balance.getAmount(), balance.isDebit()); } }
participants (1)
-
dcosse@users.chorem.org