[hibernate-commits] Hibernate SVN: r17078 - in jpamodelgen/trunk: src/main and 7 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon Jul 13 09:03:47 EDT 2009


Author: hardy.ferentschik
Date: 2009-07-13 09:03:46 -0400 (Mon, 13 Jul 2009)
New Revision: 17078

Added:
   jpamodelgen/trunk/issues.txt
   jpamodelgen/trunk/readme.txt
   jpamodelgen/trunk/src/main/assembly/
   jpamodelgen/trunk/src/main/assembly/dist.xml
Modified:
   jpamodelgen/trunk/pom.xml
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ClassWriter.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/Context.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContext.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContextImpl.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/TypeUtils.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaAttribute.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaCollection.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaEntity.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaMap.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaSingleAttribute.java
   jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/xml/XmlMetaAttribute.java
   jpamodelgen/trunk/src/test/java/model/Address.java
   jpamodelgen/trunk/src/test/java/model/Area.java
   jpamodelgen/trunk/src/test/java/model/Building.java
   jpamodelgen/trunk/src/test/java/model/Country.java
   jpamodelgen/trunk/src/test/java/model/Customer.java
   jpamodelgen/trunk/src/test/java/model/Detail.java
   jpamodelgen/trunk/src/test/java/model/Hominidae.java
   jpamodelgen/trunk/src/test/java/model/House.java
   jpamodelgen/trunk/src/test/java/model/Human.java
   jpamodelgen/trunk/src/test/java/model/Inhabitant.java
   jpamodelgen/trunk/src/test/java/model/Item.java
   jpamodelgen/trunk/src/test/java/model/LivingBeing.java
   jpamodelgen/trunk/src/test/java/model/Mammals.java
   jpamodelgen/trunk/src/test/java/model/Order.java
   jpamodelgen/trunk/src/test/java/model/Pet.java
   jpamodelgen/trunk/src/test/java/model/Product.java
   jpamodelgen/trunk/src/test/java/model/Shop.java
   jpamodelgen/trunk/src/test/java/model/User.java
   jpamodelgen/trunk/src/test/java/model/xmlmapped/Address.java
   jpamodelgen/trunk/src/test/java/model/xmlmapped/Building.java
   jpamodelgen/trunk/src/test/java/model/xmlmapped/LivingBeing.java
   jpamodelgen/trunk/src/test/java/model/xmlmapped/Mammal.java
   jpamodelgen/trunk/src/test/java/test/AccessTypeTest.java
   jpamodelgen/trunk/src/test/java/test/InheritanceTest.java
   jpamodelgen/trunk/src/test/java/test/QueryTest.java
   jpamodelgen/trunk/src/test/java/test/XmlMappingTest.java
Log:
added readme and issues. Also added consistent java source file header

