[hibernate-commits] Hibernate SVN: r17903 - in jpamodelgen/trunk: src/main/java/org/hibernate/jpamodelgen and 12 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Nov 4 08:22:38 EST 2009


Author: hardy.ferentschik
Date: 2009-11-04 08:22:37 -0500 (Wed, 04 Nov 2009)
New Revision: 17903

Added:
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/AccessTypeTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Address.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Area.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Building.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Country.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Customer.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Detail.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Hominidae.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/House.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Human.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Image.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Inhabitant.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Item.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/LivingBeing.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Mammals.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Order.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Pet.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Product.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/User.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Area.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Building.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Customer.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/House.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/InheritanceTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/User.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Address.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Building.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/LivingBeing.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Mammal.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/XmlMappingTest.java
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/address.xml
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/building.xml
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml
Removed:
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/AccessTypeTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/InheritanceTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/QueryTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/XmlMappingTest.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Address.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Area.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Building.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Country.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Customer.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Detail.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Hominidae.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/House.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Human.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Image.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Inhabitant.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Item.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/LivingBeing.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Mammals.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Order.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Pet.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Product.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Shop.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/User.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Address.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Building.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/LivingBeing.java
   jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Mammal.java
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml
   jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml
Modified:
   jpamodelgen/trunk/pom.xml
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java
   jpamodelgen/trunk/src/test/resources/META-INF/orm.xml
   jpamodelgen/trunk/src/test/resources/META-INF/persistence.xml
   jpamodelgen/trunk/src/test/suite/unit-tests.xml
Log:
METAGEN-3 refactored the tests so that the processor is progammatically called via JavaCompiler

Modified: jpamodelgen/trunk/pom.xml
===================================================================
--- jpamodelgen/trunk/pom.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/pom.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -46,7 +46,7 @@
             <name>Emmanuel Bernard</name>
             <email>emmanuel at hibernate.org</email>
             <url>http://in.relation.to/Bloggers/Emmanuel</url>
-        </developer>        
+        </developer>
         <developer>
             <id>hardy.ferentschik</id>
             <name>Hardy Ferentschik</name>
@@ -86,36 +86,6 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>process_annotations</id>
-                        <phase>process-test-resources</phase>
-                        <configuration>
-                            <tasks>
-                                <property name="build.compiler" value="extJavac"/>
-                                <property name="target.dir" value="${project.build.directory}/generated-src/jpamodelgen"/>
-                                <mkdir dir="${target.dir}"/>
-                                <javac srcdir="${project.build.testSourceDirectory}"
-                                       destdir="${target.dir}"
-                                       failonerror="false"
-                                       excludes="test/**">
-                                    <compilerarg value="-proc:only"/>
-                                    <classpath>
-                                        <path refid="maven.test.classpath"/>
-                                    </classpath>
-                                </javac>
-                            </tasks>
-                            <testSourceRoot>${project.build.directory}/generated-src/jpamodelgen</testSourceRoot>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>jaxb2-maven-plugin</artifactId>
                 <version>1.2</version>
@@ -149,6 +119,16 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
                 <configuration>
+                    <systemProperties>
+                        <property>
+                            <name>sourceBaseDir</name>
+                            <value>${basedir}/src/test/java</value>
+                        </property>
+                        <property>
+                            <name>outBaseDir</name>
+                            <value>${basedir}/target/test-classes</value>
+                        </property>
+                    </systemProperties>
                     <suiteXmlFiles>
                         <suiteXmlFile>${basedir}/src/test/suite/unit-tests.xml</suiteXmlFile>
                     </suiteXmlFiles>
@@ -215,7 +195,7 @@
                         </goals>
                     </execution>
                 </executions>
