r3031 - in trunk: topia-it topia-it/src/main/java/org/nuiton/topia/it topia-it/src/main/java/org/nuiton/topia/it/legacy topia-it/src/main/xmi topia-it/src/test/java/org/nuiton/topia/it topia-it/src/test/java/org/nuiton/topia/it/legacy topia-it/src/test/java/org/nuiton/topia/it/legacy/framework topia-it/src/test/java/org/nuiton/topia/it/legacy/generator topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util topia-it/src
Author: athimel Date: 2014-03-14 17:31:08 +0100 (Fri, 14 Mar 2014) New Revision: 3031 Url: http://forge.nuiton.org/projects/topia/repository/revisions/3031 Log: refs-30 2774 Migrate mapping tests model from topia-jpa into topia-it module Added: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyApplicationContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyDao.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyEntity.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyPersistenceContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyApplicationContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyDaoSupplier.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyPersistenceContext.java trunk/topia-it/src/main/xmi/topia-it-legacy.properties trunk/topia-it/src/main/xmi/topia-it-legacy.zargo trunk/topia-it/src/main/xmi/topia-it-mapping.properties trunk/topia-it/src/main/xmi/topia-it-mapping.zargo Removed: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestApplicationContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestDao.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestEntity.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestPersistenceContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestApplicationContext.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestDaoSupplier.java trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestPersistenceContext.java trunk/topia-it/src/main/xmi/topiatest.properties trunk/topia-it/src/main/xmi/topiatest.zargo trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/test/evo1912/ Modified: trunk/topia-it/pom.xml trunk/topia-it/src/main/java/org/nuiton/topia/it/TopiaConfigurationHelper.java trunk/topia-it/src/test/java/org/nuiton/topia/it/GenerateTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TestHelper.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaApplicationContextCacheTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaDatabase.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaJpaSupportTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaConnectionProviderTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaContextReplicateTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/generator/TopiaTestCase.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/EntityVisitorExportXmlTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/NaturalIdTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/CollectorTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/EntityOperatorTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityBinderTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityHelperTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityRefTesterTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/test/ano1882/DAOAbstractTransformerTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/CascadeSaveTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/EnumTest.java trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/deletetest/DeleteEntityTest.java trunk/topia-it/src/test/java/org/nuiton/topia/persistence/internal/TopiaDaoTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractTopiaReplicationServiceTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplAllTest.java trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplTest.java trunk/topia-templates/src/main/java/org/nuiton/topia/templates/BinderHelperTransformer.java trunk/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java trunk/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java Modified: trunk/topia-it/pom.xml =================================================================== --- trunk/topia-it/pom.xml 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/pom.xml 2014-03-14 16:31:08 UTC (rev 3031) @@ -130,15 +130,36 @@ </configuration> <executions> + + <!-- Extraction des modèles --> <execution> - <id>Model Generator</id> + <id>generate-objectmodel</id> <phase>generate-sources</phase> <configuration> + <skipInputs>model</skipInputs> + <inputs>zargo</inputs> + <resolver>org.nuiton.util.FasterCachedResourceResolver</resolver> + <fullPackagePath>org.nuiton.topia.it</fullPackagePath> + <defaultPackage>org.nuiton.topia.it</defaultPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + + <!-- Génération du modèle "topia-it-legacy" --> + <execution> + <id>Model Generator (topia-it-legacy)</id> + <phase>generate-sources</phase> + <configuration> + <inputs> + target/generated-sources/models:topia-it-legacy.objectmodel + </inputs> <templates> org.nuiton.eugene.java.JavaInterfaceTransformer, org.nuiton.eugene.java.JavaBeanTransformer, + org.nuiton.eugene.java.JavaEnumerationTransformer, org.nuiton.topia.templates.TopiaMetaTransformer, - org.nuiton.topia.templates.EntityDTOTransformer, org.nuiton.topia.templates.BinderHelperTransformer </templates> <fullPackagePath>org.nuiton.topia.it.legacy</fullPackagePath> @@ -148,6 +169,30 @@ <goal>generate</goal> </goals> </execution> + + <!-- Génération du modèle "topia-it-mapping" --> + <execution> + <id>Model Generator (topia-it-mapping)</id> + <phase>generate-sources</phase> + <configuration> + <inputs> + target/generated-sources/models:topia-it-mapping.objectmodel + </inputs> + <templates> + org.nuiton.eugene.java.JavaInterfaceTransformer, + org.nuiton.eugene.java.JavaBeanTransformer, + org.nuiton.eugene.java.JavaEnumerationTransformer, + org.nuiton.topia.templates.TopiaMetaTransformer, + org.nuiton.topia.templates.BinderHelperTransformer + </templates> + <fullPackagePath>org.nuiton.topia.it.mapping</fullPackagePath> + <defaultPackage>org.nuiton.topia.it.mapping</defaultPackage> + </configuration> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> <dependencies> <dependency> Modified: trunk/topia-it/src/main/java/org/nuiton/topia/it/TopiaConfigurationHelper.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/TopiaConfigurationHelper.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/TopiaConfigurationHelper.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -27,8 +27,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.cfg.Environment; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.persistence.TopiaConfigurationConstants; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; import org.nuiton.topia.junit.ConfigurationHelper; import java.io.File; @@ -104,7 +104,7 @@ configuration.load(stream); configuration.setProperty( TopiaConfigurationConstants.CONFIG_PERSISTENCE_CLASSES, - TopiaTestEntityEnum.getImplementationClassesAsString()); + TopiaItLegacyEntityEnum.getImplementationClassesAsString()); return configuration; } Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyApplicationContext.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestApplicationContext.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyApplicationContext.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyApplicationContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,48 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.nuiton.topia.persistence.internal.AbstractTopiaApplicationContext; + +import java.util.Map; +import java.util.Properties; + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public abstract class AbstractTopiaItLegacyApplicationContext<E extends AbstractTopiaItLegacyPersistenceContext> + extends AbstractTopiaApplicationContext<E> { + + protected AbstractTopiaItLegacyApplicationContext(Properties properties) { + super(properties); + } + + protected AbstractTopiaItLegacyApplicationContext(Map<String, String> configuration) { + super(configuration); + } +} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyDao.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestDao.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyDao.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyDao.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,37 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.nuiton.topia.persistence.internal.AbstractTopiaDao; +import org.nuiton.topia.persistence.TopiaEntity; + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public abstract class AbstractTopiaItLegacyDao<E extends TopiaEntity> extends AbstractTopiaDao<E> { +} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyEntity.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestEntity.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyEntity.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyEntity.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,37 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.nuiton.topia.persistence.internal.AbstractTopiaEntity; + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public abstract class AbstractTopiaItLegacyEntity extends AbstractTopiaEntity { + private static final long serialVersionUID = 1L; +} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyPersistenceContext.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestPersistenceContext.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyPersistenceContext.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaItLegacyPersistenceContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,44 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +import org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext; +import org.nuiton.topia.persistence.support.TopiaListenableSupport; +import org.nuiton.topia.persistence.internal.HibernateProvider; +import org.nuiton.topia.persistence.internal.TopiaHibernateSessionRegistry; +import org.nuiton.topia.persistence.TopiaIdFactory; + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public abstract class AbstractTopiaItLegacyPersistenceContext extends AbstractTopiaPersistenceContext { + + protected AbstractTopiaItLegacyPersistenceContext(HibernateProvider hibernateProvider, TopiaListenableSupport listenableSupport, TopiaIdFactory topiaIdFactory, TopiaHibernateSessionRegistry sessionRegistry) { + super(hibernateProvider, listenableSupport, topiaIdFactory, sessionRegistry); + } +} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestApplicationContext.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestApplicationContext.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestApplicationContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,48 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -import org.nuiton.topia.persistence.internal.AbstractTopiaApplicationContext; - -import java.util.Map; -import java.util.Properties; - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public abstract class AbstractTopiaTestApplicationContext<E extends AbstractTopiaTestPersistenceContext> - extends AbstractTopiaApplicationContext<E> { - - protected AbstractTopiaTestApplicationContext(Properties properties) { - super(properties); - } - - protected AbstractTopiaTestApplicationContext(Map<String, String> configuration) { - super(configuration); - } -} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestDao.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestDao.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestDao.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,37 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -import org.nuiton.topia.persistence.internal.AbstractTopiaDao; -import org.nuiton.topia.persistence.TopiaEntity; - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public abstract class AbstractTopiaTestDao<E extends TopiaEntity> extends AbstractTopiaDao<E> { -} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestEntity.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestEntity.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestEntity.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,37 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -import org.nuiton.topia.persistence.internal.AbstractTopiaEntity; - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public abstract class AbstractTopiaTestEntity extends AbstractTopiaEntity { - private static final long serialVersionUID = 1L; -} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestPersistenceContext.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestPersistenceContext.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/AbstractTopiaTestPersistenceContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,44 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -import org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext; -import org.nuiton.topia.persistence.support.TopiaListenableSupport; -import org.nuiton.topia.persistence.internal.HibernateProvider; -import org.nuiton.topia.persistence.internal.TopiaHibernateSessionRegistry; -import org.nuiton.topia.persistence.TopiaIdFactory; - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public abstract class AbstractTopiaTestPersistenceContext extends AbstractTopiaPersistenceContext { - - protected AbstractTopiaTestPersistenceContext(HibernateProvider hibernateProvider, TopiaListenableSupport listenableSupport, TopiaIdFactory topiaIdFactory, TopiaHibernateSessionRegistry sessionRegistry) { - super(hibernateProvider, listenableSupport, topiaIdFactory, sessionRegistry); - } -} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyApplicationContext.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestApplicationContext.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyApplicationContext.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyApplicationContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,35 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public interface TopiaItLegacyApplicationContext { + +} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyDaoSupplier.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestDaoSupplier.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyDaoSupplier.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyDaoSupplier.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,34 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +/** + * Created on 12/20/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since XXX + */ +public interface TopiaItLegacyDaoSupplier { +} Copied: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyPersistenceContext.java (from rev 3029, trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestPersistenceContext.java) =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyPersistenceContext.java (rev 0) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaItLegacyPersistenceContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,35 @@ +package org.nuiton.topia.it.legacy; + +/* + * #%L + * ToPIA :: IT + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2004 - 2014 CodeLutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser 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 Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +/** + * Created on 12/19/13. + * + * @author Tony Chemit <chemit@codelutin.com> + * @since 3.0 + */ +public interface TopiaItLegacyPersistenceContext { + +} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestApplicationContext.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestApplicationContext.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestApplicationContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,35 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public interface TopiaTestApplicationContext { - -} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestDaoSupplier.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestDaoSupplier.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestDaoSupplier.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,34 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -/** - * Created on 12/20/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since XXX - */ -public interface TopiaTestDaoSupplier { -} Deleted: trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestPersistenceContext.java =================================================================== --- trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestPersistenceContext.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/java/org/nuiton/topia/it/legacy/TopiaTestPersistenceContext.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,35 +0,0 @@ -package org.nuiton.topia.it.legacy; - -/* - * #%L - * ToPIA :: IT - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2004 - 2014 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser 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 Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/lgpl-3.0.html>. - * #L% - */ - -/** - * Created on 12/19/13. - * - * @author Tony Chemit <chemit@codelutin.com> - * @since 3.0 - */ -public interface TopiaTestPersistenceContext { - -} Copied: trunk/topia-it/src/main/xmi/topia-it-legacy.properties (from rev 3029, trunk/topia-it/src/main/xmi/topiatest.properties) =================================================================== --- trunk/topia-it/src/main/xmi/topia-it-legacy.properties (rev 0) +++ trunk/topia-it/src/main/xmi/topia-it-legacy.properties 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,42 @@ +### +# #%L +# ToPIA :: IT +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2004 - 2014 CodeLutin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser 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 Lesser Public License for more details. +# +# You should have received a copy of the GNU General Lesser Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/lgpl-3.0.html>. +# #L% +### +model.tagvalue.i18n=topia.test.common. +model.tagvalue.generateOperatorForDAOHelper=true +model.tagvalue.constantPrefix=PROPERTY_ +model.tagvalue.generateDTOTopiaId=true +model.tagValue.applicationContextSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaItLegacyApplicationContext +model.tagValue.persistenceContextSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaItLegacyPersistenceContext +model.tagValue.daoSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaItLegacyDao +model.tagValue.entitySuperClass=org.nuiton.topia.it.legacy.AbstractTopiaItLegacyEntity + +#org.nuiton.topia.it.legacy.topiatest.Company.class.tagvalue.naturalIdMutable=false +#org.nuiton.topia.it.legacy.topiatest.Company.attribute.siret.tagvalue.naturalId=true +#org.nuiton.topia.it.legacy.topiatest.Company.attribute.name.tagvalue.naturalId=true +#org.nuiton.topia.it.legacy.topiatest.Company.attribute.name.tagvalue.notNull=false + +org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNotNull.tagvalue.naturalId=true +org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNull.tagvalue.naturalId=true +org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNull.tagvalue.notNull=false + +org.nuiton.topia.it.legacy.topiatest.Personne.attribute.otherGender.tagValue.useEnumerationName=true Copied: trunk/topia-it/src/main/xmi/topia-it-legacy.zargo (from rev 3029, trunk/topia-it/src/main/xmi/topiatest.zargo) =================================================================== (Binary files differ) Added: trunk/topia-it/src/main/xmi/topia-it-mapping.properties =================================================================== --- trunk/topia-it/src/main/xmi/topia-it-mapping.properties (rev 0) +++ trunk/topia-it/src/main/xmi/topia-it-mapping.properties 2014-03-14 16:31:08 UTC (rev 3031) @@ -0,0 +1,26 @@ +### +# #%L +# ToPIA :: Persistence +# +# $Id: topia-it-mapping.properties 2548 2012-05-29 14:08:35Z athimel $ +# $HeadURL: http://svn.nuiton.org/svn/topia/branches/topia-jpa/topia-persistence-tck/src... $ +# %% +# Copyright (C) 2004 - 2010 CodeLutin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser 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 Lesser Public License for more details. +# +# You should have received a copy of the GNU General Lesser Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/lgpl-3.0.html>. +# #L% +### +model.tagvalue.generateOperatorForDAOHelper=true +model.tagvalue.constantPrefix=PROPERTY_ Added: trunk/topia-it/src/main/xmi/topia-it-mapping.zargo =================================================================== (Binary files differ) Property changes on: trunk/topia-it/src/main/xmi/topia-it-mapping.zargo ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/topia-it/src/main/xmi/topiatest.properties =================================================================== --- trunk/topia-it/src/main/xmi/topiatest.properties 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/main/xmi/topiatest.properties 2014-03-14 16:31:08 UTC (rev 3031) @@ -1,42 +0,0 @@ -### -# #%L -# ToPIA :: IT -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2004 - 2014 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser 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 Lesser Public License for more details. -# -# You should have received a copy of the GNU General Lesser Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/lgpl-3.0.html>. -# #L% -### -model.tagvalue.i18n=topia.test.common. -model.tagvalue.generateOperatorForDAOHelper=true -model.tagvalue.constantPrefix=PROPERTY_ -model.tagvalue.generateDTOTopiaId=true -model.tagValue.applicationContextSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaTestApplicationContext -model.tagValue.persistenceContextSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaTestPersistenceContext -model.tagValue.daoSuperClass=org.nuiton.topia.it.legacy.AbstractTopiaTestDao -model.tagValue.entitySuperClass=org.nuiton.topia.it.legacy.AbstractTopiaTestEntity - -#org.nuiton.topia.it.legacy.topiatest.Company.class.tagvalue.naturalIdMutable=false -#org.nuiton.topia.it.legacy.topiatest.Company.attribute.siret.tagvalue.naturalId=true -#org.nuiton.topia.it.legacy.topiatest.Company.attribute.name.tagvalue.naturalId=true -#org.nuiton.topia.it.legacy.topiatest.Company.attribute.name.tagvalue.notNull=false - -org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNotNull.tagvalue.naturalId=true -org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNull.tagvalue.naturalId=true -org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity.attribute.naturalIdNull.tagvalue.notNull=false - -org.nuiton.topia.it.legacy.topiatest.Personne.attribute.otherGender.tagValue.useEnumerationName=true Deleted: trunk/topia-it/src/main/xmi/topiatest.zargo =================================================================== (Binary files differ) Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/GenerateTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/GenerateTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/GenerateTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -26,18 +26,18 @@ import org.junit.Assert; import org.junit.Test; -import org.nuiton.topia.it.legacy.AbstractTopiaTestApplicationContext; -import org.nuiton.topia.it.legacy.AbstractTopiaTestDao; -import org.nuiton.topia.it.legacy.AbstractTopiaTestEntity; -import org.nuiton.topia.it.legacy.AbstractTopiaTestPersistenceContext; -import org.nuiton.topia.it.legacy.AbstractTopiaTestTopiaApplicationContext; -import org.nuiton.topia.it.legacy.AbstractTopiaTestTopiaPersistenceContext; -import org.nuiton.topia.it.legacy.TopiaTestApplicationContext; -import org.nuiton.topia.it.legacy.TopiaTestDaoSupplier; -import org.nuiton.topia.it.legacy.TopiaTestPersistenceContext; -import org.nuiton.topia.it.legacy.TopiaTestTopiaApplicationContext; -import org.nuiton.topia.it.legacy.TopiaTestTopiaDaoSupplier; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyEntity; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyApplicationContext; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyDao; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyPersistenceContext; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyTopiaApplicationContext; +import org.nuiton.topia.it.legacy.AbstractTopiaItLegacyTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyApplicationContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyDaoSupplier; +import org.nuiton.topia.it.legacy.TopiaItLegacyPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaApplicationContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaDaoSupplier; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.test.entities.AbstractPetTopiaDao; import org.nuiton.topia.it.legacy.test.entities.GeneratedPetTopiaDao; import org.nuiton.topia.it.legacy.test.entities.PetAbstract; @@ -58,51 +58,51 @@ public void testApplicationContext() { // add contract from class-path - Assert.assertTrue(TopiaTestApplicationContext.class.isAssignableFrom(AbstractTopiaTestTopiaApplicationContext.class)); - Assert.assertTrue(TopiaTestApplicationContext.class.isAssignableFrom(TopiaTestTopiaApplicationContext.class)); + Assert.assertTrue(TopiaItLegacyApplicationContext.class.isAssignableFrom(AbstractTopiaItLegacyTopiaApplicationContext.class)); + Assert.assertTrue(TopiaItLegacyApplicationContext.class.isAssignableFrom(TopiaItLegacyTopiaApplicationContext.class)); // add super-class from tag-value applicationContextSuperClass - Assert.assertTrue(AbstractTopiaTestApplicationContext.class.isAssignableFrom(AbstractTopiaTestTopiaApplicationContext.class)); - Assert.assertTrue(AbstractTopiaTestApplicationContext.class.isAssignableFrom(TopiaTestTopiaApplicationContext.class)); + Assert.assertTrue(AbstractTopiaItLegacyApplicationContext.class.isAssignableFrom(AbstractTopiaItLegacyTopiaApplicationContext.class)); + Assert.assertTrue(AbstractTopiaItLegacyApplicationContext.class.isAssignableFrom(TopiaItLegacyTopiaApplicationContext.class)); } @Test public void testDaoSupplier() { // add contract from class-path - Assert.assertTrue(TopiaTestDaoSupplier.class.isAssignableFrom(TopiaTestTopiaDaoSupplier.class)); + Assert.assertTrue(TopiaItLegacyDaoSupplier.class.isAssignableFrom(TopiaItLegacyTopiaDaoSupplier.class)); } @Test public void testPersistenceContext() { // use dao supplier as contract of topia persistence context - Assert.assertTrue(TopiaTestDaoSupplier.class.isAssignableFrom(AbstractTopiaTestTopiaPersistenceContext.class)); + Assert.assertTrue(TopiaItLegacyDaoSupplier.class.isAssignableFrom(AbstractTopiaItLegacyTopiaPersistenceContext.class)); // add contract from class-path - Assert.assertTrue(TopiaTestPersistenceContext.class.isAssignableFrom(AbstractTopiaTestTopiaPersistenceContext.class)); - Assert.assertTrue(TopiaTestPersistenceContext.class.isAssignableFrom(TopiaTestTopiaPersistenceContext.class)); + Assert.assertTrue(TopiaItLegacyPersistenceContext.class.isAssignableFrom(AbstractTopiaItLegacyTopiaPersistenceContext.class)); + Assert.assertTrue(TopiaItLegacyPersistenceContext.class.isAssignableFrom(TopiaItLegacyTopiaPersistenceContext.class)); // add super-class from tag-value persistenceContextSuperClass - Assert.assertTrue(AbstractTopiaTestPersistenceContext.class.isAssignableFrom(AbstractTopiaTestTopiaPersistenceContext.class)); - Assert.assertTrue(AbstractTopiaTestPersistenceContext.class.isAssignableFrom(TopiaTestTopiaPersistenceContext.class)); + Assert.assertTrue(AbstractTopiaItLegacyPersistenceContext.class.isAssignableFrom(AbstractTopiaItLegacyTopiaPersistenceContext.class)); + Assert.assertTrue(AbstractTopiaItLegacyPersistenceContext.class.isAssignableFrom(TopiaItLegacyTopiaPersistenceContext.class)); } @Test public void testDao() { // add super-class from tag-value daoSuperClass - Assert.assertTrue(AbstractTopiaTestDao.class.isAssignableFrom(GeneratedPetTopiaDao.class)); - Assert.assertTrue(AbstractTopiaTestDao.class.isAssignableFrom(AbstractPetTopiaDao.class)); - Assert.assertTrue(AbstractTopiaTestDao.class.isAssignableFrom(PetTopiaDao.class)); + Assert.assertTrue(AbstractTopiaItLegacyDao.class.isAssignableFrom(GeneratedPetTopiaDao.class)); + Assert.assertTrue(AbstractTopiaItLegacyDao.class.isAssignableFrom(AbstractPetTopiaDao.class)); + Assert.assertTrue(AbstractTopiaItLegacyDao.class.isAssignableFrom(PetTopiaDao.class)); } @Test public void testEntity() { // add super-class from tag-value entitySuperClass - Assert.assertTrue(AbstractTopiaTestEntity.class.isAssignableFrom(PetAbstract.class)); - Assert.assertTrue(AbstractTopiaTestEntity.class.isAssignableFrom(PetImpl.class)); + Assert.assertTrue(AbstractTopiaItLegacyEntity.class.isAssignableFrom(PetAbstract.class)); + Assert.assertTrue(AbstractTopiaItLegacyEntity.class.isAssignableFrom(PetImpl.class)); } } Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TestHelper.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TestHelper.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TestHelper.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -92,7 +92,7 @@ protected static final Function<Properties,TopiaApplicationContext> CREATE_TOPIA_TEST_CONTEXT = new Function<Properties, TopiaApplicationContext>() { @Override public TopiaApplicationContext apply(Properties input) { - return new TopiaTestTopiaApplicationContext(input); + return new TopiaItLegacyTopiaApplicationContext(input); } }; @@ -151,7 +151,7 @@ configuration.load(stream); configuration.setProperty( TopiaConfigurationConstants.CONFIG_PERSISTENCE_CLASSES, - TopiaTestEntityEnum.getImplementationClassesAsString()); + TopiaItLegacyEntityEnum.getImplementationClassesAsString()); return configuration; } Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaApplicationContextCacheTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaApplicationContextCacheTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaApplicationContextCacheTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -57,7 +57,7 @@ protected static final Function<Properties,TopiaApplicationContext> CREATE_TOPIA_TEST_CONTEXT = new Function<Properties, TopiaApplicationContext>() { @Override public TopiaApplicationContext apply(Properties input) { - return new TopiaTestTopiaApplicationContext(input); + return new TopiaItLegacyTopiaApplicationContext(input); } }; @@ -93,7 +93,7 @@ String url = "jdbc:h2:file:" + dbDirectory; properties.setProperty("hibernate.connection.url", url); - TopiaTestTopiaApplicationContext test = new TopiaTestTopiaApplicationContext(properties); + TopiaItLegacyTopiaApplicationContext test = new TopiaItLegacyTopiaApplicationContext(properties); contextCache.put(properties, test); /** EXEC METHOD **/ @@ -107,7 +107,7 @@ log.debug("## testRemoveContext"); /** PREPARE DATA **/ - TopiaTestTopiaApplicationContext test = new TopiaTestTopiaApplicationContext(properties); + TopiaItLegacyTopiaApplicationContext test = new TopiaItLegacyTopiaApplicationContext(properties); contextCache.put(properties, test); /** EXEC METHOD **/ Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaDatabase.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaDatabase.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaDatabase.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -53,7 +53,7 @@ * @author tchemit <chemit@codelutin.com> * @since 2.6.8 */ -public class TopiaDatabase extends AbstractDatabaseResource<TopiaTestTopiaPersistenceContext, TopiaTestTopiaApplicationContext> { +public class TopiaDatabase extends AbstractDatabaseResource<TopiaItLegacyTopiaPersistenceContext, TopiaItLegacyTopiaApplicationContext> { public static final String DEFAULT_CONFIGURATION_LOCATION = "/TopiaContextImpl.properties"; @@ -66,13 +66,13 @@ } @Override - protected TopiaTestTopiaApplicationContext createApplicationContext(Properties dbConfiguration) { - return new TopiaTestTopiaApplicationContext(dbConfiguration); + protected TopiaItLegacyTopiaApplicationContext createApplicationContext(Properties dbConfiguration) { + return new TopiaItLegacyTopiaApplicationContext(dbConfiguration); } @Override protected String getImplementationClassesAsString() { - return TopiaTestEntityEnum.getImplementationClassesAsString(); + return TopiaItLegacyEntityEnum.getImplementationClassesAsString(); } } Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaJpaSupportTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaJpaSupportTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/TopiaJpaSupportTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -55,7 +55,7 @@ @Rule public final TopiaDatabase db = new TopiaDatabase(); - protected TopiaTestTopiaPersistenceContext persistenceContext; + protected TopiaItLegacyTopiaPersistenceContext persistenceContext; protected TopiaJpaSupport jpaSupport; Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaConnectionProviderTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaConnectionProviderTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaConnectionProviderTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -35,7 +35,7 @@ import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.internal.TopiaConnectionProvider; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonTopiaDao; import org.nuiton.topia.it.legacy.topiatest.Personne; @@ -122,7 +122,7 @@ } private void doStuffOnDb() throws TopiaException { - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); try { PersonTopiaDao dao = transaction.getPersonDao(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaContextReplicateTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaContextReplicateTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/framework/TopiaContextReplicateTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -32,7 +32,7 @@ import org.junit.Test; import org.nuiton.topia.persistence.TopiaConfigurationConstants; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonTopiaDao; import org.nuiton.topia.it.legacy.test.entities.Pet; @@ -89,8 +89,8 @@ // contextSource = TopiaContextFactory.getContext(configSource); // contextTarget = TopiaContextFactory.getContext(configTarget); - TopiaTestTopiaPersistenceContext txSource; - TopiaTestTopiaPersistenceContext txTarget; + TopiaItLegacyTopiaPersistenceContext txSource; + TopiaItLegacyTopiaPersistenceContext txTarget; PersonTopiaDao daoSource, daoTarget; PetTopiaDao petDAOSource, petDAOTarget; Person personSource, personTarget; Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/generator/TopiaTestCase.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/generator/TopiaTestCase.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/generator/TopiaTestCase.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -31,7 +31,7 @@ import org.junit.Test; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.topiatest.Company; import org.nuiton.topia.it.legacy.topiatest.CompanyTopiaDao; import org.nuiton.topia.it.legacy.topiatest.Department; @@ -115,7 +115,7 @@ } // try { - TopiaTestTopiaPersistenceContext newContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext newContext = db.beginTransaction(); CompanyTopiaDao companyDAO = newContext.getCompanyDao(); DepartmentTopiaDao departmentDAO = newContext.getDepartmentDao(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/EntityVisitorExportXmlTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/EntityVisitorExportXmlTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/EntityVisitorExportXmlTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -32,7 +32,7 @@ import org.nuiton.topia.it.legacy.TopiaDatabase; import org.nuiton.topia.persistence.TopiaEntityVisitor; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.topiatest.Address; import org.nuiton.topia.it.legacy.topiatest.AddressTopiaDao; import org.nuiton.topia.it.legacy.topiatest.Company; @@ -66,7 +66,7 @@ @Before public void setUp() throws TopiaException { - TopiaTestTopiaPersistenceContext newContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext newContext = db.beginTransaction(); try { // company CompanyTopiaDao companyDAO = newContext.getCompanyDao(); @@ -112,7 +112,7 @@ @Test public void testExportXMLDepth() throws TopiaException { - TopiaTestTopiaPersistenceContext context = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext context = db.beginTransaction(); CompanyTopiaDao companyDAO = context.getCompanyDao(); Company clCompany = companyDAO.findByName("CodeLutin"); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/NaturalIdTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/NaturalIdTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/NaturalIdTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -32,8 +32,8 @@ import org.junit.Test; import org.nuiton.topia.it.legacy.TopiaDatabase; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.topiatest.NaturalizedEntity; import org.nuiton.topia.it.legacy.topiatest.NaturalizedEntityTopiaDao; @@ -54,7 +54,7 @@ @Test public void testCreateSucessfull() throws Exception { log.debug("Test naturalId : create succesfull"); - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); NaturalizedEntityTopiaDao dao = persistenceContext.getNaturalizedEntityDao(); @@ -75,7 +75,7 @@ @Test public void testCreateFailed() throws Exception { log.debug("Test naturalId : create failed"); - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); NaturalizedEntityTopiaDao dao = persistenceContext.getNaturalizedEntityDao(); @@ -101,7 +101,7 @@ public void testUpdateFailed() throws Exception { log.debug("Test naturalId : update failed"); - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); NaturalizedEntityTopiaDao dao = persistenceContext.getNaturalizedEntityDao(); @@ -123,7 +123,7 @@ @Test public void testFindByNaturalId() throws Exception { log.debug("Test naturalId : findByNaturalId"); - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); NaturalizedEntityTopiaDao dao = @@ -141,7 +141,7 @@ @Test public void testExistNaturalId() throws Exception { log.debug("Test naturalId : existNaturalId"); - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); NaturalizedEntityTopiaDao dao = @@ -164,8 +164,8 @@ public void testNaturalIdAreGeneralized() throws Exception { // test that natural ids are generalized - String[] generalizedNaturalizedNaturalIds = TopiaTestEntityEnum.GeneralizedNaturalizedEntity.getNaturalIds(); - String[] naturalizedNaturalIds = TopiaTestEntityEnum.NaturalizedEntity.getNaturalIds(); + String[] generalizedNaturalizedNaturalIds = TopiaItLegacyEntityEnum.GeneralizedNaturalizedEntity.getNaturalIds(); + String[] naturalizedNaturalIds = TopiaItLegacyEntityEnum.NaturalizedEntity.getNaturalIds(); Assert.assertArrayEquals(generalizedNaturalizedNaturalIds, naturalizedNaturalIds); } @@ -173,8 +173,8 @@ public void testNotNullsAreGeneralized() throws Exception { // test that not nulls are generalized - String[] generalizedNaturalizedNotNulls = TopiaTestEntityEnum.GeneralizedNaturalizedEntity.getNotNulls(); - String[] naturalizedNotNulls = TopiaTestEntityEnum.NaturalizedEntity.getNotNulls(); + String[] generalizedNaturalizedNotNulls = TopiaItLegacyEntityEnum.GeneralizedNaturalizedEntity.getNotNulls(); + String[] naturalizedNotNulls = TopiaItLegacyEntityEnum.NaturalizedEntity.getNotNulls(); Assert.assertArrayEquals(generalizedNaturalizedNotNulls, naturalizedNotNulls); } } Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/CollectorTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/CollectorTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/CollectorTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -31,7 +31,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaEntityEnum; import org.nuiton.topia.it.legacy.topiatest.Company; @@ -50,7 +50,7 @@ @BeforeClass public static void setUpClass() throws Exception { - contracts = TopiaTestEntityEnum.getContracts(); + contracts = TopiaItLegacyEntityEnum.getContracts(); } @AfterClass Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/EntityOperatorTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/EntityOperatorTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/EntityOperatorTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -29,7 +29,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.it.legacy.topiatest.Company; import org.nuiton.topia.it.legacy.topiatest.CompanyImpl; import org.nuiton.topia.it.legacy.topiatest.Department; @@ -72,10 +72,10 @@ @BeforeClass public static void setUpClass() throws Exception { - operationC = TopiaTestEntityEnum.getOperator(Company.class); - operationE = TopiaTestEntityEnum.getOperator(Employe.class); - operationP = TopiaTestEntityEnum.getOperator(Personne.class); - operationD = TopiaTestEntityEnum.getOperator(Department.class); + operationC = TopiaItLegacyEntityEnum.getOperator(Company.class); + operationE = TopiaItLegacyEntityEnum.getOperator(Employe.class); + operationP = TopiaItLegacyEntityEnum.getOperator(Personne.class); + operationD = TopiaItLegacyEntityEnum.getOperator(Department.class); } @AfterClass Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityBinderTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityBinderTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityBinderTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -29,7 +29,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaEntityEnum; import org.nuiton.topia.it.legacy.topiatest.Company; @@ -43,7 +43,7 @@ @BeforeClass public static void setUpClass() throws Exception { - contracts = TopiaTestEntityEnum.getContracts(); + contracts = TopiaItLegacyEntityEnum.getContracts(); } public static class CompanyDTO { Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityHelperTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityHelperTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityHelperTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -29,7 +29,7 @@ import org.junit.BeforeClass; import org.junit.Test; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.persistence.internal.DefaultTopiaIdFactory; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaEntityEnum; @@ -74,7 +74,7 @@ @BeforeClass public static void setUpClass() throws Exception { - contracts = TopiaTestEntityEnum.getContracts(); + contracts = TopiaItLegacyEntityEnum.getContracts(); } @AfterClass Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityRefTesterTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityRefTesterTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/persistence/util/TopiaEntityRefTesterTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.Pet; import org.nuiton.topia.it.legacy.test.entities.Race; @@ -41,7 +41,7 @@ * @author tchemit <chemit@codelutin.com> * @since 2.3.1 */ -public class TopiaEntityRefTesterTest extends TopiaEntityRefTester<TopiaTestEntityEnum> { +public class TopiaEntityRefTesterTest extends TopiaEntityRefTester<TopiaItLegacyEntityEnum> { /** Logger */ private static final Log log = @@ -56,26 +56,26 @@ private static final String PERSON1 = "person1"; @Override - protected TopiaTestEntityEnum[] getContracts0() { - return new TopiaTestEntityEnum[]{ - TopiaTestEntityEnum.Pet, - TopiaTestEntityEnum.Person, - TopiaTestEntityEnum.Race, + protected TopiaItLegacyEntityEnum[] getContracts0() { + return new TopiaItLegacyEntityEnum[]{ + TopiaItLegacyEntityEnum.Pet, + TopiaItLegacyEntityEnum.Person, + TopiaItLegacyEntityEnum.Race, }; } @Test public void testNoReferences() throws Exception { - Pet pet = newEntity(TopiaTestEntityEnum.Pet, PET1); + Pet pet = newEntity(TopiaItLegacyEntityEnum.Pet, PET1); detectReferences(pet, 0); - Race race = newEntity(TopiaTestEntityEnum.Race, RACE1); + Race race = newEntity(TopiaItLegacyEntityEnum.Race, RACE1); detectReferences(race, 0); - Person person = newEntity(TopiaTestEntityEnum.Person, PERSON1); + Person person = newEntity(TopiaItLegacyEntityEnum.Person, PERSON1); detectReferences(person, 0); @@ -84,10 +84,10 @@ @Test public void testReferences() throws Exception { - Pet pet = newEntity(TopiaTestEntityEnum.Pet, PET1); - Race race = newEntity(TopiaTestEntityEnum.Race, RACE1); + Pet pet = newEntity(TopiaItLegacyEntityEnum.Pet, PET1); + Race race = newEntity(TopiaItLegacyEntityEnum.Race, RACE1); pet.setRace(race); - Person person = newEntity(TopiaTestEntityEnum.Person, PERSON1); + Person person = newEntity(TopiaItLegacyEntityEnum.Person, PERSON1); detectReferences(pet, 1, RACE1); @@ -115,7 +115,7 @@ assertCurrentEntry(pet, 1); assertNextAssociationEntityRef(person, Person.PROPERTY_PET, PET1, person, pet); - Pet pet2 = newEntity(TopiaTestEntityEnum.Pet, PET2); + Pet pet2 = newEntity(TopiaItLegacyEntityEnum.Pet, PET2); person.addPet(pet2); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/test/ano1882/DAOAbstractTransformerTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/test/ano1882/DAOAbstractTransformerTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/test/ano1882/DAOAbstractTransformerTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -29,7 +29,7 @@ import org.junit.Rule; import org.junit.Test; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; public class DAOAbstractTransformerTest { @@ -38,7 +38,7 @@ @Test public void testAno1882() throws Exception { - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); FrenchCompanyTopiaDao dao = transaction.getFrenchCompanyDao(); SIRETTopiaDao siretDAO = transaction.getSIRETDao(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/CascadeSaveTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/CascadeSaveTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/CascadeSaveTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -28,7 +28,7 @@ import org.junit.Test; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; /** * @author Arnaud Thimel : thimel@codelutin.com @@ -47,7 +47,7 @@ @Test public void testSaveCascade() { - TopiaTestTopiaPersistenceContext persistenceContext = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext persistenceContext = db.beginTransaction(); CompanyTopiaDao companyDao = persistenceContext.getCompanyDao(); DepartmentTopiaDao departmentDao = persistenceContext.getDepartmentDao(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/EnumTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/EnumTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/EnumTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -29,7 +29,7 @@ import org.junit.Test; import org.nuiton.topia.it.legacy.TopiaDatabase; import org.nuiton.topia.persistence.TopiaException; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; /** * Test the support of possibility to have an attribute of type enumeration @@ -50,7 +50,7 @@ */ @Test public void storeEntityWithEnumValue() throws TopiaException { - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); PersonneTopiaDao dao = transaction.getPersonneDao(); Personne personne = new PersonneImpl(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/deletetest/DeleteEntityTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/deletetest/DeleteEntityTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/it/legacy/topiatest/deletetest/DeleteEntityTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -31,7 +31,7 @@ import org.junit.Test; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.topiatest.Gender; import org.nuiton.topia.it.legacy.topiatest.Personne; import org.nuiton.topia.it.legacy.topiatest.PersonneTopiaDao; @@ -42,7 +42,7 @@ /** * Deleting tests with DAO and Entities generated with ToPIA (diagram - * delete-test in topiatest.zargo). Different case of deleting, with inheritance + * delete-test in topia-it-legacy.zargo). Different case of deleting, with inheritance * or NMultiplicity relationship between two entities, or both. Initiate from an * issue with DAOAbstractGenerator delete method generation. Tests with H2 * Database. Configuration in src/test/resources/TopiaContextImpl.properties @@ -66,7 +66,7 @@ public void testDeleteEntityWithInheritance() throws TopiaException { log.debug("START TEST : testDeleteEntityWithInheritance"); - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); log.debug("DAO : PersonneDAO"); PersonneTopiaDao dao = transaction.getPersonneDao(); @@ -117,7 +117,7 @@ public void testDeleteEntityWithManyToManyRelation() throws TopiaException { log.debug("START TEST : testDeleteEntityWithManyToManyRelation"); - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); PersonneTopiaDao dao = transaction.getPersonneDao(); @@ -168,7 +168,7 @@ public void testIsPersisted() { log.debug("START TEST : testIsPersisted"); - TopiaTestTopiaPersistenceContext transaction = db.beginTransaction(); + TopiaItLegacyTopiaPersistenceContext transaction = db.beginTransaction(); PersonneTopiaDao dao = transaction.getPersonneDao(); Modified: trunk/topia-it/src/test/java/org/nuiton/topia/persistence/internal/TopiaDaoTest.java =================================================================== --- trunk/topia-it/src/test/java/org/nuiton/topia/persistence/internal/TopiaDaoTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-it/src/test/java/org/nuiton/topia/persistence/internal/TopiaDaoTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -33,7 +33,7 @@ import org.junit.Rule; import org.junit.Test; import org.nuiton.topia.it.legacy.TopiaDatabase; -import org.nuiton.topia.it.legacy.TopiaTestTopiaPersistenceContext; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaPersistenceContext; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonTopiaDao; @@ -52,7 +52,7 @@ @Rule public final TopiaDatabase db = new TopiaDatabase(); - protected TopiaTestTopiaPersistenceContext context; + protected TopiaItLegacyTopiaPersistenceContext context; protected PersonTopiaDao dao; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractTopiaReplicationServiceTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractTopiaReplicationServiceTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/AbstractTopiaReplicationServiceTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -26,11 +26,11 @@ import org.apache.commons.logging.Log; import org.junit.Assert; +import org.nuiton.topia.it.legacy.TopiaItLegacyTopiaApplicationContext; import org.nuiton.topia.persistence.TopiaApplicationContext; import org.nuiton.topia.persistence.TopiaDaoSupplier; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaPersistenceContext; -import org.nuiton.topia.it.legacy.TopiaTestTopiaApplicationContext; import org.nuiton.topia.persistence.TopiaDao; import org.nuiton.topia.persistence.TopiaEntity; import org.nuiton.topia.persistence.TopiaEntityEnum; @@ -85,7 +85,7 @@ protected static final Function<Properties,TopiaApplicationContext> CREATE_TOPIA_TEST_APPLICATION_CONTEXT = new Function<Properties, TopiaApplicationContext>() { @Override public TopiaApplicationContext apply(Properties input) { - return new TopiaTestTopiaApplicationContext(input); + return new TopiaItLegacyTopiaApplicationContext(input); } }; Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationOperationTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -35,7 +35,7 @@ import org.nuiton.topia.persistence.TopiaApplicationContextCache; import org.nuiton.topia.persistence.TopiaPersistenceContext; import org.nuiton.topia.it.TopiaConfigurationHelper; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonImpl; import org.nuiton.topia.it.legacy.test.entities.Pet; @@ -69,9 +69,9 @@ LogFactory.getLog(TopiaReplicationOperationTest.class); protected static final TopiaEntityEnum[] contracts = { - TopiaTestEntityEnum.Person, - TopiaTestEntityEnum.Pet, - TopiaTestEntityEnum.Race + TopiaItLegacyEntityEnum.Person, + TopiaItLegacyEntityEnum.Pet, + TopiaItLegacyEntityEnum.Race }; protected static final String entitiesList = @@ -158,14 +158,14 @@ public void testCreateOperation_nullPhase() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true); - getModelBuilder().createOperation(model, TopiaTestEntityEnum.Pet, null, null); + getModelBuilder().createOperation(model, TopiaItLegacyEntityEnum.Pet, null, null); } @Test(expected = NullPointerException.class) public void testCreateOperation_nullOperationClass() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true); - getModelBuilder().createOperation(model, TopiaTestEntityEnum.Pet, ReplicationOperationPhase.before, null); + getModelBuilder().createOperation(model, TopiaItLegacyEntityEnum.Pet, ReplicationOperationPhase.before, null); } @Test(expected = IllegalArgumentException.class) @@ -173,7 +173,7 @@ model = getModelBuilder().createModel(sourceContext, contracts, true); // le noeud Pet n'existe pas - getModelBuilder().addAfterOperation(model, TopiaTestEntityEnum.Pet, Duplicate.class); + getModelBuilder().addAfterOperation(model, TopiaItLegacyEntityEnum.Pet, Duplicate.class); } @Test(expected = IllegalArgumentException.class) @@ -181,87 +181,87 @@ model = getModelBuilder().createModel(sourceContext, contracts, true); // le noeud Pet n'existe pas - getModelBuilder().addAfterOperation(model, TopiaTestEntityEnum.Pet, UnregistredOperation.class); + getModelBuilder().addAfterOperation(model, TopiaItLegacyEntityEnum.Pet, UnregistredOperation.class); } @Test // @Test(expected = UnsupportedOperationException.class) public void testCreateSupportedBeforeOperation_Duplicate() throws Exception { - createSupportedBeforeOperation(TopiaTestEntityEnum.Person, person, Duplicate.class); + createSupportedBeforeOperation(TopiaItLegacyEntityEnum.Person, person, Duplicate.class); } // @Test(expected = UnsupportedOperationException.class) // public void testCreateUnsupportedBeforeOperation_AttachAssociation() throws Exception { -// createUnsupportedBeforeOperation(TopiaTestEntityEnum.Person, person, AttachAssociation.class); +// createUnsupportedBeforeOperation(TopiaItLegacyEntityEnum.Person, person, AttachAssociation.class); // } @Test // @Test(expected = UnsupportedOperationException.class) public void testCreateSupportedBeforeOperation_DetachAssociation() throws Exception { - createSupportedBeforeOperation(TopiaTestEntityEnum.Person, person, DettachAssociation.class); + createSupportedBeforeOperation(TopiaItLegacyEntityEnum.Person, person, DettachAssociation.class); } @Test // @Test(expected = UnsupportedOperationException.class) public void testCreateSupportedAfterOperation_Duplicate() throws Exception { - createSupportedAfterOperation(TopiaTestEntityEnum.Person, person, Duplicate.class); + createSupportedAfterOperation(TopiaItLegacyEntityEnum.Person, person, Duplicate.class); } // @Test(expected = UnsupportedOperationException.class) // public void testCreateSupportedAfterOperation_AttachAssociation() throws Exception { -// createUnsupportedAfterOperation(TopiaTestEntityEnum.Person, person, AttachAssociation.class); +// createUnsupportedAfterOperation(TopiaItLegacyEntityEnum.Person, person, AttachAssociation.class); // } @Test // @Test(expected = UnsupportedOperationException.class) public void testCreateSupportedAfterOperation_DetachAssociation() throws Exception { - createSupportedAfterOperation(TopiaTestEntityEnum.Person, person, DettachAssociation.class); + createSupportedAfterOperation(TopiaItLegacyEntityEnum.Person, person, DettachAssociation.class); } // @Test(expected = UnsupportedOperationException.class) // public void testCreateUnsupportedBeforeOperation_UncreatableOperation() throws Exception { -// createUnsupportedBeforeOperation(TopiaTestEntityEnum.Person, person, UncreatableOperation.class); +// createUnsupportedBeforeOperation(TopiaItLegacyEntityEnum.Person, person, UncreatableOperation.class); // } // @Test(expected = UnsupportedOperationException.class) // public void testCreateUnsupportedAfterOperation_UncreatableOperation() throws Exception { -// createUnsupportedAfterOperation(TopiaTestEntityEnum.Person, person, UncreatableOperation.class); +// createUnsupportedAfterOperation(TopiaItLegacyEntityEnum.Person, person, UncreatableOperation.class); // } @Test(expected = IllegalArgumentException.class) public void testCreateOperation_wrongParameterNumber() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true, pet.getTopiaId()); - getModelBuilder().addBeforeOperation(model, TopiaTestEntityEnum.Pet, FakeOperation.class); + getModelBuilder().addBeforeOperation(model, TopiaItLegacyEntityEnum.Pet, FakeOperation.class); } @Test(expected = IllegalArgumentException.class) public void testCreateOperation_wrongParameterNumber2() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true, pet.getTopiaId()); - getModelBuilder().addBeforeOperation(model, TopiaTestEntityEnum.Pet, FakeOperation.class, String.class, String.class); + getModelBuilder().addBeforeOperation(model, TopiaItLegacyEntityEnum.Pet, FakeOperation.class, String.class, String.class); } @Test(expected = IllegalArgumentException.class) public void testCreateOperation_wrongParameterType() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true, pet.getTopiaId()); - getModelBuilder().addBeforeOperation(model, TopiaTestEntityEnum.Pet, FakeOperation.class, Integer.class); + getModelBuilder().addBeforeOperation(model, TopiaItLegacyEntityEnum.Pet, FakeOperation.class, Integer.class); } @Test(expected = IllegalArgumentException.class) public void testCreateOperation_nullParameter() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true, pet.getTopiaId()); - getModelBuilder().addBeforeOperation(model, TopiaTestEntityEnum.Pet, FakeOperation.class, (Object) null); + getModelBuilder().addBeforeOperation(model, TopiaItLegacyEntityEnum.Pet, FakeOperation.class, (Object) null); } @Test public void testCreateOperation() throws Exception { model = getModelBuilder().createModel(sourceContext, contracts, true, pet.getTopiaId()); - getModelBuilder().addBeforeOperation(model, TopiaTestEntityEnum.Pet, FakeOperation.class, "before"); - getModelBuilder().addAfterOperation(model, TopiaTestEntityEnum.Race, FakeOperation.class, "after"); + getModelBuilder().addBeforeOperation(model, TopiaItLegacyEntityEnum.Pet, FakeOperation.class, "before"); + getModelBuilder().addAfterOperation(model, TopiaItLegacyEntityEnum.Race, FakeOperation.class, "after"); } @Test(expected = NullPointerException.class) Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplAllTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplAllTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplAllTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -36,7 +36,7 @@ import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaPersistenceContext; import org.nuiton.topia.it.TopiaConfigurationHelper; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonImpl; import org.nuiton.topia.it.legacy.test.entities.Pet; @@ -64,9 +64,9 @@ private static final Log log = LogFactory.getLog(TopiaReplicationServiceImplTest.class); protected static final TopiaEntityEnum[] contracts = { - TopiaTestEntityEnum.Person, - TopiaTestEntityEnum.Pet, - TopiaTestEntityEnum.Race + TopiaItLegacyEntityEnum.Person, + TopiaItLegacyEntityEnum.Pet, + TopiaItLegacyEntityEnum.Race }; protected static final String entitiesList = @@ -147,7 +147,7 @@ @Override public void testDetectAssociations() throws Exception { - detectAssociations(person, TopiaTestEntityEnum.Person, Person.PROPERTY_PET); + detectAssociations(person, TopiaItLegacyEntityEnum.Person, Person.PROPERTY_PET); detectAssociations(race); detectAssociations(pet); @@ -165,7 +165,7 @@ detectDirectDependencies(person); detectDirectDependencies(race); - detectDirectDependencies(pet, TopiaTestEntityEnum.Pet, Pet.PROPERTY_PERSON, TopiaTestEntityEnum.Pet, Pet.PROPERTY_RACE); + detectDirectDependencies(pet, TopiaItLegacyEntityEnum.Pet, Pet.PROPERTY_PERSON, TopiaItLegacyEntityEnum.Pet, Pet.PROPERTY_RACE); detectDirectDependencies(person2); detectDirectDependencies(race2); @@ -178,12 +178,12 @@ @Override public void testDetectShell() throws Exception { - detectShell(person, TopiaTestEntityEnum.Pet, TopiaTestEntityEnum.Race); + detectShell(person, TopiaItLegacyEntityEnum.Pet, TopiaItLegacyEntityEnum.Race); detectShell(race); - detectShell(pet, TopiaTestEntityEnum.Person, TopiaTestEntityEnum.Race); - detectShell(person2, TopiaTestEntityEnum.Pet, TopiaTestEntityEnum.Race); + detectShell(pet, TopiaItLegacyEntityEnum.Person, TopiaItLegacyEntityEnum.Race); + detectShell(person2, TopiaItLegacyEntityEnum.Pet, TopiaItLegacyEntityEnum.Race); detectShell(race2); - detectShell(pet2, TopiaTestEntityEnum.Person, TopiaTestEntityEnum.Race); + detectShell(pet2, TopiaItLegacyEntityEnum.Person, TopiaItLegacyEntityEnum.Race); } // @Ignore @@ -193,7 +193,7 @@ public void testDetectDependencies() throws Exception { detectDependencies(null, - new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Race}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Person}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Pet}); + new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Race}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Person}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Pet}); } // @Ignore @@ -202,7 +202,7 @@ @Override public void testDetectObjectsToDettach() throws Exception { - detectObjectsToDettach(null, TopiaTestEntityEnum.Person, new String[]{Person.PROPERTY_PET}); + detectObjectsToDettach(null, TopiaItLegacyEntityEnum.Person, new String[]{Person.PROPERTY_PET}); } // @Ignore Modified: trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplTest.java =================================================================== --- trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplTest.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-service-replication/src/test/java/org/nuiton/topia/replication/TopiaReplicationServiceImplTest.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -36,7 +36,7 @@ import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaPersistenceContext; import org.nuiton.topia.it.TopiaConfigurationHelper; -import org.nuiton.topia.it.legacy.TopiaTestEntityEnum; +import org.nuiton.topia.it.legacy.TopiaItLegacyEntityEnum; import org.nuiton.topia.it.legacy.test.entities.Person; import org.nuiton.topia.it.legacy.test.entities.PersonImpl; import org.nuiton.topia.it.legacy.test.entities.Pet; @@ -70,7 +70,7 @@ private static final Log log = LogFactory.getLog(TopiaReplicationServiceImplTest.class); - protected static final TopiaEntityEnum[] contracts = {TopiaTestEntityEnum.Person, TopiaTestEntityEnum.Pet, TopiaTestEntityEnum.Race}; + protected static final TopiaEntityEnum[] contracts = {TopiaItLegacyEntityEnum.Person, TopiaItLegacyEntityEnum.Pet, TopiaItLegacyEntityEnum.Race}; protected static final String entitiesList = PersonImpl.class.getName() + "," + PetImpl.class.getName() + "," + RaceImpl.class.getName(); @@ -148,7 +148,7 @@ @Override public void testDetectAssociations() throws Exception { - detectAssociations(person, TopiaTestEntityEnum.Person, Person.PROPERTY_PET); + detectAssociations(person, TopiaItLegacyEntityEnum.Person, Person.PROPERTY_PET); detectAssociations(race); detectAssociations(pet); @@ -163,7 +163,7 @@ detectDirectDependencies(person); detectDirectDependencies(race); - detectDirectDependencies(pet, TopiaTestEntityEnum.Pet, Pet.PROPERTY_PERSON, TopiaTestEntityEnum.Pet, Pet.PROPERTY_RACE); + detectDirectDependencies(pet, TopiaItLegacyEntityEnum.Pet, Pet.PROPERTY_PERSON, TopiaItLegacyEntityEnum.Pet, Pet.PROPERTY_RACE); detectDirectDependencies(person2); detectDirectDependencies(race2); @@ -174,9 +174,9 @@ @Override public void testDetectShell() throws Exception { - detectShell(person, TopiaTestEntityEnum.Pet, TopiaTestEntityEnum.Race); + detectShell(person, TopiaItLegacyEntityEnum.Pet, TopiaItLegacyEntityEnum.Race); detectShell(race); - detectShell(pet, TopiaTestEntityEnum.Person, TopiaTestEntityEnum.Race); + detectShell(pet, TopiaItLegacyEntityEnum.Person, TopiaItLegacyEntityEnum.Race); detectShell(person2); detectShell(race2); detectShell(pet2); @@ -186,22 +186,22 @@ @Override public void testDetectDependencies() throws Exception { - detectDependencies(person, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Race}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Person}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Pet}); - detectDependencies(race, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Race}); - detectDependencies(pet, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Race}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Person}, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Pet}); + detectDependencies(person, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Race}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Person}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Pet}); + detectDependencies(race, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Race}); + detectDependencies(pet, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Race}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Person}, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Pet}); - detectDependencies(person2, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Person}); - detectDependencies(race2, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Race}); - detectDependencies(pet2, new TopiaTestEntityEnum[]{TopiaTestEntityEnum.Pet}); + detectDependencies(person2, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Person}); + detectDependencies(race2, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Race}); + detectDependencies(pet2, new TopiaItLegacyEntityEnum[]{TopiaItLegacyEntityEnum.Pet}); } @Test @Override public void testDetectObjectsToDettach() throws Exception { - detectObjectsToDettach(person, TopiaTestEntityEnum.Person, new String[]{Person.PROPERTY_PET}); + detectObjectsToDettach(person, TopiaItLegacyEntityEnum.Person, new String[]{Person.PROPERTY_PET}); detectObjectsToDettach(race); - detectObjectsToDettach(pet, TopiaTestEntityEnum.Person, new String[]{Person.PROPERTY_PET}); + detectObjectsToDettach(pet, TopiaItLegacyEntityEnum.Person, new String[]{Person.PROPERTY_PET}); detectObjectsToDettach(person2); detectObjectsToDettach(race2); @@ -233,18 +233,18 @@ @Override public void testDoReplicate() throws Exception { - doReplicate(TopiaTestEntityEnum.Person, person); - doReplicate(TopiaTestEntityEnum.Person, person2); - doReplicate(TopiaTestEntityEnum.Person, person, person2); + doReplicate(TopiaItLegacyEntityEnum.Person, person); + doReplicate(TopiaItLegacyEntityEnum.Person, person2); + doReplicate(TopiaItLegacyEntityEnum.Person, person, person2); - doReplicate(TopiaTestEntityEnum.Pet, pet); - doReplicate(TopiaTestEntityEnum.Pet, pet2); - doReplicate(TopiaTestEntityEnum.Pet, pet, pet2, pet3); - doReplicate(TopiaTestEntityEnum.Pet, person2, pet3); + doReplicate(TopiaItLegacyEntityEnum.Pet, pet); + doReplicate(TopiaItLegacyEntityEnum.Pet, pet2); + doReplicate(TopiaItLegacyEntityEnum.Pet, pet, pet2, pet3); + doReplicate(TopiaItLegacyEntityEnum.Pet, person2, pet3); - doReplicate(TopiaTestEntityEnum.Race, race); - doReplicate(TopiaTestEntityEnum.Race, race2); - doReplicate(TopiaTestEntityEnum.Race, race, race2); + doReplicate(TopiaItLegacyEntityEnum.Race, race); + doReplicate(TopiaItLegacyEntityEnum.Race, race2); + doReplicate(TopiaItLegacyEntityEnum.Race, race, race2); } Modified: trunk/topia-templates/src/main/java/org/nuiton/topia/templates/BinderHelperTransformer.java =================================================================== --- trunk/topia-templates/src/main/java/org/nuiton/topia/templates/BinderHelperTransformer.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-templates/src/main/java/org/nuiton/topia/templates/BinderHelperTransformer.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -258,7 +258,12 @@ Iterator<ObjectModelAttribute> itr = list.iterator(); while (itr.hasNext()) { ObjectModelAttribute attr = itr.next(); - String attrName = attr.getName(); + String attrName; + if (!attr.hasAssociationClass()) { + attrName = attr.getName(); + } else { + attrName = TopiaGeneratorUtil.getAssocAttrName(attr); + } boolean hasNext = itr.hasNext(); initCode.append("" /*{ <%=clazzName%>.<%=getConstantName(attrName)%><%=(hasNext?",\n":"")%>}*/ Modified: trunk/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java =================================================================== --- trunk/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -945,7 +945,7 @@ addParameter(op, assocClassFQN, "value"); setOperationBody(op, "" /*{ - E result = findByProperty(<%=clazzName + "." + assocPropertyConstantName%>, value); + E result = forProperties(<%=clazzName + "." + assocPropertyConstantName%>, value).findAnyOrNull(); return result; }*/ ); @@ -957,7 +957,7 @@ addParameter(op, assocClassFQN, "value"); setOperationBody(op, "" /*{ - List<E> result = findAllByProperty(<%=clazzName + "." + assocPropertyConstantName%>, value); + List<E> result = forProperties(<%=clazzName + "." + assocPropertyConstantName%>, value).findAll(); return result; }*/ ); @@ -1199,26 +1199,28 @@ ); } } else if (attr.hasAssociationClass()) { - String assocAttrName = TopiaGeneratorUtil.getAssocAttrName(attr); - String ref = "e." + getJavaBeanMethodName("get", assocAttrName); if (!TopiaGeneratorUtil.isNMultiplicity(attr)) { + String assocAttrName = TopiaGeneratorUtil.getAssocAttrName(attr); + String entityAbstractName = TopiaGeneratorUtil.getEntityAbstractName(input); + // Use the protected access to entity field body.append("" /*{ - if (<%=ref%> != null) { - tmp.add(<%=ref%>); + <%=entityAbstractName%> entityAbstract = (<%=entityAbstractName%>)entity; + if (entityAbstract.<%=assocAttrName%> != null) { + tmp.add(entityAbstract.<%=assocAttrName%>); } }*/ ); } else { ObjectModelAttribute reverse = attr.getReverseAttribute(); String reverseAttrName = reverse.getName(); - // On utilise pas l'attribut car il est potentiellement - // pas a jour, car pour les asso avec cardinalité + // On utilise pas l'attribut car il n'est potentiellement + // pas à jour, car pour les asso avec cardinalité // personne ne fait de add. Ce qui est normal, mais - // pour pouvoir faire tout de meme des delete en cascade + // pour pouvoir faire tout de même des delete en cascade // sur les asso, le champs est dans le mapping // hibernate et donc il le faut aussi dans la classe - // sinon hibernate rale lorsqu'il charge l'objet + // sinon hibernate râle lorsqu'il charge l'objet // if (<%=ref%> != null) { // tmp.addAll(<%=ref%>); // } Modified: trunk/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java =================================================================== --- trunk/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java 2014-03-14 14:15:54 UTC (rev 3030) +++ trunk/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java 2014-03-14 16:31:08 UTC (rev 3031) @@ -193,7 +193,7 @@ } public static String getEntityAbstractName(ObjectModelClass input) { - return "AbstractTopia" + input.getName(); + return input.getName() + "Abstract"; } public static String getEntityConcreteName(ObjectModelClass input) {
participants (1)
-
athimel@users.nuiton.org