Added: jpamodelgen/trunk/issues.txt
===================================================================
--- jpamodelgen/trunk/issues.txt	                        (rev 0)
+++ jpamodelgen/trunk/issues.txt	2009-07-13 13:03:46 UTC (rev 17078)
@@ -0,0 +1,19 @@
+
+- Find host for project
+
+- Implement XML overriding of annotation metadata
+
+- Implement access Type rules for XML metadata
+
+- Investigate why it is not possible to use the Filer API to load non class resources, eg
+  /META-INF/orm.xml. The API throws a FilerException with the message "Illegal name /META-INF".
+  The call is processingEnv.getFiler().getResource((StandardLocation.CLASS_OUTPUT, "/META-INF", "orm.xml" )
+  Currently we work around this by using Class.getResourceAsStream()
+
+- Optimize XML parsing by only processing XML files if they have changed since last run (maybe write 
+  a tmp file against which to compare the last modified time stamp)
+
+- Reduce the amount of logging and make logging configurable using the possibility to pass arguments to
+  the processor using -Akey[=value]
+
+- Write IDE specific plugins which allow to cache processing steps

Modified: jpamodelgen/trunk/pom.xml
===================================================================
--- jpamodelgen/trunk/pom.xml	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/pom.xml	2009-07-13 13:03:46 UTC (rev 17078)
@@ -190,6 +190,23 @@
                 </executions>
             </plugin>
             <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/dist.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>site</phase>
+                        <goals>
+                            <goal>assembly</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>            
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-release-plugin</artifactId>
                 <version>2.0-beta-9</version>

Added: jpamodelgen/trunk/readme.txt
===================================================================
--- jpamodelgen/trunk/readme.txt	                        (rev 0)
+++ jpamodelgen/trunk/readme.txt	2009-07-13 13:03:46 UTC (rev 17078)
@@ -0,0 +1,65 @@
+                          JPA Model Generator
+
+  What is it?
+  -----------
+
+  This is a Java 6 annotation processor generating meta model classes for the JPA 2 criteria queries.
+  The processor (JPAMetaModelEntityProcessor) processes all classes annotated with @Entity, as well as
+  entities mapped in /META-INF/orm.xml and mapping files specified in persistence.xml.
+
+
+  Status
+  ------
+
+  This is an alpha release of the annotation processor. The implemented functionality includes:
+   - full support for annotations honoring the access type (v2.0) 
+   - support for persistence.xml, orm.xml and  <mapping-file>
+   - tests (both via compilation failure and regular assertion failure)
+
+
+  System Requirements
+  -------------------
+
+  JDK 1.6 or above.
+ 
+
+  Issues
+  ------
+
+  See issues.txt
+
+
+  Using JPA Model Generator
+  -------------------------
+
+  - Copy jpamodelgen-*.jar together will all jar files from lib into the  classpath of your application. 
+    The jpamodelgen jar file contains a service file (/META-INF/services/javax.annotation.processing.Processor) 
+    so that the annotation processor will automatically be executed during compilation. 
+    You can also explicitly specify the processor using the -processor flag:
+    > javac -cp <myclasspath> -d <target> -sourcepath <sources> -processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
+
+  
+  * Maven
+  This distribution contains a pom.xml file showing one of three possible ways to integrate the processor in a maven project. 
+  You can just add <processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor> to the maven-compiler-plugin.
+  This approach has, however, the shortcoming that messages from the annotation processor are not displayed. This is a known
+  issue. See also - http://weblogs.java.net/blog/ss141213/archive/2007/11/my_maven_experi.html
+  The second alternative is the maven-annotation-plugin (http://code.google.com/p/maven-annotation-plugin/). This approach
+  hasn't been tested yet. 
+  Last but not least, you can use the maven-antrun-plugin to just run the annotation processor and ignore the processor in 
+  in the maven-compiler-plugin via '-proc:none'. This is the approach chosen in the POM for this project.
+
+  * Ant
+  Make sure the annotation processor and its dependencies are in the classpath. Due the service file the processor will be
+  automatically executed when the javac task executes.
+  If not try adding <compilerarg value="-processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor"/>
+
+  * Idea
+  Again, if in the classpath the JPAMetaModelEntityProcessor should execute automatically. If not add the following under 
+  'Compiler->Java Compiler': -target 1.6 -processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor
+  You can also turn of annotation processing via: -target 1.6 -proc:none
+
+
+  
+
+

Added: jpamodelgen/trunk/src/main/assembly/dist.xml
===================================================================
--- jpamodelgen/trunk/src/main/assembly/dist.xml	                        (rev 0)
+++ jpamodelgen/trunk/src/main/assembly/dist.xml	2009-07-13 13:03:46 UTC (rev 17078)
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you 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.
+-->
+
+<assembly>
+    <id>dist</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>tar.bz2</format>
+        <format>zip</format>
+    </formats>
+
+    <dependencySets>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>lib</outputDirectory>
+            <scope>runtime</scope>
+        </dependencySet>
+    </dependencySets>
+
+    <files>
+        <file>
+            <source>readme.txt</source>
+            <outputDirectory>/</outputDirectory>
+            <filtered>true</filtered>
+        </file>
+        <file>
+            <source>license.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+        <file>
+            <source>issues.txt</source>
+            <outputDirectory>/</outputDirectory>
+        </file>
+    </files>
+
+    <fileSets>
+        <fileSet>
+            <directory>target</directory>
+            <outputDirectory/>
+            <excludes>
+                <exclude>*-javadoc.jar</exclude>
+                <exclude>*-sources.jar</exclude>
+            </excludes>
+            <includes>
+                <include>hibernate-*.jar</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>target/site/apidocs</directory>
+            <outputDirectory>docs/api</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>.</directory>
+            <outputDirectory/>
+            <useDefaultExcludes>true</useDefaultExcludes>
+            <excludes>
+                <exclude>*.txt</exclude>
+                <exclude>**/target/**</exclude>
+                <exclude>*.iml</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
+
+</assembly>

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ClassWriter.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ClassWriter.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ClassWriter.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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;
 
 import java.io.OutputStream;

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/Context.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/Context.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/Context.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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;
 
 import java.util.Map;
@@ -12,6 +29,8 @@
 import org.hibernate.jpamodelgen.annotation.MetaEntity;
 
 /**
+ * @author Max Andersen
+ * @author Hardy Ferentschik
  * @author Emmanuel Bernard
  */
 public class Context {

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContext.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContext.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContext.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,23 +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;
 
+/**
+ * 
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public interface ImportContext {
 
 	/**
 	 * Add fqcn to the import list. Returns fqcn as needed in source code.
 	 * Attempts to handle fqcn with array and generics references.
-	 * 
+	 * <p/>
 	 * e.g.
 	 * java.util.Collection<org.marvel.Hulk> imports java.util.Collection and returns Collection
 	 * org.marvel.Hulk[] imports org.marvel.Hulk and returns Hulk
-	 * 
-	 * 
-	 * @param fqcn
+	 *
+	 * @param fqcn Fully qualified class name of the type to import.
+	 *
 	 * @return import string
 	 */
 	public abstract String importType(String fqcn);
 
 	public abstract String staticImport(String fqcn, String member);
-	
+
 	public abstract String generateImports();
 
 }
\ No newline at end of file

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContextImpl.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContextImpl.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/ImportContextImpl.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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;
 
 import java.util.HashMap;
@@ -7,7 +24,12 @@
 import java.util.TreeSet;
 
 
-
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class ImportContextImpl implements ImportContext {
 
 	Set<String> imports = new TreeSet<String>();

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/JPAMetaModelEntityProcessor.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,4 +1,20 @@
 // $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;
 
 import java.io.IOException;
@@ -46,6 +62,7 @@
  *
  * @author Max Andersen
  * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
  */
 //@SupportedAnnotationTypes("javax.persistence.Entity")
 @SupportedAnnotationTypes("*")

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/TypeUtils.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/TypeUtils.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/TypeUtils.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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;
 
 import java.util.HashMap;
@@ -9,6 +26,13 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.Element;
 
+/**
+ * Utility class.
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class TypeUtils {
 
 	private static final Map<String, String> PRIMITIVES = new HashMap<String, String>();

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaAttribute.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaAttribute.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaAttribute.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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.annotation;
 
 import org.hibernate.jpamodelgen.IMetaAttribute;
@@ -8,6 +25,12 @@
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public abstract class MetaAttribute implements IMetaAttribute {
 
 	final protected Element element;

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaCollection.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaCollection.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaCollection.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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.annotation;
 
 import org.hibernate.jpamodelgen.IMetaCollection;
@@ -4,7 +21,12 @@
 
 import javax.lang.model.element.Element;
 
-
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class MetaCollection extends MetaAttribute implements IMetaCollection {
 
 	private String collectionType; 

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaEntity.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaEntity.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaEntity.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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.annotation;
 
 import java.util.ArrayList;
@@ -38,6 +55,12 @@
 import org.hibernate.jpamodelgen.TypeUtils;
 import org.hibernate.jpamodelgen.Context;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class MetaEntity implements IMetaEntity {
 
 	final TypeElement element;

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaMap.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaMap.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaMap.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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.annotation;
 
 import javax.lang.model.element.Element;
@@ -2,2 +19,8 @@
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class MetaMap extends MetaCollection {

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaSingleAttribute.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaSingleAttribute.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/annotation/MetaSingleAttribute.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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.annotation;
 
 import org.hibernate.jpamodelgen.IMetaSingleAttribute;
@@ -4,6 +21,12 @@
 
 import javax.lang.model.element.Element;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 public class MetaSingleAttribute extends MetaAttribute implements IMetaSingleAttribute {
 
 	public MetaSingleAttribute(MetaEntity parent, Element element, String type) {

Modified: jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/xml/XmlMetaAttribute.java
===================================================================
--- jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/xml/XmlMetaAttribute.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/main/java/org/hibernate/jpamodelgen/xml/XmlMetaAttribute.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -15,6 +15,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
+
 package org.hibernate.jpamodelgen.xml;
 
 import org.hibernate.jpamodelgen.IMetaAttribute;

Modified: jpamodelgen/trunk/src/test/java/model/Address.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Address.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Address.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import java.util.Set;

Modified: jpamodelgen/trunk/src/test/java/model/Area.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Area.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Area.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.MappedSuperclass;

Modified: jpamodelgen/trunk/src/test/java/model/Building.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Building.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Building.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.MappedSuperclass;

Modified: jpamodelgen/trunk/src/test/java/model/Country.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Country.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Country.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Embeddable;

Modified: jpamodelgen/trunk/src/test/java/model/Customer.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Customer.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Customer.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import java.util.Set;

Modified: jpamodelgen/trunk/src/test/java/model/Detail.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Detail.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Detail.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Embeddable;

Modified: jpamodelgen/trunk/src/test/java/model/Hominidae.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Hominidae.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Hominidae.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Entity;

Modified: jpamodelgen/trunk/src/test/java/model/House.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/House.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/House.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Id;

Modified: jpamodelgen/trunk/src/test/java/model/Human.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Human.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Human.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Entity;

Modified: jpamodelgen/trunk/src/test/java/model/Inhabitant.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Inhabitant.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Inhabitant.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import java.util.Set;

Modified: jpamodelgen/trunk/src/test/java/model/Item.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Item.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Item.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import java.util.Map;
@@ -8,6 +25,12 @@
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 @Entity  
 public class Item {
 	

Modified: jpamodelgen/trunk/src/test/java/model/LivingBeing.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/LivingBeing.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/LivingBeing.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.MappedSuperclass;

Modified: jpamodelgen/trunk/src/test/java/model/Mammals.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Mammals.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Mammals.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Entity;

Modified: jpamodelgen/trunk/src/test/java/model/Order.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Order.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Order.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,13 +1,32 @@
+// $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 model;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
 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 {
 	

Modified: jpamodelgen/trunk/src/test/java/model/Pet.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Pet.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Pet.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Embeddable;

Modified: jpamodelgen/trunk/src/test/java/model/Product.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Product.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Product.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import java.math.BigDecimal;
@@ -8,6 +25,12 @@
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 @Entity  
 public class Product {
 

Modified: jpamodelgen/trunk/src/test/java/model/Shop.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/Shop.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/Shop.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Entity;
@@ -3,4 +20,10 @@
 import javax.persistence.Id;
 
+/**
+ *
+ * @author Max Andersen
+ * @author Hardy Ferentschik
+ * @author Emmanuel Bernard
+ */
 @Entity 
 public class Shop {

Modified: jpamodelgen/trunk/src/test/java/model/User.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/User.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/User.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model;
 
 import javax.persistence.Entity;

Modified: jpamodelgen/trunk/src/test/java/model/xmlmapped/Address.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/xmlmapped/Address.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/xmlmapped/Address.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,7 +1,24 @@
+// $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 model.xmlmapped;
 
 /**
- * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
  */
 public class Address {
 	private String street1;

Modified: jpamodelgen/trunk/src/test/java/model/xmlmapped/Building.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/xmlmapped/Building.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/xmlmapped/Building.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 model.xmlmapped;
 
 import model.Address;
@@ -4,7 +21,7 @@
 import model.Area;
 
 /**
- * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
  */
 public class Building extends Area {
 	private Address address;

Modified: jpamodelgen/trunk/src/test/java/model/xmlmapped/LivingBeing.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/xmlmapped/LivingBeing.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/xmlmapped/LivingBeing.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,5 +1,25 @@
+// $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 model.xmlmapped;
 
+/**
+ * @author Hardy Ferentschik
+ */
 public class LivingBeing {
 	boolean isReallyAlive;
 

Modified: jpamodelgen/trunk/src/test/java/model/xmlmapped/Mammal.java
===================================================================
--- jpamodelgen/trunk/src/test/java/model/xmlmapped/Mammal.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/model/xmlmapped/Mammal.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,6 +1,25 @@
+// $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 model.xmlmapped;
 
-
+/**
+ * @author Hardy Ferentschik
+ */
 public class Mammal extends LivingBeing {
 	private String id;
 	private String subclass;

Modified: jpamodelgen/trunk/src/test/java/test/AccessTypeTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/test/AccessTypeTest.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/test/AccessTypeTest.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 test;
 
 import java.lang.reflect.Field;

Modified: jpamodelgen/trunk/src/test/java/test/InheritanceTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/test/InheritanceTest.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/test/InheritanceTest.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 test;
 
 import org.testng.annotations.Test;

Modified: jpamodelgen/trunk/src/test/java/test/QueryTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/test/QueryTest.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/test/QueryTest.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 test;
 
 import java.math.BigDecimal;
@@ -3,4 +20,5 @@
 import java.util.Date;
 import java.util.Set;
+import javax.persistence.Tuple;
 import javax.persistence.criteria.CriteriaQuery;
 import javax.persistence.criteria.Expression;
@@ -11,13 +29,12 @@
 import javax.persistence.criteria.Path;
 import javax.persistence.criteria.QueryBuilder;
 import javax.persistence.criteria.Root;
-import javax.persistence.Tuple;
 
 import model.Item;
+import model.Item_;
 import model.Order;
+import model.Order_;
 import model.Product;
-import model.Item_;
-import model.Order_;
 import model.Product_;
 import model.Shop_;
 
@@ -26,6 +43,10 @@
  * 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 {
 
@@ -34,69 +55,68 @@
 	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);
+		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);
+		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) );
+				.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");
+		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");
+		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) );
+				.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);
+		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);
+		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) );
+		q.select( product )
+				.where( qb.equal( order.get( Order_.id ), 12345l ) );
 	}
 
 	public void testMap() {
-		CriteriaQuery<Item> q = qb.createQuery(Item.class);
+		CriteriaQuery<Item> q = qb.createQuery( Item.class );
 
-		Root<Item> item = q.from(Item.class);
-		Join<Item, Order> io = item.join(Item_.namedOrders);
-
+		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);
+		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") );
+		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() {
@@ -112,15 +132,15 @@
 //	}
 
 	public void test4Untypesafe() {
-		CriteriaQuery<String> q = qb.createQuery(String.class);
+		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);
+		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) ) );
+		q.select( note )
+				.where( qb.and( qb.lt( note.index(), 10 ), qb.isNotEmpty( items ) ) );
 	}
 
 	/*public void test5() {

Modified: jpamodelgen/trunk/src/test/java/test/XmlMappingTest.java
===================================================================
--- jpamodelgen/trunk/src/test/java/test/XmlMappingTest.java	2009-07-10 17:59:58 UTC (rev 17077)
+++ jpamodelgen/trunk/src/test/java/test/XmlMappingTest.java	2009-07-13 13:03:46 UTC (rev 17078)
@@ -1,3 +1,20 @@
+// $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 test;
 
 import static org.testng.Assert.assertNotNull;




More information about the hibernate-commits mailing list