<version>0.2.4-SNAPSHOT</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>eclipselink</artifactId>
+ </dependency>
+
</dependencies>
<repositories>
<repository>
<version>0.2.4-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
- <version>0.2.4-SNAPSHOT</version>
- <type>test-jar</type>
- </dependency>
-
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
</dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <version>2.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>eclipselink</artifactId>
- </dependency>
-
</dependencies>
- <repositories>
- <repository>
- <id>EclipseLink Repo</id>
- <url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
- </repository>
-
- </repositories>
-
-
</project>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.eclipselink;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
- // Empty, all tests inherited
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.eclipselink;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
- // Empty, all tests are inherited
-}
<version>0.2.4-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
- <version>0.2.4-SNAPSHOT</version>
- <type>test-jar</type>
- </dependency>
-
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
</dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.wamblee</groupId>
- <artifactId>wamblee-hibernate-jpa</artifactId>
- <version>0.2.4-SNAPSHOT</version>
- </dependency>
-
</dependencies>
</project>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
- // Empty, all tests inherited
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
- // Empty, all tests are inherited
-}
+++ /dev/null
-package org.wamblee.support.persistence.hibernate;
-
-import org.wamblee.support.persistence.TransactionProxyFactoryTestBase;
-
-public class TransactionProxyFactoryTest extends
- TransactionProxyFactoryTestBase {
-
-}
<groupId>org.wamblee</groupId>
<artifactId>wamblee-test-jpatest-eclipselink</artifactId>
<packaging>jar</packaging>
- <name>/test/eclipselink</name>
+ <name>/test/jpatest-eclipselink</name>
<url>http://wamblee.org</url>
<dependencies>
<dependency>
<groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
+ <artifactId>wamblee-test-eclipselink</artifactId>
<version>0.2.4-SNAPSHOT</version>
</dependency>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- </dependency>
-
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.eclipselink;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-import java.io.File;
-import java.util.Map;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class EclipselinkJpaCustomizer implements JpaCustomizer {
- /**
- * Creates a new EclipselinkJpaCustomizer object.
- */
- public EclipselinkJpaCustomizer() {
- // Empty
- }
-
- @Override
- public void customize(PersistenceUnitDescription aPersistenceUnit,
- Map<String, String> aJpaProperties) {
-
- // DDL generation
- aJpaProperties.put("eclipselink.ddl-generation", "create-tables");
-
- // DDL generation
- FileSystemUtils.createDir(new File("target/sql"));
- aJpaProperties.put("eclipselink.application-location", "target/sql");
- aJpaProperties.put("eclipselink.create-ddl-jdbc-file-name", "create-schema.sql");
- aJpaProperties.put("eclipselink.drop-ddl-jdbc-file-name", "drop-schema.sql");
- aJpaProperties.put("eclipselink.ddl-generation.output-mode", "both");
- }
-
- @Override
- public ITableFilterSimple getJpaTables() {
- return new EclipselinkTables();
- }
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.eclipselink;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class EclipselinkTables implements ITableFilterSimple {
- private static final List<String> TABLES = Arrays
- .asList(new String[] { "SEQUENCE" });
-
- public boolean accept(String aTableName) throws DataSetException {
- return TABLES.contains(aTableName);
- }
-}
+++ /dev/null
-org.wamblee.support.persistence.eclipselink.EclipselinkJpaCustomizer
<groupId>org.wamblee</groupId>
<artifactId>wamblee-test-jpatest-hibernate</artifactId>
<packaging>jar</packaging>
- <name>/test/hibernate</name>
+ <name>/test/jpatest-hibernate</name>
<url>http://wamblee.org</url>
<dependencies>
<dependency>
<groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
+ <artifactId>wamblee-test-hibernate</artifactId>
<version>0.2.4-SNAPSHOT</version>
</dependency>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- </dependency>
-
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.hibernate;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-import java.util.Map;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class HibernateJpaCustomizer implements JpaCustomizer {
- /**
- * Creates a new HibernateJpaCustomizer object.
- */
- public HibernateJpaCustomizer() {
- // Empty
- }
-
- @Override
- public void customize(PersistenceUnitDescription aPersistenceUnit,
- Map<String, String> aJpaProperties) {
-
- System.setProperty("hibernate.temp.use_jdbc_metadata_defaults", "true");
-
- // Set non-JPA connection properties for older versions of hibernate
- System.getProperties().remove("hibernate.connection.datasource");
- if (System.getProperty("hibernate.connection.datasource") != null ) {
- throw new RuntimeException("ERROR");
- }
- System.setProperty("hibernate.connection.url", aJpaProperties.get("javax.persistence.jdbc.url"));
- System.setProperty("hibernate.connection.username", aJpaProperties.get("javax.persistence.jdbc.user"));
- System.setProperty("hibernate.connection.password", aJpaProperties.get("javax.persistence.jdbc.password"));
-
- // Hibernate schema generation
- aJpaProperties.put("hibernate.hbm2ddl.auto", "create");
- }
-
- @Override
- public ITableFilterSimple getJpaTables() {
- return new HibernateTables();
- }
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.hibernate;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class HibernateTables implements ITableFilterSimple {
- private static final List<String> TABLES = Arrays
- .asList(new String[] { "" });
-
- public boolean accept(String aTableName) throws DataSetException {
- return TABLES.contains(aTableName);
- }
-}
+++ /dev/null
-org.wamblee.support.persistence.hibernate.HibernateJpaCustomizer
<groupId>org.wamblee</groupId>
<artifactId>wamblee-test-jpatest-toplink-essentials</artifactId>
<packaging>jar</packaging>
- <name>/test/toplinkessentials</name>
+ <name>/test/jpatest-toplinkessentials</name>
<url>http://wamblee.org</url>
<dependencies>
<dependency>
<groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
+ <artifactId>wamblee-test-toplink-essentials</artifactId>
<version>0.2.4-SNAPSHOT</version>
</dependency>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- </dependency>
-
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.toplink;
-
-import java.io.File;
-import java.util.Map;
-
-import org.dbunit.dataset.filter.ITableFilterSimple;
-import org.wamblee.io.FileSystemUtils;
-import org.wamblee.support.persistence.JpaCustomizer;
-import org.wamblee.support.persistence.PersistenceUnitDescription;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class ToplinkJpaCustomizer implements JpaCustomizer {
- /**
- * Creates a new ToplinkJpaCustomizer object.
- */
- public ToplinkJpaCustomizer() {
- // Empty
- }
-
- @Override
- public void customize(PersistenceUnitDescription aPersistenceUnit,
- Map<String, String> aJpaProperties) {
-
- // Custom datasource properties.
- aJpaProperties.put("toplink.jdbc.url", aJpaProperties.get("javax.persistence.jdbc.url"));
- aJpaProperties.put("toplink.jdbc.user", aJpaProperties.get("javax.persistence.jdbc.user"));
- aJpaProperties.put("toplink.jdbc.password", aJpaProperties.get("javax.persistence.jdbc.password"));
-
- // DDL generation for toplink
- aJpaProperties.put("toplink.ddl-generation", "create-tables");
-
- // DDL generation
- FileSystemUtils.createDir(new File("target/sql"));
- aJpaProperties.put("toplink.create-ddl-jdbc-file-name", "target/sql/create-schema.sql");
- aJpaProperties.put("toplink.drop-ddl-jdbc-file-name", "target/sql/drop-schema.sql");
- }
-
- @Override
- public ITableFilterSimple getJpaTables() {
- return new ToplinkTables();
- }
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.toplink;
-
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Toplink-specific tables.
- */
-public class ToplinkTables implements ITableFilterSimple {
- private static final List<String> TABLES = Arrays
- .asList(new String[] { "SEQUENCE" });
-
- public boolean accept(String aTableName) throws DataSetException {
- return TABLES.contains(aTableName);
- }
-}
+++ /dev/null
-org.wamblee.support.persistence.toplink.ToplinkJpaCustomizer
<modules>
<module>enterprise</module>
<module>hibernate</module>
+ <module>eclipselink</module>
+ <module>toplink-essentials</module>
</modules>
<profiles>
</property>
</activation>
<modules>
- <module>eclipselink</module>
- <module>toplink-essentials</module>
+ <module>jpatest-hibernate</module>
+ <module>jpatest-eclipselink</module>
+ <module>jpatest-toplink-essentials</module>
</modules>
</profile>
</profiles>
<version>0.2.4-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.wamblee</groupId>
- <artifactId>wamblee-test-enterprise</artifactId>
- <version>0.2.4-SNAPSHOT</version>
- <type>test-jar</type>
- </dependency>
-
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
</dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
-
- <dependency>
- <groupId>toplink.essentials</groupId>
- <artifactId>toplink-essentials</artifactId>
- </dependency>
-
-
</dependencies>
- <repositories>
- <repository>
- <id>javaee</id>
- <name>Java EE repo at SUN</name>
- <url>http://download.java.net/maven/1</url>
- <layout>legacy</layout>
- </repository>
-
- </repositories>
-
</project>
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.toplink;
-
-import org.wamblee.support.persistence.DatabaseUtilsTestBase;
-
-/**
- *
- * @author $author$
- * @version $Revision$
- */
-public class DatabaseUtilsTest extends DatabaseUtilsTestBase {
- // Empty, all tests inherited
-}
+++ /dev/null
-/*
- * Copyright 2005-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.wamblee.support.persistence.toplink;
-
-import org.wamblee.support.persistence.MyEntityExampleTestBase;
-
-/**
- * This class shows an example of how to test an entity using jpa.
- */
-public class MyEntityExampleTest extends MyEntityExampleTestBase {
- // Empty, all tests are inherited
-}