-            </plugin>            
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -351,11 +351,11 @@
 			ormStream = fileObject.openInputStream();
 		}
 		catch ( IOException e1 ) {
-			processingEnv.getMessager()
-					.printMessage(
-							Diagnostic.Kind.WARNING,
-							"Could not load " + resource + " using processingEnv.getFiler().getResource(). Using classpath..."
-					);
+//			processingEnv.getMessager()
+//					.printMessage(
+//							Diagnostic.Kind.WARNING,
+//							"Could not load " + resource + " using processingEnv.getFiler().getResource(). Using classpath..."
+//					);
 
 			// TODO
 			// unfortunately, the Filer.getResource API seems not to be able to load from /META-INF. One gets a

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/AccessTypeTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/AccessTypeTest.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/AccessTypeTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,93 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test;
-
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
-/**
- * @author Emmanuel Bernard
- */
-public class AccessTypeTest {
-
-	@Test
-	public void testExcludeTransientFieldAndStatic() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Product_", "nonPersistent" );
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Product_", "nonPersistent2" );
-	}
-
-	@Test
-	public void testDefaultAccessTypeOnEntity() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.User_", "nonPersistent" );
-	}
-
-	@Test
-	public void testDefaultAccessTypeForSubclassOfEntity() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Customer_", "nonPersistent" );
-	}
-
-	@Test
-	public void testDefaultAccessTypeForEmbeddable() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Detail_", "nonPersistent" );
-	}
-
-	@Test
-	public void testInheritedAccessTypeForEmbeddable() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Country_", "nonPersistent" );
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Pet_", "nonPersistent", "Colleciton of membeddable not taken care of" );
-	}
-
-	@Test
-	public void testDefaultAccessTypeForMappedSuperclass() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Detail_", "volume" );
-	}
-
-	@Test
-	public void testExplicitAccessTypeAndDefaultFromRootEntity() throws Exception{
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.LivingBeing_", "nonPersistent", "eplicit access type on mapped superclass" );
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Hominidae_", "nonPersistent", "eplicit access type on entity" );
-		absenceOfField( "org.hibernate.jpamodelgen.test.model.Human_", "nonPersistent", "proper inheritance from root entity access type" );
-	}
-
-	@Test
-	public void testMemberAccessType() throws Exception{
-		presenceOfField( "org.hibernate.jpamodelgen.test.model.Customer_", "goodPayer", "access type overriding" );
-	}
-
-	private void absenceOfField(String className, String fieldName) throws ClassNotFoundException {
-		absenceOfField( className, fieldName, "field should not be persistent" );
-	}
-	private void absenceOfField(String className, String fieldName, String errorString) throws ClassNotFoundException {
-		Assert.assertFalse( isFieldHere(className, fieldName), errorString );
-	}
-
-	private void presenceOfField(String className, String fieldName, String errorString) throws ClassNotFoundException {
-		Assert.assertTrue( isFieldHere(className, fieldName), errorString );
-	}
-
-	private boolean isFieldHere(String className, String fieldName) throws ClassNotFoundException {
-		Class<?> user_ = Class.forName( className );
-		try {
-			user_.getField( fieldName );
-			return true;
-		}
-		catch (NoSuchFieldException e) {
-			return false;
-		}
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/InheritanceTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/InheritanceTest.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/InheritanceTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,45 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test;
-
-import org.testng.annotations.Test;
-import org.testng.Assert;
-import org.hibernate.jpamodelgen.test.model.Customer_;
-import org.hibernate.jpamodelgen.test.model.User_;
-import org.hibernate.jpamodelgen.test.model.House_;
-import org.hibernate.jpamodelgen.test.model.Building_;
-import org.hibernate.jpamodelgen.test.model.Area_;
-
-/**
- * @author Emmanuel Bernard
- */
-public class InheritanceTest {
-	@Test
-	public void testSuperEntity() throws Exception {
-		Assert.assertEquals( Customer_.class.getSuperclass(), User_.class,
-				"Entity with super entity should inherit at the metamodel level");
-	}
-
-	@Test
-	public void testMappedSuperclass() throws Exception {
-		Assert.assertEquals( House_.class.getSuperclass(), Building_.class,
-				"Entity with mapped superclass should inherit at the metamodel level");
-		Assert.assertEquals( Building_.class.getSuperclass(), Area_.class,
-				"mapped superclass with mapped superclass should inherit at the metamodel level");
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/QueryTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/QueryTest.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/QueryTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,166 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test;
-
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.Set;
-import javax.persistence.Tuple;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Expression;
-import javax.persistence.criteria.Join;
-import static javax.persistence.criteria.JoinType.INNER;
-import javax.persistence.criteria.ListJoin;
-import javax.persistence.criteria.Path;
-import javax.persistence.criteria.Root;
-
-import org.hibernate.jpamodelgen.test.model.Item;
-import org.hibernate.jpamodelgen.test.model.Item_;
-import org.hibernate.jpamodelgen.test.model.Order;
-import org.hibernate.jpamodelgen.test.model.Order_;
-import org.hibernate.jpamodelgen.test.model.Product;
-import org.hibernate.jpamodelgen.test.model.Product_;
-import org.hibernate.jpamodelgen.test.model.Shop_;
-
-/**
- * Writing queries involves passing typesafe, statically cached, metamodel
- * objects to the query builder in order to create the various parts of
- * the query. The typesafe metamodel objects were validated at init time,
- * so it is impossible to build invalid queries in the application code.
- *
- * @author Max Andersen
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
-public class QueryTest {
-
-	CriteriaBuilder qb;
-
-	public void test() {
-		CriteriaQuery<Tuple> q = qb.createTupleQuery();
-
-		Root<Order> order = q.from( Order.class );
-		Join<Item, Product> product = order.join( Order_.items )
-				.join( Item_.product );
-
-		Path<BigDecimal> price = product.get( Product_.price );
-		Path<Boolean> filled = order.get( Order_.filled );
-		Path<Date> date = order.get( Order_.date );
-
-		q.select( qb.tuple( order, product ) )
-				.where( qb.and( qb.gt( price, 100.00 ), qb.not( filled ) ) )
-				.orderBy( qb.asc( price ), qb.desc( date ) );
-	}
-
-	public void testUntypesafe() {
-		CriteriaQuery<Tuple> q = qb.createTupleQuery();
-
-		Root<Order> order = q.from( Order.class );
-		Join<Item, Product> product = order.join( "items" )
-				.join( "product" );
-
-		Path<BigDecimal> price = product.get( "price" );
-		Path<Boolean> filled = order.get( "filled" );
-		Path<Date> date = order.get( "date" );
-
-		q.select( qb.tuple( order, product ) )
-				.where( qb.and( qb.gt( price, 100.00 ), qb.not( filled ) ) )
-				.orderBy( qb.asc( price ), qb.desc( date ) );
-	}
-
-	/**
-	 * Navigation by joining
-	 */
-	public void test2() {
-		CriteriaQuery<Product> q = qb.createQuery( Product.class );
-
-		Root<Product> product = q.from( Product.class );
-		Join<Item, Order> order = product.join( Product_.items )
-				.join( Item_.order );
-
-		q.select( product )
-				.where( qb.equal( order.get( Order_.id ), 12345l ) );
-	}
-
-	public void testMap() {
-		CriteriaQuery<Item> q = qb.createQuery( Item.class );
-
-		Root<Item> item = q.from( Item.class );
-		item.join( Item_.namedOrders );
-	}
-
-	/**
-	 * Navigation by compound Path
-	 */
-	public void test3() {
-		CriteriaQuery<Item> q = qb.createQuery( Item.class );
-
-		Root<Item> item = q.from( Item.class );
-		Path<String> shopName = item.get( Item_.order )
-				.get( Order_.shop )
-				.get( Shop_.name );
-		q.select( item )
-				.where( qb.equal( shopName, "amazon.com" ) );
-	}
-
-//	public void test4() {
-//		CriteriaQuery q = qb.create();
-//
-//		Root<Order> order = q.from(Order.class);
-//		ListJoin<Order, String> note = order.join(Order_.notes);
-//		Expression<Set<Item>> items = order.get(Order_.items);
-//		order.fetch(Order_.items, JoinType.INNER);
-//
-//		q.select(note)
-//		 .where( qb.and( qb.lt(note.index(), 10), qb.isNotEmpty(items) ) );
-//	}
-
-	public void test4Untypesafe() {
-		CriteriaQuery<String> q = qb.createQuery( String.class );
-
-		Root<Order> order = q.from( Order.class );
-		ListJoin<Order, String> note = order.joinList( "notes" );
-		Expression<Set<Item>> items = order.get( "items" );
-		order.fetch( "items", INNER );
-
-		q.select( note )
-				.where( qb.and( qb.lt( note.index(), 10 ), qb.isNotEmpty( items ) ) );
-	}
-
-	/*public void test5() {
-		Expression<Long> l= null;
-		Expression<Integer> i= null;
-		Expression<Float> x= null;
-		Expression<Float> y= null;
-		
-		Expression<Number> n;
-		Expression<Float> f;
-		Expression<String> s = null;
-		
-		n = qb.quot(l, i);
-		
-		f = qb.sum(x, y);
-		
-		n = qb.quot(x, y);
-		
-		javax.jpamodelgen.criteria.Order o = qb.asc(n);
-		javax.jpamodelgen.criteria.Order p = qb.ascending(s);
-	}*/
-
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/XmlMappingTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/XmlMappingTest.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/XmlMappingTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,55 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test;
-
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
-import org.testng.annotations.Test;
-
-/**
- * @author Hardy Ferentschik
- */
-public class XmlMappingTest {
-	@Test
-	public void testXmlConfiguredEmbeddedClassGenerated() throws Exception {
-		assertNotNull( Class.forName( "org.hibernate.jpamodelgen.test.model.xmlmapped.Address_" ) );
-	}
-
-	@Test
-	public void testXmlConfiguredMappedSuperclassGenerated() throws Exception {
-		Class<?> building = Class.forName( "org.hibernate.jpamodelgen.test.model.xmlmapped.Building_" );
-		assertNotNull( building );
-		assertNotNull( building.getField( "address" ) );
-	}
-
-	@Test
-	public void testClassHierarchy() throws Exception {
-		Class<?> mammal = Class.forName( "org.hibernate.jpamodelgen.test.model.xmlmapped.Mammal_" );
-		assertNotNull( mammal );
-
-		Class<?> being = Class.forName( "org.hibernate.jpamodelgen.test.model.xmlmapped.LivingBeing_" );
-		assertNotNull( being );
-
-		assertTrue( mammal.getSuperclass().equals( being ) );
-	}
-
-	@Test(expectedExceptions = ClassNotFoundException.class)
-	public void testNonExistentMappedClassesGetIgnored() throws Exception {
-		Class.forName( "org.hibernate.jpamodelgen.test.model.Dummy_" );
-	}
-}
\ No newline at end of file

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/AccessTypeTest.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/AccessTypeTest.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/AccessTypeTest.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/AccessTypeTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,90 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.jpamodelgen.test.util.CompilationTest;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertAbsenceOfField;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertPresenceOfField;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class AccessTypeTest extends CompilationTest {
+
+	@Test
+	public void testExcludeTransientFieldAndStatic() throws Exception {
+		assertAbsenceOfField( Product.class.getName() + "_", "nonPersistent" );
+		assertAbsenceOfField( Product.class.getName() + "_", "nonPersistent2" );
+	}
+
+	@Test
+	public void testDefaultAccessTypeOnEntity() throws Exception {
+		assertAbsenceOfField( User.class.getName() + "_", "nonPersistent" );
+	}
+
+	@Test
+	public void testDefaultAccessTypeForSubclassOfEntity() throws Exception {
+		assertAbsenceOfField( Customer.class.getName() + "_", "nonPersistent" );
+	}
+
+	@Test
+	public void testDefaultAccessTypeForEmbeddable() throws Exception {
+		assertAbsenceOfField( Detail.class.getName() + "_", "nonPersistent" );
+	}
+
+	@Test
+	public void testInheritedAccessTypeForEmbeddable() throws Exception {
+		assertAbsenceOfField( Country.class.getName() + "_", "nonPersistent" );
+		assertAbsenceOfField(
+				Pet.class.getName() + "_", "nonPersistent", "Collection of embeddable not taken care of"
+		);
+	}
+
+	@Test
+	public void testDefaultAccessTypeForMappedSuperclass() throws Exception {
+		assertAbsenceOfField( Detail.class.getName() + "_", "volume" );
+	}
+
+	@Test
+	public void testExplicitAccessTypeAndDefaultFromRootEntity() throws Exception {
+		assertAbsenceOfField(
+				LivingBeing.class.getName() + "_",
+				"nonPersistent",
+				"explicit access type on mapped superclass"
+		);
+		assertAbsenceOfField( Hominidae.class.getName() + "_", "nonPersistent", "explicit access type on entity" );
+		assertAbsenceOfField(
+				Human.class.getName() + "_",
+				"nonPersistent",
+				"proper inheritance from root entity access type"
+		);
+	}
+
+	@Test
+	public void testMemberAccessType() throws Exception {
+		assertPresenceOfField( Customer.class.getName() + "_", "goodPayer", "access type overriding" );
+	}
+
+	@Override
+	protected String getTestPackage() {
+		return Product.class.getPackage().getName();
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/AccessTypeTest.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Address.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Address.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Address.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Address.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,70 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.util.Set;
+import javax.persistence.Embeddable;
+import javax.persistence.Access;
+import javax.persistence.ElementCollection;
+import javax.persistence.CollectionTable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Embeddable
+ at Access(javax.persistence.AccessType.PROPERTY)
+public class Address {
+	private String street1;
+	private String city;
+	private Country country;
+	private Set<Inhabitant> inhabitants;
+
+	public String getStreet1() {
+		return street1;
+	}
+
+	public void setStreet1(String street1) {
+		this.street1 = street1;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public Country getCountry() {
+		return country;
+	}
+
+	public void setCountry(Country country) {
+		this.country = country;
+	}
+
+	@ElementCollection
+	@CollectionTable(name = "Add_Inh")
+	public Set<Inhabitant> getInhabitants() {
+		return inhabitants;
+	}
+
+	public void setInhabitants(Set<Inhabitant> inhabitants) {
+		this.inhabitants = inhabitants;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Address.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Area.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Area.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Area.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Area.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,59 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.MappedSuperclass;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at MappedSuperclass
+public class Area {
+	private int length;
+	private int width;
+	private int height;
+
+	//should not be persistent
+	public int getVolume() {
+		return length*width*height;
+	}
+
+	public int getLength() {
+		return length;
+	}
+
+	public void setLength(int length) {
+		this.length = length;
+	}
+
+	public int getWidth() {
+		return width;
+	}
+
+	public void setWidth(int width) {
+		this.width = width;
+	}
+
+	public int getHeight() {
+		return height;
+	}
+
+	public void setHeight(int height) {
+		this.height = height;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Area.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Building.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Building.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Building.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Building.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,36 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.MappedSuperclass;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at MappedSuperclass
+public class Building extends Area {
+	private Address address;
+
+	public Address getAddress() {
+		return address;
+	}
+
+	public void setAddress(Address address) {
+		this.address = address;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Building.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Country.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Country.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Country.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Country.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,46 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Embeddable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Embeddable
+public class Country {
+	String name;
+	String iso2Code;
+	String nonPersistent;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIso2Code() {
+		return iso2Code;
+	}
+
+	public void setIso2Code(String iso2Code) {
+		this.iso2Code = iso2Code;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Country.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Customer.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Customer.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Customer.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Customer.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,45 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.util.Set;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+import javax.persistence.Access;
+import javax.persistence.AccessType;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class Customer extends User {
+	private Set<Order> orders;
+	private String nonPersistent;
+
+	@Access(AccessType.FIELD)
+	boolean goodPayer;
+
+	public Set<Order> getOrders() {
+		return orders;
+	}
+
+	@OneToMany
+	public void setOrders(Set<Order> orders) {
+		this.orders = orders;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Customer.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Detail.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Detail.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Detail.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Detail.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,55 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Embeddable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Embeddable
+public class Detail {
+	Integer length;
+	Integer width;
+	Integer height;
+	Integer nonPersistent;
+
+	public Integer getLength() {
+		return length;
+	}
+
+	public void setLength(Integer length) {
+		this.length = length;
+	}
+
+	public Integer getWidth() {
+		return width;
+	}
+
+	public void setWidth(Integer width) {
+		this.width = width;
+	}
+
+	public Integer getHeight() {
+		return height;
+	}
+
+	public void setHeight(Integer height) {
+		this.height = height;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Detail.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Hominidae.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Hominidae.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Hominidae.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Hominidae.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,42 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.Access;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+ at Access(javax.persistence.AccessType.FIELD)
+public class Hominidae extends Mammals {
+	private int intelligence;
+
+	public int getIntelligence() {
+		return intelligence;
+	}
+
+	public void setIntelligence(int intelligence) {
+		this.intelligence = intelligence;
+	}
+
+	public int getNonPersistent() {
+		return 0;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Hominidae.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/House.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/House.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/House.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/House.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,38 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Id;
+import javax.persistence.Entity;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class House extends Building {
+	@Id
+	private Long id;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/House.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Human.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Human.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Human.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Human.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,37 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class Human extends Hominidae {
+	private int nonPersistent;
+	private String name;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Human.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Image.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Image.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Image.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Image.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,46 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class Image {
+	private String name;
+
+	private byte[] data;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public byte[] getData() {
+		return data;
+	}
+
+	public void setData(byte[] data) {
+		this.data = data;
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Image.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Inhabitant.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Inhabitant.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Inhabitant.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Inhabitant.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,42 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.util.Set;
+import javax.persistence.Embeddable;
+import javax.persistence.Access;
+import javax.persistence.ElementCollection;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Embeddable
+ at Access(javax.persistence.AccessType.FIELD)
+public class Inhabitant {
+	private String name;
+	@ElementCollection
+	private Set<Pet> pets;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Inhabitant.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Item.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Item.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Item.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Item.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,95 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.util.Map;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+import org.hibernate.jpamodelgen.test.accesstype.Product;
+
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+ at Entity  
+public class Item {
+	
+	long _id;
+	
+	int _quantity;
+	
+	Product _product;
+	
+	Order _order;
+
+	Detail detail;
+
+	@Id
+	public long getId() {
+		return _id;
+	}
+
+	public void setId(long id) {
+		this._id = id;
+	}
+
+	public int getQuantity() {
+		return _quantity;
+	}
+
+	public void setQuantity(int quantity) {
+		this._quantity = quantity;
+	}
+
+	@ManyToOne
+	public Product getProduct() {
+		return _product;
+	}
+
+	public void setProduct(Product product) {
+		this._product = product;
+	}
+
+	@ManyToOne
+	public Order getOrder() {
+		return _order;
+	}
+
+	public void setOrder(Order order) {
+		this._order = order;
+	}
+	
+	@OneToMany
+	public Map<String, Order> getNamedOrders() {
+		return null;
+	}
+
+	public Detail getDetail() {
+		return detail;
+	}
+
+	public void setDetail(Detail detail) {
+		this.detail = detail;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Item.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/LivingBeing.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/LivingBeing.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/LivingBeing.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/LivingBeing.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,42 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.MappedSuperclass;
+import javax.persistence.Access;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at MappedSuperclass
+ at Access(javax.persistence.AccessType.FIELD)
+public class LivingBeing {
+	boolean isReallyAlive;
+
+	public boolean isReallyAlive() {
+		return isReallyAlive;
+	}
+
+	public void setReallyAlive(boolean reallyAlive) {
+		isReallyAlive = reallyAlive;
+	}
+
+	public int nonPersistent() {
+		return 0;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/LivingBeing.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Mammals.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Mammals.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Mammals.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Mammals.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class Mammals extends LivingBeing {
+	private String id;
+	private String nbrOfMammals;
+
+	@Id
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getNbrOfMammals() {
+		return nbrOfMammals;
+	}
+
+	public void setNbrOfMammals(String nbrOfMammals) {
+		this.nbrOfMammals = nbrOfMammals;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Mammals.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Order.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Order.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Order.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Order.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+//@Entity
+public class Order {
+	
+	//@Id
+	long id;
+	
+	//@OneToMany
+	Set<Item> items;
+	
+	boolean filled;
+	Date date;
+	
+	//@OneToMany
+	List<String> notes;
+	
+	//@ManyToOne
+	Shop shop;
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Order.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Pet.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Pet.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Pet.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Pet.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,40 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Embeddable;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Embeddable
+public class Pet {
+	String name;
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getNonPersistent() {
+		return null;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Pet.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Product.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Product.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Product.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Product.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,56 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import java.math.BigDecimal;
+import java.util.Set;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+import org.hibernate.jpamodelgen.test.accesstype.Item;
+import org.hibernate.jpamodelgen.test.accesstype.Shop;
+
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+ at Entity  
+public class Product {
+
+	transient String nonPersistent;
+	static String nonPersistent2;
+	
+	@Id
+	long id;
+
+    int test;
+	
+	String description;
+	BigDecimal price;
+	
+	@ManyToOne
+	Shop shop;
+	
+	@OneToMany
+	Set<Item> items;
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Product.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Shop.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,35 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
+ at Entity 
+public class Shop {
+	@Id
+	long id;
+	String name;
+}
+ 
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/Shop.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/User.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/User.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/User.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/User.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,58 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.accesstype;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class User {
+	private Long id;
+	private String nonPersistent;
+	private String name;
+
+	@Id
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	@Transient
+	public String getNonPersistent() {
+		return nonPersistent;
+	}
+
+	public void setNonPersistent(String nonPersistent) {
+		this.nonPersistent = nonPersistent;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/accesstype/User.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Area.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Area.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Area.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,59 @@
+// $Id: Area.java 17899 2009-11-03 14:52:05Z hardy.ferentschik $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import javax.persistence.MappedSuperclass;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at MappedSuperclass
+public class Area {
+	private int length;
+	private int width;
+	private int height;
+
+	//should not be persistent
+	public int getVolume() {
+		return length*width*height;
+	}
+
+	public int getLength() {
+		return length;
+	}
+
+	public void setLength(int length) {
+		this.length = length;
+	}
+
+	public int getWidth() {
+		return width;
+	}
+
+	public void setWidth(int width) {
+		this.width = width;
+	}
+
+	public int getHeight() {
+		return height;
+	}
+
+	public void setHeight(int height) {
+		this.height = height;
+	}
+}
\ No newline at end of file

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Building.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Building.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Building.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,38 @@
+// $Id: Building.java 17899 2009-11-03 14:52:05Z hardy.ferentschik $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import java.sql.Date;
+import javax.persistence.MappedSuperclass;
+
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at MappedSuperclass
+public class Building extends Area {
+	public Date getBuiltIn() {
+		return builtIn;
+	}
+
+	public void setBuiltIn(Date builtIn) {
+		this.builtIn = builtIn;
+	}
+
+	private Date builtIn;
+}
\ No newline at end of file

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Customer.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Customer.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/Customer.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,27 @@
+// $Id: Customer.java 17899 2009-11-03 14:52:05Z hardy.ferentschik $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import javax.persistence.Entity;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class Customer extends User {
+}
\ No newline at end of file

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/House.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/House.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/House.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,38 @@
+// $Id: House.java 17899 2009-11-03 14:52:05Z hardy.ferentschik $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class House extends Building {
+	@Id
+	private Long id;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+}
\ No newline at end of file

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/InheritanceTest.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/InheritanceTest.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/InheritanceTest.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/InheritanceTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,47 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.jpamodelgen.test.util.CompilationTest;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertSuperClass;
+
+/**
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class InheritanceTest extends CompilationTest {
+	@Test
+	public void testSuperEntity() throws Exception {
+		assertSuperClass(
+				Customer.class.getName() + "_", User.class.getName() + "_"
+		);
+	}
+
+	@Test
+	public void testMappedSuperclass() throws Exception {
+		assertSuperClass( House.class.getName() + "_", Building.class.getName() + "_" );
+		assertSuperClass( Building.class.getName() + "_", Area.class.getName() + "_" );
+	}
+
+	@Override
+	protected String getTestPackage() {
+		return Customer.class.getPackage().getName();
+	}
+}


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/InheritanceTest.java
___________________________________________________________________
Name: svn:keywords
   + Id

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/User.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/User.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/inheritance/User.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,58 @@
+// $Id: User.java 17899 2009-11-03 14:52:05Z hardy.ferentschik $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.inheritance;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+
+/**
+ * @author Emmanuel Bernard
+ */
+ at Entity
+public class User {
+	private Long id;
+	private String nonPersistent;
+	private String name;
+
+	@Id
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	@Transient
+	public String getNonPersistent() {
+		return nonPersistent;
+	}
+
+	public void setNonPersistent(String nonPersistent) {
+		this.nonPersistent = nonPersistent;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Address.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Address.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Address.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,70 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.util.Set;
-import javax.persistence.Embeddable;
-import javax.persistence.Access;
-import javax.persistence.ElementCollection;
-import javax.persistence.CollectionTable;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
- at Access(javax.persistence.AccessType.PROPERTY)
-public class Address {
-	private String street1;
-	private String city;
-	private Country country;
-	private Set<Inhabitant> inhabitants;
-
-	public String getStreet1() {
-		return street1;
-	}
-
-	public void setStreet1(String street1) {
-		this.street1 = street1;
-	}
-
-	public String getCity() {
-		return city;
-	}
-
-	public void setCity(String city) {
-		this.city = city;
-	}
-
-	public Country getCountry() {
-		return country;
-	}
-
-	public void setCountry(Country country) {
-		this.country = country;
-	}
-
-	@ElementCollection
-	@CollectionTable(name = "Add_Inh")
-	public Set<Inhabitant> getInhabitants() {
-		return inhabitants;
-	}
-
-	public void setInhabitants(Set<Inhabitant> inhabitants) {
-		this.inhabitants = inhabitants;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Area.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Area.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Area.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,59 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.MappedSuperclass;
-
-/**
- * @author Emmanuel Bernard
- */
- at MappedSuperclass
-public class Area {
-	private int length;
-	private int width;
-	private int height;
-
-	//should not be persistent
-	public int getVolume() {
-		return length*width*height;
-	}
-
-	public int getLength() {
-		return length;
-	}
-
-	public void setLength(int length) {
-		this.length = length;
-	}
-
-	public int getWidth() {
-		return width;
-	}
-
-	public void setWidth(int width) {
-		this.width = width;
-	}
-
-	public int getHeight() {
-		return height;
-	}
-
-	public void setHeight(int height) {
-		this.height = height;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Building.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Building.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Building.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,36 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.MappedSuperclass;
-
-/**
- * @author Emmanuel Bernard
- */
- at MappedSuperclass
-public class Building extends Area {
-	private Address address;
-
-	public Address getAddress() {
-		return address;
-	}
-
-	public void setAddress(Address address) {
-		this.address = address;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Country.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Country.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Country.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,46 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Embeddable;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class Country {
-	String name;
-	String iso2Code;
-	String nonPersistent;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getIso2Code() {
-		return iso2Code;
-	}
-
-	public void setIso2Code(String iso2Code) {
-		this.iso2Code = iso2Code;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Customer.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Customer.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Customer.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,45 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.util.Set;
-import javax.persistence.Entity;
-import javax.persistence.OneToMany;
-import javax.persistence.Access;
-import javax.persistence.AccessType;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Customer extends User {
-	private Set<Order> orders;
-	private String nonPersistent;
-
-	@Access(AccessType.FIELD)
-	boolean goodPayer;
-
-	public Set<Order> getOrders() {
-		return orders;
-	}
-
-	@OneToMany
-	public void setOrders(Set<Order> orders) {
-		this.orders = orders;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Detail.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Detail.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Detail.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,55 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Embeddable;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class Detail {
-	Integer length;
-	Integer width;
-	Integer height;
-	Integer nonPersistent;
-
-	public Integer getLength() {
-		return length;
-	}
-
-	public void setLength(Integer length) {
-		this.length = length;
-	}
-
-	public Integer getWidth() {
-		return width;
-	}
-
-	public void setWidth(Integer width) {
-		this.width = width;
-	}
-
-	public Integer getHeight() {
-		return height;
-	}
-
-	public void setHeight(Integer height) {
-		this.height = height;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Hominidae.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Hominidae.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Hominidae.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,42 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Access;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
- at Access(javax.persistence.AccessType.FIELD)
-public class Hominidae extends Mammals {
-	private int intelligence;
-
-	public int getIntelligence() {
-		return intelligence;
-	}
-
-	public void setIntelligence(int intelligence) {
-		this.intelligence = intelligence;
-	}
-
-	public int getNonPersistent() {
-		return 0;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/House.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/House.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/House.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,38 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Id;
-import javax.persistence.Entity;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class House extends Building {
-	@Id
-	private Long id;
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Human.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Human.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Human.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,37 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Human extends Hominidae {
-	private int nonPersistent;
-	private String name;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Image.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Image.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Image.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,46 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Image {
-	private String name;
-
-	private byte[] data;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public byte[] getData() {
-		return data;
-	}
-
-	public void setData(byte[] data) {
-		this.data = data;
-	}
-}
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Inhabitant.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Inhabitant.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Inhabitant.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,42 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.util.Set;
-import javax.persistence.Embeddable;
-import javax.persistence.Access;
-import javax.persistence.ElementCollection;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
- at Access(javax.persistence.AccessType.FIELD)
-public class Inhabitant {
-	private String name;
-	@ElementCollection
-	private Set<Pet> pets;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Item.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Item.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Item.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,93 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.util.Map;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-
-/**
- *
- * @author Max Andersen
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
- at Entity  
-public class Item {
-	
-	long _id;
-	
-	int _quantity;
-	
-	Product _product;
-	
-	Order _order;
-
-	Detail detail;
-
-	@Id
-	public long getId() {
-		return _id;
-	}
-
-	public void setId(long id) {
-		this._id = id;
-	}
-
-	public int getQuantity() {
-		return _quantity;
-	}
-
-	public void setQuantity(int quantity) {
-		this._quantity = quantity;
-	}
-
-	@ManyToOne
-	public Product getProduct() {
-		return _product;
-	}
-
-	public void setProduct(Product product) {
-		this._product = product;
-	}
-
-	@ManyToOne
-	public Order getOrder() {
-		return _order;
-	}
-
-	public void setOrder(Order order) {
-		this._order = order;
-	}
-	
-	@OneToMany
-	public Map<String, Order> getNamedOrders() {
-		return null;
-	}
-
-	public Detail getDetail() {
-		return detail;
-	}
-
-	public void setDetail(Detail detail) {
-		this.detail = detail;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/LivingBeing.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/LivingBeing.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/LivingBeing.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,42 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.MappedSuperclass;
-import javax.persistence.Access;
-
-/**
- * @author Emmanuel Bernard
- */
- at MappedSuperclass
- at Access(javax.persistence.AccessType.FIELD)
-public class LivingBeing {
-	boolean isReallyAlive;
-
-	public boolean isReallyAlive() {
-		return isReallyAlive;
-	}
-
-	public void setReallyAlive(boolean reallyAlive) {
-		isReallyAlive = reallyAlive;
-	}
-
-	public int nonPersistent() {
-		return 0;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Mammals.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Mammals.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Mammals.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,47 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class Mammals extends LivingBeing {
-	private String id;
-	private String nbrOfMammals;
-
-	@Id
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getNbrOfMammals() {
-		return nbrOfMammals;
-	}
-
-	public void setNbrOfMammals(String nbrOfMammals) {
-		this.nbrOfMammals = nbrOfMammals;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Order.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Order.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Order.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,47 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Set;
-
-/**
- *
- * @author Max Andersen
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
-//@Entity
-public class Order {
-	
-	//@Id
-	long id;
-	
-	//@OneToMany
-	Set<Item> items;
-	
-	boolean filled;
-	Date date;
-	
-	//@OneToMany
-	List<String> notes;
-	
-	//@ManyToOne
-	Shop shop;
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Pet.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Pet.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Pet.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,40 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Embeddable;
-
-/**
- * @author Emmanuel Bernard
- */
- at Embeddable
-public class Pet {
-	String name;
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getNonPersistent() {
-		return null;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Product.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Product.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Product.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,53 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import java.math.BigDecimal;
-import java.util.Set;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-
-/**
- *
- * @author Max Andersen
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
- at Entity  
-public class Product {
-
-	transient String nonPersistent;
-	static String nonPersistent2;
-	
-	@Id
-	long id;
-
-    int test;
-	
-	String description;
-	BigDecimal price;
-	
-	@ManyToOne
-	Shop shop;
-	
-	@OneToMany
-	Set<Item> items;
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Shop.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Shop.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/Shop.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,35 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- *
- * @author Max Andersen
- * @author Hardy Ferentschik
- * @author Emmanuel Bernard
- */
- at Entity 
-public class Shop {
-	@Id
-	long id;
-	String name;
-}
- 
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/User.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/User.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/User.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,58 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Transient;
-
-/**
- * @author Emmanuel Bernard
- */
- at Entity
-public class User {
-	private Long id;
-	private String nonPersistent;
-	private String name;
-
-	@Id
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	@Transient
-	public String getNonPersistent() {
-		return nonPersistent;
-	}
-
-	public void setNonPersistent(String nonPersistent) {
-		this.nonPersistent = nonPersistent;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-}

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Address.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Address.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Address.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,51 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model.xmlmapped;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Address {
-	private String street1;
-	private String city;
-	private String country;
-
-	public String getStreet1() {
-		return street1;
-	}
-
-	public void setStreet1(String street1) {
-		this.street1 = street1;
-	}
-
-	public String getCity() {
-		return city;
-	}
-
-	public void setCity(String city) {
-		this.city = city;
-	}
-
-	public String getCountry() {
-		return country;
-	}
-
-	public void setCountry(String country) {
-		this.country = country;
-	}
-}
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Building.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Building.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Building.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,36 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model.xmlmapped;
-
-import org.hibernate.jpamodelgen.test.model.Address;
-import org.hibernate.jpamodelgen.test.model.Area;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Building extends Area {
-	private Address address;
-
-	public Address getAddress() {
-		return address;
-	}
-
-	public void setAddress(Address address) {
-		this.address = address;
-	}
-}
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/LivingBeing.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/LivingBeing.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/LivingBeing.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,37 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model.xmlmapped;
-
-/**
- * @author Hardy Ferentschik
- */
-public class LivingBeing {
-	boolean isReallyAlive;
-
-	public boolean isReallyAlive() {
-		return isReallyAlive;
-	}
-
-	public void setReallyAlive(boolean reallyAlive) {
-		isReallyAlive = reallyAlive;
-	}
-
-	public int nonPersistent() {
-		return 0;
-	}
-}
\ No newline at end of file

Deleted: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Mammal.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Mammal.java	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Mammal.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,42 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.hibernate.jpamodelgen.test.model.xmlmapped;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Mammal extends LivingBeing {
-	private String id;
-	private String subclass;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getSubclass() {
-		return subclass;
-	}
-
-	public void setSubclass(String subclass) {
-		this.subclass = subclass;
-	}
-}
\ No newline at end of file

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/CompilationTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,127 @@
+// $Id:$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.util;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import static org.testng.FileAssert.fail;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public abstract class CompilationTest {
+
+	private static final String PATH_SEPARATOR = System.getProperty( "file.separator" );
+	private static final String sourceBaseDir;
+	private static final String outBaseDir;
+
+	static {
+		String tmp = System.getProperty( "sourceBaseDir" );
+		if ( tmp == null ) {
+			fail( "The system property sourceBaseDir has to be set and point to the base directory of the test java sources." );
+		}
+		sourceBaseDir = tmp;
+
+		tmp = System.getProperty( "outBaseDir" );
+		if ( tmp == null ) {
+			fail( "The system property outBaseDir has to be set and point to the base directory of the test output directory." );
+		}
+		outBaseDir = tmp;
+	}
+
+	public CompilationTest() {
+		try {
+			compile();
+		}
+		catch ( Exception e ) {
+			fail( "Unable to compile test sources. " + e.getMessage() );
+		}
+	}
+
+	private void compile() throws IOException {
+		List<String> options = createJavaOptions();
+
+		JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+		DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<JavaFileObject>();
+		StandardJavaFileManager fileManager = compiler.getStandardFileManager( diagnostics, null, null );
+		Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromFiles(
+				getCompilationUnits( sourceBaseDir )
+		);
+
+		// TODO - need to call the compiler twice. Once to compile the test classes and generate the java files
+		// of the generated metamodel. The second compile is for generated the class files of the metamodel.
+		// Note sure why this is not recursive the same way as on the command line
+		compileSources( options, compiler, diagnostics, fileManager, compilationUnits );
+
+		compilationUnits = fileManager.getJavaFileObjectsFromFiles(
+				getCompilationUnits( outBaseDir )
+		);
+		compileSources( options, compiler, diagnostics, fileManager, compilationUnits );
+		fileManager.close();
+	}
+
+	private void compileSources(List<String> options, JavaCompiler compiler, DiagnosticCollector<JavaFileObject> diagnostics, StandardJavaFileManager fileManager, Iterable<? extends JavaFileObject> compilationUnits) {
+		JavaCompiler.CompilationTask task = compiler.getTask(
+				null, fileManager, diagnostics, options, null, compilationUnits
+		);
+		task.call();
+//		for ( Diagnostic diagnostic : diagnostics.getDiagnostics() ) {
+//			System.out.println( diagnostic.getMessage( null ) );
+//		}
+	}
+
+	private List<String> createJavaOptions() {
+		// TODO
+		// passing any other options as -d seems to throw IllegalArgumentExceptions. I would like to set -s for example
+		// in order to see whether recursive recompilation would work then. Also '-proc only' could be interesting
+		List<String> options = new ArrayList<String>();
+		options.add( "-d" );
+		options.add( outBaseDir );
+		return options;
+	}
+
+	private List<File> getCompilationUnits(String baseDir) {
+		List<File> javaFiles = new ArrayList<File>();
+		String packageDirName = baseDir + PATH_SEPARATOR + getTestPackage().replace( ".", PATH_SEPARATOR );
+		File packageDir = new File( packageDirName );
+		FilenameFilter javaFileFilter = new FilenameFilter() {
+			@Override
+			public boolean accept(File dir, String name) {
+				return name.endsWith( ".java" );
+			}
+		};
+		for ( File file : packageDir.listFiles( javaFileFilter ) ) {
+			javaFiles.add( file );
+		}
+		return javaFiles;
+	}
+
+	abstract protected String getTestPackage();
+}
+
+

Added: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/util/TestUtil.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,83 @@
+// $Id:$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.util;
+
+import org.testng.Assert;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.FileAssert.fail;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class TestUtil {
+
+	private TestUtil() {
+	}
+
+	public static void assertClassGenerated(String className) {
+		try {
+			assertNotNull( Class.forName( className ) );
+		}
+		catch ( ClassNotFoundException e ) {
+			fail( e.getMessage() );
+		}
+	}
+
+	public static void assertAbsenceOfField(String className, String fieldName) throws ClassNotFoundException {
+		assertAbsenceOfField( className, fieldName, "field should not be persistent" );
+	}
+
+	public static void assertAbsenceOfField(String className, String fieldName, String errorString)
+			throws ClassNotFoundException {
+		Assert.assertFalse( isFieldHere( className, fieldName ), errorString );
+	}
+
+	public static void assertPresenceOfField(String className, String fieldName, String errorString)
+			throws ClassNotFoundException {
+		Assert.assertTrue( isFieldHere( className, fieldName ), errorString );
+	}
+
+	public static void assertSuperClass(String className, String superClassName) {
+		Class<?> clazz;
+		Class<?> superClazz;
+		try {
+			clazz = Class.forName( className );
+			superClazz = Class.forName( superClassName );
+			Assert.assertEquals(
+					clazz.getSuperclass(), superClazz,
+					"Entity " + superClassName + " should be the superclass of " + className
+			);
+		}
+		catch ( ClassNotFoundException e ) {
+			fail( "Unable to load metamodel class: " + e.getMessage() );
+		}
+	}
+
+	private static boolean isFieldHere(String className, String fieldName) throws ClassNotFoundException {
+		Class<?> clazz = Class.forName( className );
+		try {
+			clazz.getField( fieldName );
+			return true;
+		}
+		catch ( NoSuchFieldException e ) {
+			return false;
+		}
+	}
+}
+
+

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Address.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Address.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Address.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Address.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,51 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.xmlmapped;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Address {
+	private String street1;
+	private String city;
+	private String country;
+
+	public String getStreet1() {
+		return street1;
+	}
+
+	public void setStreet1(String street1) {
+		this.street1 = street1;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getCountry() {
+		return country;
+	}
+
+	public void setCountry(String country) {
+		this.country = country;
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Address.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Building.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Building.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Building.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Building.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,36 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.xmlmapped;
+
+import org.hibernate.jpamodelgen.test.accesstype.*;
+import org.hibernate.jpamodelgen.test.accesstype.Address;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Building extends Area {
+	private Address address;
+
+	public Address getAddress() {
+		return address;
+	}
+
+	public void setAddress(org.hibernate.jpamodelgen.test.accesstype.Address address) {
+		this.address = address;
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Building.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/LivingBeing.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/LivingBeing.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/LivingBeing.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/LivingBeing.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,37 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.xmlmapped;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class LivingBeing {
+	boolean isReallyAlive;
+
+	public boolean isReallyAlive() {
+		return isReallyAlive;
+	}
+
+	public void setReallyAlive(boolean reallyAlive) {
+		isReallyAlive = reallyAlive;
+	}
+
+	public int nonPersistent() {
+		return 0;
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/LivingBeing.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Mammal.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/model/xmlmapped/Mammal.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Mammal.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Mammal.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,42 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.xmlmapped;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Mammal extends LivingBeing {
+	private String id;
+	private String subclass;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getSubclass() {
+		return subclass;
+	}
+
+	public void setSubclass(String subclass) {
+		this.subclass = subclass;
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/Mammal.java
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/XmlMappingTest.java (from rev 17899, jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/XmlMappingTest.java)
===================================================================
--- jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/XmlMappingTest.java	                        (rev 0)
+++ jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/XmlMappingTest.java	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,60 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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.hibernate.jpamodelgen.test.xmlmapped;
+
+import org.testng.annotations.Test;
+
+import org.hibernate.jpamodelgen.test.util.CompilationTest;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertClassGenerated;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertPresenceOfField;
+import static org.hibernate.jpamodelgen.test.util.TestUtil.assertSuperClass;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class XmlMappingTest extends CompilationTest {
+	@Test
+	public void testXmlConfiguredEmbeddedClassGenerated() throws Exception {
+		assertClassGenerated( Address.class.getName() + "_" );
+	}
+
+	@Test
+	public void testXmlConfiguredMappedSuperclassGenerated() throws Exception {
+		assertClassGenerated( Building.class.getName() + "_" );
+		assertPresenceOfField(
+				Building.class.getName() + "_", "address", "address field should exist"
+		);
+	}
+
+	@Test
+	public void testClassHierarchy() throws Exception {
+		assertClassGenerated( Mammal.class.getName() + "_" );
+		assertClassGenerated( LivingBeing.class.getName() + "_" );
+		assertSuperClass( Mammal.class.getName() + "_", LivingBeing.class.getName() + "_" );
+	}
+
+	@Test(expectedExceptions = ClassNotFoundException.class)
+	public void testNonExistentMappedClassesGetIgnored() throws Exception {
+		Class.forName( "org.hibernate.jpamodelgen.test.model.Dummy_" );
+	}
+
+	@Override
+	protected String getTestPackage() {
+		return Address.class.getPackage().getName();
+	}
+}
\ No newline at end of file


Property changes on: jpamodelgen/trunk/src/test/java/org/hibernate/jpamodelgen/test/xmlmapped/XmlMappingTest.java
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: jpamodelgen/trunk/src/test/resources/META-INF/orm.xml
===================================================================
--- jpamodelgen/trunk/src/test/resources/META-INF/orm.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/resources/META-INF/orm.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -5,7 +5,7 @@
                  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
                  version="2.0"
         >
-    <package>org.hibernate.jpamodelgen.test.model</package>
+    <package>org.hibernate.jpamodelgen.test.accesstype</package>
     <!-- default package -->
     <entity class="Order" access="FIELD" metadata-complete="true"> <!--means ignore annotations-->
         <attributes>
@@ -16,7 +16,7 @@
             <basic name="date"/>
             <many-to-one name="shop"/>
             <one-to-many name="items"
-                         target-entity="Item"
+                         target-entity="org.hibernate.jpamodelgen.test.accesstype.Item"
                          fetch="EAGER"> <!-- target-entity optional guess the type from the geenric-->
                 <cascade>
                     <cascade-persist/>

Modified: jpamodelgen/trunk/src/test/resources/META-INF/persistence.xml
===================================================================
--- jpamodelgen/trunk/src/test/resources/META-INF/persistence.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/resources/META-INF/persistence.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -7,8 +7,8 @@
         <mapping-file>/META-INF/dummy.xml</mapping-file>
         <mapping-file>/META-INF/malformed-mapping-xml.xml</mapping-file>
         <mapping-file>/META-INF/jpa1-orm.xml</mapping-file>
-        <mapping-file>/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml</mapping-file>
-        <mapping-file>/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml</mapping-file>
-        <mapping-file>/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml</mapping-file>
+        <mapping-file>/org/hibernate/jpamodelgen/test/xmlmapped/address.xml</mapping-file>
+        <mapping-file>/org/hibernate/jpamodelgen/test/xmlmapped/building.xml</mapping-file>
+        <mapping-file>/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml</mapping-file>
     </persistence-unit>
 </persistence>

Deleted: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
-                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
-                 version="2.0"
-        >
-    <package>org.hibernate.jpamodelgen.test.model.xmlmapped</package>  <!-- default package -->
-    <embeddable class="Address" access="FIELD" metadata-complete="true"> <!--means ignore annotations-->
-        <attributes>
-            <basic name="street1"/>
-            <basic name="city"/>
-            <basic name="country"/>
-        </attributes>
-    </embeddable>
-</entity-mappings>
-

Deleted: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
-                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
-                 version="2.0"
-        >
-    <package>org.hibernate.jpamodelgen.test.model.xmlmapped</package>
-    <mapped-superclass class="Building" access="FIELD" metadata-complete="true"> <!--means ignore annotations-->
-        <attributes>
-            <one-to-one name="address" fetch="LAZY"/>
-        </attributes>
-    </mapped-superclass>
-</entity-mappings>
-

Deleted: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
-                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
-                 version="2.0"
-        >
-    <package>org.hibernate.jpamodelgen.test.model.xmlmapped</package>
-    <entity class="LivingBeing" access="FIELD" metadata-complete="true">
-        <attributes>
-            <basic name="isReallyAlive"/>
-        </attributes>
-    </entity>
-    <entity class="Mammal" access="FIELD" metadata-complete="true">
-        <attributes>
-            <id name="id"/>
-            <basic name="subclass"/>
-        </attributes>
-    </entity>
-</entity-mappings>

Copied: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/address.xml (from rev 17899, jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/address.xml)
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/address.xml	                        (rev 0)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/address.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
+                 version="2.0"
+        >
+    <package>org.hibernate.jpamodelgen.test.xmlmapped</package>  <!-- default package -->
+    <embeddable class="Address" access="FIELD" metadata-complete="true"> <!--means ignore annotations-->
+        <attributes>
+            <basic name="street1"/>
+            <basic name="city"/>
+            <basic name="country"/>
+        </attributes>
+    </embeddable>
+</entity-mappings>
+


Property changes on: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/address.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/building.xml (from rev 17899, jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/building.xml)
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/building.xml	                        (rev 0)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/building.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
+                 version="2.0"
+        >
+    <package>org.hibernate.jpamodelgen.test.xmlmapped</package>
+    <mapped-superclass class="Building" access="FIELD" metadata-complete="true"> <!--means ignore annotations-->
+        <attributes>
+            <one-to-one name="address" fetch="LAZY"/>
+        </attributes>
+    </mapped-superclass>
+</entity-mappings>
+


Property changes on: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/building.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Copied: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml (from rev 17899, jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/model/xmlmapped/mammal.xml)
===================================================================
--- jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml	                        (rev 0)
+++ jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd"
+                 version="2.0"
+        >
+    <package>org.hibernate.jpamodelgen.test.xmlmapped</package>
+    <entity class="LivingBeing" access="FIELD" metadata-complete="true">
+        <attributes>
+            <basic name="isReallyAlive"/>
+        </attributes>
+    </entity>
+    <entity class="Mammal" access="FIELD" metadata-complete="true">
+        <attributes>
+            <id name="id"/>
+            <basic name="subclass"/>
+        </attributes>
+    </entity>
+</entity-mappings>


Property changes on: jpamodelgen/trunk/src/test/resources/org/hibernate/jpamodelgen/test/xmlmapped/mammal.xml
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: jpamodelgen/trunk/src/test/suite/unit-tests.xml
===================================================================
--- jpamodelgen/trunk/src/test/suite/unit-tests.xml	2009-11-04 13:15:42 UTC (rev 17902)
+++ jpamodelgen/trunk/src/test/suite/unit-tests.xml	2009-11-04 13:22:37 UTC (rev 17903)
@@ -3,7 +3,8 @@
 <suite name="Hibernate Model Generator Tests" verbose="1">
     <test name="Unit tests">
         <packages>
-            <package name="org.hibernate.jpamodelgen.test"/>
+            <package name="org.hibernate.jpamodelgen.test.accesstype"/>
+            <package name="org.hibernate.jpamodelgen.test.xmlmapped"/>
         </packages>
     </test>
 </suite>
\ No newline at end of file



More information about the hibernate-commits mailing list