You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jl...@apache.org on 2010/12/23 16:58:57 UTC

svn commit: r1052305 [1/3] - in /openejb/trunk/openejb3/container/openejb-jee/src: main/java/org/apache/openejb/jee/jpa/ test/java/org/apache/openejb/jee/jpa/ test/resources/

Author: jlmonteiro
Date: Thu Dec 23 15:58:55 2010
New Revision: 1052305

URL: http://svn.apache.org/viewvc?rev=1052305&view=rev
Log:
OPENEJB-1236 Provide JPA 2.0 support in addition to JPA 1.0
JaxB tree updated for orm.xml and persistence.xml files.
Also added some tests

Added:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyClass.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyColumn.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyJoinColumn.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OrderColumn.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml
Modified:
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToOne.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitDefaults.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitMetadata.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java
    openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml
    openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "access-type")
 @XmlEnum
 public enum AccessType {
 

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java Thu Dec 23 15:58:55 2010
@@ -32,7 +32,8 @@ import javax.xml.bind.annotation.XmlType
  *         @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
  *         public @interface AssociationOverride {
  *           String name();
- *           JoinColumn[] joinColumns();
+ *           JoinColumn[] joinColumns() default{};
+ *           JoinTable joinTable() default @JoinTable;
  *         }
  * 
  *       
@@ -46,7 +47,11 @@ import javax.xml.bind.annotation.XmlType
  *   &lt;complexContent>
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
- *         &lt;element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded"/>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;choice>
+ *           &lt;element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
+ *         &lt;/choice>
  *       &lt;/sequence>
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
  *     &lt;/restriction>
@@ -58,16 +63,45 @@ import javax.xml.bind.annotation.XmlType
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "association-override", propOrder = {
-    "joinColumn"
+    "description",
+    "joinColumn",
+    "joinTable"
 })
 public class AssociationOverride {
 
-    @XmlElement(name = "join-column", required = true)
+    protected String description;
+    @XmlElement(name = "join-column")
     protected List<JoinColumn> joinColumn;
+    @XmlElement(name = "join-table")
+    protected JoinTable joinTable;
     @XmlAttribute(required = true)
     protected String name;
 
     /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
      * Gets the value of the joinColumn property.
      * 
      * <p>
@@ -97,6 +131,30 @@ public class AssociationOverride {
     }
 
     /**
+     * Gets the value of the joinTable property.
+     *
+     * @return
+     *     possible object is
+     *     {@link JoinTable }
+     *
+     */
+    public JoinTable getJoinTable() {
+        return joinTable;
+    }
+
+    /**
+     * Sets the value of the joinTable property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link JoinTable }
+     *
+     */
+    public void setJoinTable(JoinTable value) {
+        this.joinTable = value;
+    }
+
+    /**
      * Gets the value of the name property.
      * 
      * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java Thu Dec 23 15:58:55 2010
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
  *   &lt;complexContent>
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
  *         &lt;element name="column" type="{http://java.sun.com/xml/ns/persistence/orm}column"/>
  *       &lt;/sequence>
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -56,10 +57,12 @@ import javax.xml.bind.annotation.XmlType
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "attribute-override", propOrder = {
+    "description",
     "column"
 })
 public class AttributeOverride implements Field {
 
+    protected String description;
     @XmlElement(required = true)
     protected Column column;
     @XmlAttribute(required = true)
@@ -80,6 +83,30 @@ public class AttributeOverride implement
     }
 
     /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
      * Gets the value of the column property.
      * 
      * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java Thu Dec 23 15:58:55 2010
@@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
  *   &lt;complexContent>
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
  *         &lt;choice>
  *           &lt;element name="id" type="{http://java.sun.com/xml/ns/persistence/orm}id" maxOccurs="unbounded" minOccurs="0"/>
  *           &lt;element name="embedded-id" type="{http://java.sun.com/xml/ns/persistence/orm}embedded-id" minOccurs="0"/>
@@ -58,6 +59,7 @@ import javax.xml.bind.annotation.XmlType
  *         &lt;element name="one-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="one-to-one" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="many-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="element-collection" type="{http://java.sun.com/xml/ns/persistence/orm}element-collection" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="embedded" type="{http://java.sun.com/xml/ns/persistence/orm}embedded" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="transient" type="{http://java.sun.com/xml/ns/persistence/orm}transient" maxOccurs="unbounded" minOccurs="0"/>
  *       &lt;/sequence>
@@ -70,6 +72,7 @@ import javax.xml.bind.annotation.XmlType
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "attributes", propOrder = {
+    "description",
     "id",
     "embeddedId",
     "basic",
@@ -78,11 +81,13 @@ import javax.xml.bind.annotation.XmlType
     "oneToMany",
     "oneToOne",
     "manyToMany",
+    "elementCollection",
     "embedded",
     "_transient"
 })
 public class Attributes {
 
+    protected String description;
     protected List<Id> id;
     @XmlElement(name = "embedded-id")
     protected EmbeddedId embeddedId;
@@ -96,11 +101,37 @@ public class Attributes {
     protected List<OneToOne> oneToOne;
     @XmlElement(name = "many-to-many")
     protected List<ManyToMany> manyToMany;
+    @XmlElement(name = "element-collection")
+    protected List<ElementCollection> elementCollection;
     protected List<Embedded> embedded;
     @XmlElement(name = "transient")
     protected List<Transient> _transient;
 
     /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
      * Gets the value of the id property.
      * 
      * <p>
@@ -337,6 +368,35 @@ public class Attributes {
     }
 
     /**
+     * Gets the value of the elementCollection property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the elementCollection property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getElementCollection().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ElementCollection }
+     *
+     *
+     */
+    public List<ElementCollection> getElementCollection() {
+        if (elementCollection == null) {
+            elementCollection = new ArrayList<ElementCollection>();
+        }
+        return this.elementCollection;
+    }
+
+    /**
      * Gets the value of the embedded property.
      * 
      * <p>

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java Thu Dec 23 15:58:55 2010
@@ -50,9 +50,10 @@ import javax.xml.bind.annotation.XmlType
  *           &lt;element name="enumerated" type="{http://java.sun.com/xml/ns/persistence/orm}enumerated" minOccurs="0"/>
  *         &lt;/choice>
  *       &lt;/sequence>
- *       &lt;attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
  *       &lt;attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -73,12 +74,14 @@ public class Basic implements Field {
     protected Lob lob;
     protected TemporalType temporal;
     protected EnumType enumerated;
-    @XmlAttribute
-    protected FetchType fetch;
     @XmlAttribute(required = true)
     protected String name;
     @XmlAttribute
+    protected FetchType fetch;
+    @XmlAttribute
     protected Boolean optional;
+    @XmlAttribute
+    protected AccessType access;
 
     public Basic() {
     }
@@ -189,51 +192,51 @@ public class Basic implements Field {
     }
 
     /**
-     * Gets the value of the fetch property.
-     * 
+     * Gets the value of the name property.
+     *
      * @return
      *     possible object is
-     *     {@link FetchType }
-     *     
+     *     {@link String }
+     *
      */
-    public FetchType getFetch() {
-        return fetch;
+    public String getName() {
+        return name;
     }
 
     /**
-     * Sets the value of the fetch property.
-     * 
+     * Sets the value of the name property.
+     *
      * @param value
      *     allowed object is
-     *     {@link FetchType }
-     *     
+     *     {@link String }
+     *
      */
-    public void setFetch(FetchType value) {
-        this.fetch = value;
+    public void setName(String value) {
+        this.name = value;
     }
 
     /**
-     * Gets the value of the name property.
-     * 
+     * Gets the value of the fetch property.
+     *
      * @return
      *     possible object is
-     *     {@link String }
-     *     
+     *     {@link FetchType }
+     *
      */
-    public String getName() {
-        return name;
+    public FetchType getFetch() {
+        return fetch;
     }
 
     /**
-     * Sets the value of the name property.
-     * 
+     * Sets the value of the fetch property.
+     *
      * @param value
      *     allowed object is
-     *     {@link String }
-     *     
+     *     {@link FetchType }
+     *
      */
-    public void setName(String value) {
-        this.name = value;
+    public void setFetch(FetchType value) {
+        this.fetch = value;
     }
 
     /**
@@ -260,6 +263,30 @@ public class Basic implements Field {
         this.optional = value;
     }
 
+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
     public Object getKey() {
         return name;
     }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java Thu Dec 23 15:58:55 2010
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType
 /**
  * 
  * 
- *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};
+ *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH, DETACH};
  * 
  *       
  * 
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
  *         &lt;element name="cascade-merge" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
  *         &lt;element name="cascade-remove" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
  *         &lt;element name="cascade-refresh" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
+ *         &lt;element name="cascade-detach" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
  *       &lt;/sequence>
  *     &lt;/restriction>
  *   &lt;/complexContent>
@@ -58,7 +59,8 @@ import javax.xml.bind.annotation.XmlType
     "cascadePersist",
     "cascadeMerge",
     "cascadeRemove",
-    "cascadeRefresh"
+    "cascadeRefresh",
+    "cascadeDetach"
 })
 public class CascadeType {
 
@@ -72,6 +74,8 @@ public class CascadeType {
     protected EmptyType cascadeRemove;
     @XmlElement(name = "cascade-refresh")
     protected EmptyType cascadeRefresh;
+    @XmlElement(name = "cascade-detach")
+    protected EmptyType cascadeDetach;
 
     /**
      * Gets the value of the cascadeAll property.
@@ -193,4 +197,27 @@ public class CascadeType {
         this.cascadeRefresh = value ? new EmptyType() : null;
     }
 
+    /**
+     * Gets the value of the cascadeDetach property.
+     *
+     * @return
+     *     possible object is
+     *     {@link boolean }
+     *
+     */
+    public boolean isCascadeDetach() {
+        return cascadeDetach != null;
+    }
+
+    /**
+     * Sets the value of the cascadeDetach property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link boolean }
+     *
+     */
+    public void setCascadeDetach(boolean value) {
+        this.cascadeDetach = value ? new EmptyType() : null;
+    }
 }

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java Thu Dec 23 15:58:55 2010
@@ -0,0 +1,213 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ * 
+ *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ *         public @interface CollectionTable {
+ *           String name() default "";
+ *           String catalog() default "";
+ *           String schema() default "";
+ *           JoinColumn[] joinColumns() default {};
+ *           UniqueConstraint[] uniqueConstraints() default {};
+ *         }
+ * 
+ *       
+ * 
+ * <p>Java class for collection-table complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="collection-table">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "collection-table", propOrder = {
+    "joinColumn",
+    "uniqueConstraint"
+})
+public class CollectionTable {
+
+    @XmlElement(name = "join-column")
+    protected List<JoinColumn> joinColumn;
+    @XmlElement(name = "unique-constraint")
+    protected List<UniqueConstraint> uniqueConstraint;
+    @XmlAttribute
+    protected String name;
+    @XmlAttribute
+    protected String catalog;
+    @XmlAttribute
+    protected String schema;
+
+    /**
+     * Gets the value of the joinColumn property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the joinColumn property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getJoinColumn().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.JoinColumn }
+     * 
+     * 
+     */
+    public List<JoinColumn> getJoinColumn() {
+        if (joinColumn == null) {
+            joinColumn = new ArrayList<JoinColumn>();
+        }
+        return this.joinColumn;
+    }
+
+    /**
+     * Gets the value of the uniqueConstraint property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getUniqueConstraint().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.UniqueConstraint }
+     * 
+     * 
+     */
+    public List<UniqueConstraint> getUniqueConstraint() {
+        if (uniqueConstraint == null) {
+            uniqueConstraint = new ArrayList<UniqueConstraint>();
+        }
+        return this.uniqueConstraint;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the catalog property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCatalog() {
+        return catalog;
+    }
+
+    /**
+     * Sets the value of the catalog property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCatalog(String value) {
+        this.catalog = value;
+    }
+
+    /**
+     * Gets the value of the schema property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSchema() {
+        return schema;
+    }
+
+    /**
+     * Sets the value of the schema property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSchema(String value) {
+        this.schema = value;
+    }
+
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "discriminator-type")
 @XmlEnum
 public enum DiscriminatorType {
 

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java Thu Dec 23 15:58:55 2010
@@ -0,0 +1,653 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * 
+ * 
+ *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ *         public @interface ElementCollection {
+ *           Class targetClass() default void.class;
+ *           FetchType fetch() default LAZY;
+ *         }
+ * 
+ *       
+ * 
+ * <p>Java class for element-collection complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="element-collection">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;choice>
+ *           &lt;element name="order-by" type="{http://java.sun.com/xml/ns/persistence/orm}order-by" minOccurs="0"/>
+ *           &lt;element name="order-column" type="{http://java.sun.com/xml/ns/persistence/orm}order-column" minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *           &lt;element name="map-key" type="{http://java.sun.com/xml/ns/persistence/orm}map-key" minOccurs="0"/>
+ *           &lt;sequence>
+ *             &lt;element name="map-key-class" type="{http://java.sun.com/xml/ns/persistence/orm}map-key-class" minOccurs="0"/>
+ *             &lt;choice>
+ *               &lt;element name="map-key-temporal" type="{http://java.sun.com/xml/ns/persistence/orm}temporal" minOccurs="0"/>
+ *               &lt;element name="map-key-enumerated" type="{http://java.sun.com/xml/ns/persistence/orm}enumerated" minOccurs="0"/>
+ *               &lt;element name="map-key-attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;/choice>
+ *             &lt;choice>
+ *               &lt;element name="map-key-column" type="{http://java.sun.com/xml/ns/persistence/orm}map-key-column" minOccurs="0"/>
+ *               &lt;element name="map-key-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}map-key-join-column" maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;/choice>
+ *           &lt;/sequence>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *           &lt;sequence>
+ *             &lt;element name="column" type="{http://java.sun.com/xml/ns/persistence/orm}column" minOccurs="0"/>
+ *             &lt;choice>
+ *               &lt;element name="temporal" type="{http://java.sun.com/xml/ns/persistence/orm}temporal" minOccurs="0"/>
+ *               &lt;element name="enumerated" type="{http://java.sun.com/xml/ns/persistence/orm}enumerated" minOccurs="0"/>
+ *               &lt;element name="lob" type="{http://java.sun.com/xml/ns/persistence/orm}lob" minOccurs="0"/>
+ *             &lt;/choice>
+ *           &lt;/sequence>
+ *           &lt;sequence>
+ *             &lt;element name="attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;element name="association-override" type="{http://java.sun.com/xml/ns/persistence/orm}association-override" maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;/sequence>
+ *         &lt;/choice>
+ *         &lt;element name="collection-table" type="{http://java.sun.com/xml/ns/persistence/orm}collection-table" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="target-class" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "element-collection", propOrder = {
+    "orderBy",
+    "orderColumn",
+    "mapKey",
+    "mapKeyClass",
+    "mapKeyTemporal",
+    "mapKeyEnumerated",
+    "mapKeyAttributeOverride",
+    "mapKeyColumn",
+    "mapKeyJoinColumn",
+    "column",
+    "temporal",
+    "enumerated",
+    "lob",
+    "attributeOverride",
+    "associationOverride",
+    "collectionTable"
+})
+public class ElementCollection {
+
+    @XmlElement(name = "order-by")
+    protected String orderBy;
+    @XmlElement(name = "order-column")
+    protected OrderColumn orderColumn;
+    @XmlElement(name = "map-key")
+    protected MapKey mapKey;
+    @XmlElement(name = "map-key-class")
+    protected MapKeyClass mapKeyClass;
+    @XmlElement(name = "map-key-temporal")
+    protected TemporalType mapKeyTemporal;
+    @XmlElement(name = "map-key-enumerated")
+    protected EnumType mapKeyEnumerated;
+    @XmlElement(name = "map-key-attribute-override")
+    protected List<AttributeOverride> mapKeyAttributeOverride;
+    @XmlElement(name = "map-key-column")
+    protected MapKeyColumn mapKeyColumn;
+    @XmlElement(name = "map-key-join-column")
+    protected List<MapKeyJoinColumn> mapKeyJoinColumn;
+    protected Column column;
+    protected TemporalType temporal;
+    protected EnumType enumerated;
+    protected Lob lob;
+    @XmlElement(name = "attribute-override")
+    protected List<AttributeOverride> attributeOverride;
+    @XmlElement(name = "association-override")
+    protected List<AssociationOverride> associationOverride;
+    @XmlElement(name = "collection-table")
+    protected CollectionTable collectionTable;
+    @XmlAttribute(required = true)
+    protected String name;
+    @XmlAttribute(name = "target-class")
+    protected String targetClass;
+    @XmlAttribute
+    protected FetchType fetch;
+    @XmlAttribute
+    protected AccessType access;
+
+    /**
+     * Gets the value of the orderBy property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getOrderBy() {
+        return orderBy;
+    }
+
+    /**
+     * Sets the value of the orderBy property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setOrderBy(String value) {
+        this.orderBy = value;
+    }
+
+    /**
+     * Gets the value of the orderColumn property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link OrderColumn }
+     *     
+     */
+    public OrderColumn getOrderColumn() {
+        return orderColumn;
+    }
+
+    /**
+     * Sets the value of the orderColumn property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link OrderColumn }
+     *     
+     */
+    public void setOrderColumn(OrderColumn value) {
+        this.orderColumn = value;
+    }
+
+    /**
+     * Gets the value of the mapKey property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.MapKey }
+     *     
+     */
+    public MapKey getMapKey() {
+        return mapKey;
+    }
+
+    /**
+     * Sets the value of the mapKey property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.MapKey }
+     *     
+     */
+    public void setMapKey(MapKey value) {
+        this.mapKey = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyClass property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MapKeyClass }
+     *     
+     */
+    public MapKeyClass getMapKeyClass() {
+        return mapKeyClass;
+    }
+
+    /**
+     * Sets the value of the mapKeyClass property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MapKeyClass }
+     *     
+     */
+    public void setMapKeyClass(MapKeyClass value) {
+        this.mapKeyClass = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyTemporal property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *     
+     */
+    public TemporalType getMapKeyTemporal() {
+        return mapKeyTemporal;
+    }
+
+    /**
+     * Sets the value of the mapKeyTemporal property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *     
+     */
+    public void setMapKeyTemporal(TemporalType value) {
+        this.mapKeyTemporal = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyEnumerated property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *     
+     */
+    public EnumType getMapKeyEnumerated() {
+        return mapKeyEnumerated;
+    }
+
+    /**
+     * Sets the value of the mapKeyEnumerated property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *     
+     */
+    public void setMapKeyEnumerated(EnumType value) {
+        this.mapKeyEnumerated = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyAttributeOverride property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mapKeyAttributeOverride property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapKeyAttributeOverride().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
+     * 
+     * 
+     */
+    public List<AttributeOverride> getMapKeyAttributeOverride() {
+        if (mapKeyAttributeOverride == null) {
+            mapKeyAttributeOverride = new ArrayList<AttributeOverride>();
+        }
+        return this.mapKeyAttributeOverride;
+    }
+
+    /**
+     * Gets the value of the mapKeyColumn property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MapKeyColumn }
+     *     
+     */
+    public MapKeyColumn getMapKeyColumn() {
+        return mapKeyColumn;
+    }
+
+    /**
+     * Sets the value of the mapKeyColumn property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MapKeyColumn }
+     *     
+     */
+    public void setMapKeyColumn(MapKeyColumn value) {
+        this.mapKeyColumn = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyJoinColumn property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the mapKeyJoinColumn property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapKeyJoinColumn().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link MapKeyJoinColumn }
+     * 
+     * 
+     */
+    public List<MapKeyJoinColumn> getMapKeyJoinColumn() {
+        if (mapKeyJoinColumn == null) {
+            mapKeyJoinColumn = new ArrayList<MapKeyJoinColumn>();
+        }
+        return this.mapKeyJoinColumn;
+    }
+
+    /**
+     * Gets the value of the column property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.Column }
+     *     
+     */
+    public Column getColumn() {
+        return column;
+    }
+
+    /**
+     * Sets the value of the column property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.Column }
+     *     
+     */
+    public void setColumn(Column value) {
+        this.column = value;
+    }
+
+    /**
+     * Gets the value of the temporal property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *     
+     */
+    public TemporalType getTemporal() {
+        return temporal;
+    }
+
+    /**
+     * Sets the value of the temporal property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *     
+     */
+    public void setTemporal(TemporalType value) {
+        this.temporal = value;
+    }
+
+    /**
+     * Gets the value of the enumerated property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *     
+     */
+    public EnumType getEnumerated() {
+        return enumerated;
+    }
+
+    /**
+     * Sets the value of the enumerated property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *     
+     */
+    public void setEnumerated(EnumType value) {
+        this.enumerated = value;
+    }
+
+    /**
+     * Gets the value of the lob property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.Lob }
+     *     
+     */
+    public Lob getLob() {
+        return lob;
+    }
+
+    /**
+     * Sets the value of the lob property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.Lob }
+     *     
+     */
+    public void setLob(Lob value) {
+        this.lob = value;
+    }
+
+    /**
+     * Gets the value of the attributeOverride property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the attributeOverride property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAttributeOverride().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
+     * 
+     * 
+     */
+    public List<AttributeOverride> getAttributeOverride() {
+        if (attributeOverride == null) {
+            attributeOverride = new ArrayList<AttributeOverride>();
+        }
+        return this.attributeOverride;
+    }
+
+    /**
+     * Gets the value of the associationOverride property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the associationOverride property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAssociationOverride().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AssociationOverride }
+     * 
+     * 
+     */
+    public List<AssociationOverride> getAssociationOverride() {
+        if (associationOverride == null) {
+            associationOverride = new ArrayList<AssociationOverride>();
+        }
+        return this.associationOverride;
+    }
+
+    /**
+     * Gets the value of the collectionTable property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CollectionTable }
+     *     
+     */
+    public CollectionTable getCollectionTable() {
+        return collectionTable;
+    }
+
+    /**
+     * Sets the value of the collectionTable property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CollectionTable }
+     *     
+     */
+    public void setCollectionTable(CollectionTable value) {
+        this.collectionTable = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the targetClass property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTargetClass() {
+        return targetClass;
+    }
+
+    /**
+     * Sets the value of the targetClass property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTargetClass(String value) {
+        this.targetClass = value;
+    }
+
+    /**
+     * Gets the value of the fetch property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.FetchType }
+     *     
+     */
+    public FetchType getFetch() {
+        return fetch;
+    }
+
+    /**
+     * Sets the value of the fetch property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.FetchType }
+     *     
+     */
+    public void setFetch(FetchType value) {
+        this.fetch = value;
+    }
+
+    /**
+     * Gets the value of the access property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.AccessType }
+     *     
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.AccessType }
+     *     
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java Thu Dec 23 15:58:55 2010
@@ -36,6 +36,12 @@ import javax.xml.bind.annotation.XmlType
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
  *         &lt;element name="basic" type="{http://java.sun.com/xml/ns/persistence/orm}basic" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="many-to-one" type="{http://java.sun.com/xml/ns/persistence/orm}many-to-one" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="one-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="one-to-one" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="many-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="element-collection" type="{http://java.sun.com/xml/ns/persistence/orm}element-collection" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="embedded" type="{http://java.sun.com/xml/ns/persistence/orm}embedded" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="transient" type="{http://java.sun.com/xml/ns/persistence/orm}transient" maxOccurs="unbounded" minOccurs="0"/>
  *       &lt;/sequence>
  *     &lt;/restriction>
@@ -48,11 +54,28 @@ import javax.xml.bind.annotation.XmlType
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "embeddable-attributes", propOrder = {
     "basic",
+    "manyToOne",
+    "oneToMany",
+    "oneToOne",
+    "manyToMany",
+    "elementCollection",
+    "embedded",
     "_transient"
 })
 public class EmbeddableAttributes {
 
     protected List<Basic> basic;
+    @XmlElement(name = "many-to-one")
+    protected List<ManyToOne> manyToOne;
+    @XmlElement(name = "one-to-many")
+    protected List<OneToMany> oneToMany;
+    @XmlElement(name = "one-to-one")
+    protected List<OneToOne> oneToOne;
+    @XmlElement(name = "many-to-many")
+    protected List<ManyToMany> manyToMany;
+    @XmlElement(name = "element-collection")
+    protected List<ElementCollection> elementCollection;
+    protected List<Embedded> embedded;
     @XmlElement(name = "transient")
     protected List<Transient> _transient;
 
@@ -86,6 +109,180 @@ public class EmbeddableAttributes {
     }
 
     /**
+     * Gets the value of the manyToOne property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the manyToOne property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getManyToOne().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ManyToOne }
+     *
+     *
+     */
+    public List<ManyToOne> getManyToOne() {
+        if (manyToOne == null) {
+            manyToOne = new ArrayList<ManyToOne>();
+        }
+        return this.manyToOne;
+    }
+
+    /**
+     * Gets the value of the oneToMany property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the oneToMany property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOneToMany().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OneToMany }
+     *
+     *
+     */
+    public List<OneToMany> getOneToMany() {
+        if (oneToMany == null) {
+            oneToMany = new ArrayList<OneToMany>();
+        }
+        return this.oneToMany;
+    }
+
+    /**
+     * Gets the value of the oneToOne property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the oneToOne property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOneToOne().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OneToOne }
+     *
+     *
+     */
+    public List<OneToOne> getOneToOne() {
+        if (oneToOne == null) {
+            oneToOne = new ArrayList<OneToOne>();
+        }
+        return this.oneToOne;
+    }
+
+    /**
+     * Gets the value of the manyToMany property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the manyToMany property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getManyToMany().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ManyToMany }
+     *
+     *
+     */
+    public List<ManyToMany> getManyToMany() {
+        if (manyToMany == null) {
+            manyToMany = new ArrayList<ManyToMany>();
+        }
+        return this.manyToMany;
+    }
+
+    /**
+     * Gets the value of the elementCollection property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the elementCollection property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getElementCollection().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ElementCollection }
+     *
+     *
+     */
+    public List<ElementCollection> getElementCollection() {
+        if (elementCollection == null) {
+            elementCollection = new ArrayList<ElementCollection>();
+        }
+        return this.elementCollection;
+    }
+
+    /**
+     * Gets the value of the embedded property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the embedded property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEmbedded().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Embedded }
+     *
+     *
+     */
+    public List<Embedded> getEmbedded() {
+        if (embedded == null) {
+            embedded = new ArrayList<Embedded>();
+        }
+        return this.embedded;
+    }
+
+    /**
      * Gets the value of the transient property.
      * 
      * <p>

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java Thu Dec 23 15:58:55 2010
@@ -44,8 +44,10 @@ import javax.xml.bind.annotation.XmlType
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
  *         &lt;element name="attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="association-override" type="{http://java.sun.com/xml/ns/persistence/orm}association-override" maxOccurs="unbounded" minOccurs="0"/>
  *       &lt;/sequence>
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -55,14 +57,19 @@ import javax.xml.bind.annotation.XmlType
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "embedded", propOrder = {
-    "attributeOverride"
+    "attributeOverride",
+    "associationOverride"
 })
 public class Embedded {
 
     @XmlElement(name = "attribute-override")
     protected List<AttributeOverride> attributeOverride;
+    @XmlElement(name = "association-override")
+    protected List<AssociationOverride> associationOverride;
     @XmlAttribute(required = true)
     protected String name;
+    @XmlAttribute
+    protected AccessType access;
 
     /**
      * Gets the value of the attributeOverride property.
@@ -94,6 +101,35 @@ public class Embedded {
     }
 
     /**
+     * Gets the value of the associationOverride property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the associationOverride property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAssociationOverride().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AssociationOverride }
+     *
+     *
+     */
+    public List<AssociationOverride> getAssociationOverride() {
+        if (associationOverride == null) {
+            associationOverride = new ArrayList<AssociationOverride>();
+        }
+        return this.associationOverride;
+    }
+
+    /**
      * Gets the value of the name property.
      * 
      * @return
@@ -117,4 +153,28 @@ public class Embedded {
         this.name = value;
     }
 
+    /**
+         * Gets the value of the access property.
+         *
+         * @return
+         *     possible object is
+         *     {@link AccessType }
+         *
+         */
+        public AccessType getAccess() {
+            return access;
+        }
+
+        /**
+         * Sets the value of the access property.
+         *
+         * @param value
+         *     allowed object is
+         *     {@link AccessType }
+         *
+         */
+        public void setAccess(AccessType value) {
+            this.access = value;
+        }
+
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java Thu Dec 23 15:58:55 2010
@@ -46,6 +46,7 @@ import javax.xml.bind.annotation.XmlType
  *         &lt;element name="attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
  *       &lt;/sequence>
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -63,6 +64,8 @@ public class EmbeddedId {
     protected List<AttributeOverride> attributeOverride;
     @XmlAttribute(required = true)
     protected String name;
+    @XmlAttribute
+    protected AccessType access;
 
     /**
      * Gets the value of the attributeOverride property.
@@ -117,4 +120,28 @@ public class EmbeddedId {
         this.name = value;
     }
 
+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java Thu Dec 23 15:58:55 2010
@@ -82,10 +82,11 @@ import javax.xml.bind.annotation.XmlTran
  *         &lt;element name="association-override" type="{http://java.sun.com/xml/ns/persistence/orm}association-override" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="attributes" type="{http://java.sun.com/xml/ns/persistence/orm}attributes" minOccurs="0"/>
  *       &lt;/sequence>
- *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
  *       &lt;attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *       &lt;attribute name="cacheable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
  *       &lt;attribute name="metadata-complete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -176,6 +177,8 @@ public class Entity implements Mapping, 
     protected AccessType access;
     @XmlAttribute(name = "class", required = true)
     protected String clazz;
+    @XmlAttribute
+    protected Boolean cacheable;
     @XmlAttribute(name = "metadata-complete")
     protected Boolean metadataComplete;
     @XmlAttribute
@@ -902,6 +905,30 @@ public class Entity implements Mapping, 
     }
 
     /**
+     * Gets the value of the cacheable property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *
+     */
+    public Boolean isCacheable() {
+        return cacheable;
+    }
+
+    /**
+     * Sets the value of the cacheable property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *
+     */
+    public void setCacheable(Boolean value) {
+        this.cacheable = value;
+    }
+
+    /**
      * Gets the value of the metadataComplete property.
      * 
      * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java Thu Dec 23 15:58:55 2010
@@ -41,6 +41,7 @@ import javax.xml.bind.annotation.XmlType
  *   &lt;complexContent>
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
+ *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
  *         &lt;element name="pre-persist" type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist" minOccurs="0"/>
  *         &lt;element name="post-persist" type="{http://java.sun.com/xml/ns/persistence/orm}post-persist" minOccurs="0"/>
  *         &lt;element name="pre-remove" type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove" minOccurs="0"/>
@@ -59,6 +60,7 @@ import javax.xml.bind.annotation.XmlType
  */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "entity-listener", propOrder = {
+    "description",
     "prePersist",
     "postPersist",
     "preRemove",
@@ -69,6 +71,7 @@ import javax.xml.bind.annotation.XmlType
 })
 public class EntityListener {
 
+    protected String description;
     @XmlElement(name = "pre-persist")
     protected PrePersist prePersist;
     @XmlElement(name = "post-persist")
@@ -87,6 +90,30 @@ public class EntityListener {
     protected String clazz;
 
     /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
      * Gets the value of the prePersist property.
      * 
      * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java Thu Dec 23 15:58:55 2010
@@ -35,7 +35,7 @@ import javax.xml.bind.annotation.adapter
 /**
  * 
  * 
- *         The entity-mappings element is the root element of an mapping
+ *         The entity-mappings element is the root element of a mapping
  *         file. It contains the following four types of elements:
  * 
  *         1. The persistence-unit-metadata element contains metadata
@@ -51,9 +51,9 @@ import javax.xml.bind.annotation.adapter
  *         to the persistence unit. It is undefined to have more than one
  *         sequence-generator or table-generator of the same name in the same
  *         or different mapping files in a persistence unit. It is also 
- *         undefined to have more than one named-query or named-native-query
- *         of the same name in the same or different mapping files in a 
- *         persistence unit.
+ *         undefined to have more than one named-query, named-native-query, or
+ *         result-set-mapping of the same name in the same or different mapping
+ *         files in a persistence unit.
  * 
  *         4. The entity, mapped-superclass and embeddable elements each define
  *         the mapping information for a managed persistent class. The mapping
@@ -86,7 +86,7 @@ import javax.xml.bind.annotation.adapter
  *         &lt;element name="entity" type="{http://java.sun.com/xml/ns/persistence/orm}entity" maxOccurs="unbounded" minOccurs="0"/>
  *         &lt;element name="embeddable" type="{http://java.sun.com/xml/ns/persistence/orm}embeddable" maxOccurs="unbounded" minOccurs="0"/>
  *       &lt;/sequence>
- *       &lt;attribute name="version" use="required" type="{http://java.sun.com/xml/ns/persistence/orm}versionType" fixed="1.0" />
+ *       &lt;attribute name="version" use="required" type="{http://java.sun.com/xml/ns/persistence/orm}versionType" fixed="2.0" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -138,7 +138,7 @@ public class EntityMappings {
     protected List<Embeddable> embeddable;
     @XmlAttribute(required = true)
     @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    protected String version = "1.0";
+    protected String version = "2.0";
 
     /**
      * Gets the value of the description property.
@@ -534,7 +534,7 @@ public class EntityMappings {
      */
     public String getVersion() {
         if (version == null) {
-            return "1.0";
+            return "2.0";
         } else {
             return version;
         }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "enum-type")
 @XmlEnum
 public enum EnumType {
 

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "fetch-type")
 @XmlEnum
 public enum FetchType {
 

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -37,6 +38,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "generation-type")
 @XmlEnum
 public enum GenerationType {
 

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java Thu Dec 23 15:58:55 2010
@@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
  *         &lt;element name="sequence-generator" type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator" minOccurs="0"/>
  *       &lt;/sequence>
  *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
  *     &lt;/restriction>
  *   &lt;/complexContent>
  * &lt;/complexType>
@@ -75,6 +76,8 @@ public class Id implements Field {
     protected SequenceGenerator sequenceGenerator;
     @XmlAttribute(required = true)
     protected String name;
+    @XmlAttribute
+    protected AccessType access;
 
     public Id() {
     }
@@ -235,4 +238,28 @@ public class Id implements Field {
     public Object getKey() {
         return name;
     }
+
+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;
 
 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
 
 
 /**
@@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
  * </pre>
  * 
  */
+@XmlType(name = "inheritance-type")
 @XmlEnum
 public enum InheritanceType {
 

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java Thu Dec 23 15:58:55 2010
@@ -0,0 +1,66 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for lock-mode-type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="lock-mode-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ *     &lt;enumeration value="READ"/>
+ *     &lt;enumeration value="WRITE"/>
+ *     &lt;enumeration value="OPTIMISTIC"/>
+ *     &lt;enumeration value="OPTIMISTIC_FORCE_INCREMENT"/>
+ *     &lt;enumeration value="PESSIMISTIC_READ"/>
+ *     &lt;enumeration value="PESSIMISTIC_WRITE"/>
+ *     &lt;enumeration value="PESSIMISTIC_FORCE_INCREMENT"/>
+ *     &lt;enumeration value="NONE"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "lock-mode-type")
+@XmlEnum
+public enum LockModeType {
+
+    READ,
+    WRITE,
+    OPTIMISTIC,
+    OPTIMISTIC_FORCE_INCREMENT,
+    PESSIMISTIC_READ,
+    PESSIMISTIC_WRITE,
+    PESSIMISTIC_FORCE_INCREMENT,
+    NONE;
+
+    public String value() {
+        return name();
+    }
+
+    public static LockModeType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}



Re: Fwd: svn commit: r1052305 [1/3] - in /openejb/trunk/openejb3/container/openejb-jee/src: main/java/org/apache/openejb/jee/jpa/ test/java/org/apache/openejb/jee/jpa/ test/resources/

Posted by Jonathan Gallimore <jo...@gmail.com>.
Taken an update and done a clean build here. Build worked absolutely 
fine for me.

Jon

On 23/12/2010 16:02, Jean-Louis MONTEIRO wrote:
> Hi,
>
> finally updated the JAXB tree to stick with XSD changes (orm.xml as
> well as persistence.xml).
> Everything still works in my computer (see after) but that'd be great
> if someone can confim ;-)
>
> Jean-Louis
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] OpenEJB ........................................... SUCCESS [1.140s]
> [INFO] OpenEJB :: Dependencies ........................... SUCCESS [0.110s]
> [INFO] OpenEJB :: Dependencies :: JavaEE API ............. SUCCESS [13.031s]
> [INFO] OpenEJB :: iTests ................................. SUCCESS [0.109s]
> [INFO] OpenEJB :: iTests Beans ........................... SUCCESS [4.516s]
> [INFO] OpenEJB :: iTests Servlets ........................ SUCCESS [1.266s]
> [INFO] OpenEJB :: iTests Client .......................... SUCCESS [5.828s]
> [INFO] OpenEJB :: iTests Interceptor Beans ............... SUCCESS [1.078s]
> [INFO] OpenEJB :: iTests App ............................. SUCCESS [3.140s]
> [INFO] OpenEJB :: iTests Web ............................. SUCCESS [1.125s]
> [INFO] OpenEJB :: Container .............................. SUCCESS [0.110s]
> [INFO] OpenEJB :: Container :: API ....................... SUCCESS [0.969s]
> [INFO] OpenEJB :: Container :: Loader .................... SUCCESS [2.343s]
> [INFO] OpenEJB :: Container :: Java Agent ................ SUCCESS [1.578s]
> [INFO] OpenEJB :: Container :: Java EE ................... SUCCESS [35.626s]
> [INFO] OpenEJB :: Container :: Core ...................... SUCCESS [8:42.609s]
> [INFO] OpenEJB :: Container :: Spring .................... SUCCESS [12.844s]
> [INFO] OpenEJB :: Container :: OSGi :: Core .............. SUCCESS [4.078s]
> [INFO] OpenEJB :: Container :: OSGi ...................... SUCCESS [6.547s]
> [INFO] OpenEJB :: Container :: ActiveMQ4 ................. SUCCESS [1:22.453s]
> [INFO] OpenEJB :: Container :: JUnit ..................... SUCCESS [17.093s]
> [INFO] OpenEJB :: Server ................................. SUCCESS [0.203s]
> [INFO] OpenEJB :: Server :: Client ....................... SUCCESS [13.203s]
> [INFO] OpenEJB :: Server :: Core ......................... SUCCESS [7.094s]
> [INFO] OpenEJB :: Server :: Multicast Discovery .......... SUCCESS [28.516s]
> [INFO] OpenEJB :: Server :: EJBd ......................... SUCCESS [1:02.952s]
> [INFO] OpenEJB :: Server :: Admin ........................ SUCCESS [1.750s]
> [INFO] OpenEJB :: Server :: Http ......................... SUCCESS [34.484s]
> [INFO] OpenEJB :: Server :: WebAdmin ..................... SUCCESS [7.188s]
> [INFO] OpenEJB :: Server :: Telnet ....................... SUCCESS [4.203s]
> [INFO] OpenEJB :: Server :: ActiveMQ ..................... SUCCESS [3.531s]
> [INFO] OpenEJB :: Server :: CORBA ........................ SUCCESS [1.406s]
> [INFO] OpenEJB :: Server :: Derby Network Service ........ SUCCESS [3.422s]
> [INFO] OpenEJB :: Server :: Hsql ......................... SUCCESS [3.657s]
> [INFO] OpenEJB :: Server :: Webservices .................. SUCCESS [9.781s]
> [INFO] OpenEJB :: Server :: Axis ......................... SUCCESS [16.172s]
> [INFO] OpenEJB :: Server :: Axis2 ........................ SUCCESS [36.484s]
> [INFO] OpenEJB :: Server :: CXF .......................... SUCCESS [34.828s]
> [INFO] OpenEJB :: Server :: Daemon ....................... SUCCESS [3.000s]
> [INFO] OpenEJB :: Examples :: @ApplicationException inheritance
> SUCCESS [7.859s]
> [INFO] OpenEJB :: Examples :: Simple Stateful Pojo ....... SUCCESS [7.265s]
> [INFO] OpenEJB :: Examples :: Simple Stateless Pojo ...... SUCCESS [5.172s]
> [INFO] OpenEJB :: Examples :: Simple Stateless With Deployment
> Descriptor  SUCCESS [5.578s]
> [INFO] OpenEJB :: Examples :: Simple Singleton ........... SUCCESS [4.422s]
> [INFO] OpenEJB :: Examples :: Simple MDB Example ......... SUCCESS [6.360s]
> [INFO] OpenEJB :: Examples :: Simple MDB Using Deployment Descriptor
> Example  SUCCESS [7.859s]
> [INFO] OpenEJB :: Examples :: Simple CMP2 Entity ......... SUCCESS [9.906s]
> [INFO] OpenEJB :: Examples :: Simple Webservice .......... SUCCESS [11.906s]
> [INFO] OpenEJB :: Examples :: EJB 2.1 Component Interfaces  SUCCESS [5.453s]
> [INFO] OpenEJB :: Examples :: @EJB Injection ............. SUCCESS [5.125s]
> [INFO] OpenEJB :: Examples :: @Resource env-entry Injection  SUCCESS [8.344s]
> [INFO] OpenEJB :: Examples :: @Resource DataSource Injection  SUCCESS [4.719s]
> [INFO] OpenEJB :: Examples :: @PersistenceContext EntityManager
> Injection  SUCCESS [6.797s]
> [INFO] OpenEJB :: Examples :: @Resource javax.jms.ConnectionFactory
> SUCCESS [6.031s]
> [INFO] OpenEJB :: Examples :: Testing Transactions ....... SUCCESS [7.250s]
> [INFO] OpenEJB :: Examples :: Testing Security ........... SUCCESS [7.172s]
> [INFO] OpenEJB :: Examples :: Testing Security ........... SUCCESS [6.828s]
> [INFO] OpenEJB :: Examples :: TestCase Injection ......... SUCCESS [7.421s]
> [INFO] OpenEJB :: Examples :: Alternate Descriptors ...... SUCCESS [7.750s]
> [INFO] OpenEJB :: Examples :: Ear Testing ................ SUCCESS [0.110s]
> [INFO] OpenEJB :: Examples :: Ear Testing :: Business Model  SUCCESS [1.140s]
> [INFO] OpenEJB :: Examples :: Ear Testing :: Business Logic  SUCCESS [7.000s]
> [INFO] OpenEJB :: Examples :: Interceptors ............... SUCCESS [8.282s]
> [INFO] OpenEJB :: Examples :: Expanded support for Env Entries  SUCCESS [6.625s]
> [INFO] OpenEJB :: Examples :: Hello World - Weblogic ..... SUCCESS [9.046s]
> [INFO] OpenEJB :: Examples :: JPA with Hibernate ......... SUCCESS [17.719s]
> [INFO] OpenEJB :: Examples :: JPA with EclipseLink ....... SUCCESS [8.500s]
> [INFO] OpenEJB :: Examples :: Spring Integration ......... SUCCESS [13.984s]
> [INFO] OpenEJB :: Examples :: Telephone Stateful Pojo .... SUCCESS [6.156s]
> [INFO] OpenEJB :: Examples :: Quartz Application ......... SUCCESS [0.172s]
> [INFO] Quartz Resource Adapter ........................... SUCCESS [0.813s]
> [INFO] Quartz Beans ...................................... SUCCESS [8.390s]
> [INFO] OpenEJB :: Examples :: Webservice Attachments ..... SUCCESS [11.110s]
> [INFO] OpenEJB :: Web Examples :: EJB Examples War ....... SUCCESS [6.750s]
> [INFO] OpenEJB :: Web Examples :: EJB WebService ......... SUCCESS [1.578s]
> [INFO] OpenEJB :: Web Examples :: JSF with MyFaces ....... SUCCESS [7.375s]
> [INFO] OpenEJB :: Web Examples :: Struts ................. SUCCESS [4.843s]
> [INFO] OpenEJB :: Web Examples :: EJB WebService ......... SUCCESS [10.391s]
> [INFO] OpenEJB :: Web Examples ........................... SUCCESS [0.234s]
> [INFO] OpenEJB :: Web Examples :: EJB WebService with Security
> SUCCESS [10.453s]
> [INFO] OpenEJB :: Web Examples :: EJB WebService with WS-Security
> SUCCESS [21.391s]
> [INFO] OpenEJB :: Examples :: Webservice Inheritance ..... SUCCESS [12.640s]
> [INFO] OpenEJB :: Examples :: Transaction Rollback ....... SUCCESS [11.719s]
> [INFO] OpenEJB :: Examples :: Troubleshooting ............ SUCCESS [8.672s]
> [INFO] OpenEJB :: Examples ............................... SUCCESS [0.391s]
> [INFO] OpenEJB :: Assembly ............................... SUCCESS [0.359s]
> [INFO] OpenEJB :: Assembly :: WebApp :: Common ........... SUCCESS [10.172s]
> [INFO] OpenEJB :: Assembly :: iTests Standalone Client ... SUCCESS [10.875s]
> [INFO] OpenEJB :: Assembly :: Tomcat ..................... SUCCESS [0.437s]
> [INFO] OpenEJB :: Assembly :: Tomcat :: Loader ........... SUCCESS [3.063s]
> [INFO] OpenEJB :: Assembly :: Tomcat :: Common ........... SUCCESS [8.781s]
> [INFO] OpenEJB :: Assembly :: Tomcat :: Catalina ......... SUCCESS [10.140s]
> [INFO] OpenEJB :: Assembly :: Tomcat :: Webapp ........... SUCCESS [1:11.453s]
> [INFO] OpenEJB :: Assembly :: Tomcat :: Bundle ........... SUCCESS [7:22.081s]
> [INFO] OpenEJB :: Assembly :: Jetty ...................... SUCCESS [1.438s]
> [INFO] OpenEJB :: Assembly :: Jetty :: Loader ............ SUCCESS [6.547s]
> [INFO] OpenEJB :: Assembly :: Jetty :: Common ............ SUCCESS [4:58.063s]
> [INFO] OpenEJB :: Assembly :: Jetty :: Webapp ............ SUCCESS [1:51.063s]
> [INFO] OpenEJB :: Assembly :: Webapp ..................... SUCCESS [50.874s]
> [INFO] OpenEJB :: Assembly :: Java EE API Libraries ...... SUCCESS [20.219s]
> [INFO] OpenEJB :: Assembly :: Standalone ................. SUCCESS [59.375s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 40:30.655s
> [INFO] Finished at: Thu Dec 23 16:46:22 CET 2010
> [INFO] Final Memory: 117M/989M
> [INFO] ------------------------------------------------------------------------
>
>
> ---------- Forwarded message ----------
> From:<jl...@apache.org>
> Date: 2010/12/23
> Subject: svn commit: r1052305 [1/3] - in
> /openejb/trunk/openejb3/container/openejb-jee/src:
> main/java/org/apache/openejb/jee/jpa/
> test/java/org/apache/openejb/jee/jpa/ test/resources/
> To: commits@openejb.apache.org
>
>
> Author: jlmonteiro
> Date: Thu Dec 23 15:58:55 2010
> New Revision: 1052305
>
> URL: http://svn.apache.org/viewvc?rev=1052305&view=rev
> Log:
> OPENEJB-1236 Provide JPA 2.0 support in addition to JPA 1.0
> JaxB tree updated for orm.xml and persistence.xml files.
> Also added some tests
>
> Added:
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyClass.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyColumn.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyJoinColumn.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OrderColumn.java
>     openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml
>     openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml
> Modified:
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToOne.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitDefaults.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitMetadata.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java
>     openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java
>     openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java
>     openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java
>     openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml
>     openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "access-type")
>   @XmlEnum
>   public enum AccessType {
>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
> Thu Dec 23 15:58:55 2010
> @@ -32,7 +32,8 @@ import javax.xml.bind.annotation.XmlType
>   *         @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
>   *         public @interface AssociationOverride {
>   *           String name();
> - *           JoinColumn[] joinColumns();
> + *           JoinColumn[] joinColumns() default{};
> + *           JoinTable joinTable() default @JoinTable;
>   *         }
>   *
>   *
> @@ -46,7 +47,11 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;complexContent>
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
> - *&lt;element name="join-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
> maxOccurs="unbounded"/>
> + *&lt;element name="description"
> type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
> + *&lt;choice>
> + *&lt;element name="join-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="join-table"
> type="{http://java.sun.com/xml/ns/persistence/orm}join-table"
> minOccurs="0"/>
> + *&lt;/choice>
>   *&lt;/sequence>
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
>   *&lt;/restriction>
> @@ -58,16 +63,45 @@ import javax.xml.bind.annotation.XmlType
>   */
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "association-override", propOrder = {
> -    "joinColumn"
> +    "description",
> +    "joinColumn",
> +    "joinTable"
>   })
>   public class AssociationOverride {
>
> -    @XmlElement(name = "join-column", required = true)
> +    protected String description;
> +    @XmlElement(name = "join-column")
>      protected List<JoinColumn>  joinColumn;
> +    @XmlElement(name = "join-table")
> +    protected JoinTable joinTable;
>      @XmlAttribute(required = true)
>      protected String name;
>
>      /**
> +     * Gets the value of the description property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getDescription() {
> +        return description;
> +    }
> +
> +    /**
> +     * Sets the value of the description property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setDescription(String value) {
> +        this.description = value;
> +    }
> +
> +    /**
>       * Gets the value of the joinColumn property.
>       *
>       *<p>
> @@ -97,6 +131,30 @@ public class AssociationOverride {
>      }
>
>      /**
> +     * Gets the value of the joinTable property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link JoinTable }
> +     *
> +     */
> +    public JoinTable getJoinTable() {
> +        return joinTable;
> +    }
> +
> +    /**
> +     * Sets the value of the joinTable property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link JoinTable }
> +     *
> +     */
> +    public void setJoinTable(JoinTable value) {
> +        this.joinTable = value;
> +    }
> +
> +    /**
>       * Gets the value of the name property.
>       *
>       * @return
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
> Thu Dec 23 15:58:55 2010
> @@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;complexContent>
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
> + *&lt;element name="description"
> type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
>   *&lt;element name="column"
> type="{http://java.sun.com/xml/ns/persistence/orm}column"/>
>   *&lt;/sequence>
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> @@ -56,10 +57,12 @@ import javax.xml.bind.annotation.XmlType
>   */
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "attribute-override", propOrder = {
> +    "description",
>      "column"
>   })
>   public class AttributeOverride implements Field {
>
> +    protected String description;
>      @XmlElement(required = true)
>      protected Column column;
>      @XmlAttribute(required = true)
> @@ -80,6 +83,30 @@ public class AttributeOverride implement
>      }
>
>      /**
> +     * Gets the value of the description property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getDescription() {
> +        return description;
> +    }
> +
> +    /**
> +     * Sets the value of the description property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setDescription(String value) {
> +        this.description = value;
> +    }
> +
> +    /**
>       * Gets the value of the column property.
>       *
>       * @return
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
> Thu Dec 23 15:58:55 2010
> @@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;complexContent>
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
> + *&lt;element name="description"
> type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
>   *&lt;choice>
>   *&lt;element name="id"
> type="{http://java.sun.com/xml/ns/persistence/orm}id"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="embedded-id"
> type="{http://java.sun.com/xml/ns/persistence/orm}embedded-id"
> minOccurs="0"/>
> @@ -58,6 +59,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;element name="one-to-many"
> type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="one-to-one"
> type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="many-to-many"
> type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="element-collection"
> type="{http://java.sun.com/xml/ns/persistence/orm}element-collection"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="embedded"
> type="{http://java.sun.com/xml/ns/persistence/orm}embedded"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="transient"
> type="{http://java.sun.com/xml/ns/persistence/orm}transient"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;/sequence>
> @@ -70,6 +72,7 @@ import javax.xml.bind.annotation.XmlType
>   */
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "attributes", propOrder = {
> +    "description",
>      "id",
>      "embeddedId",
>      "basic",
> @@ -78,11 +81,13 @@ import javax.xml.bind.annotation.XmlType
>      "oneToMany",
>      "oneToOne",
>      "manyToMany",
> +    "elementCollection",
>      "embedded",
>      "_transient"
>   })
>   public class Attributes {
>
> +    protected String description;
>      protected List<Id>  id;
>      @XmlElement(name = "embedded-id")
>      protected EmbeddedId embeddedId;
> @@ -96,11 +101,37 @@ public class Attributes {
>      protected List<OneToOne>  oneToOne;
>      @XmlElement(name = "many-to-many")
>      protected List<ManyToMany>  manyToMany;
> +    @XmlElement(name = "element-collection")
> +    protected List<ElementCollection>  elementCollection;
>      protected List<Embedded>  embedded;
>      @XmlElement(name = "transient")
>      protected List<Transient>  _transient;
>
>      /**
> +     * Gets the value of the description property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getDescription() {
> +        return description;
> +    }
> +
> +    /**
> +     * Sets the value of the description property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setDescription(String value) {
> +        this.description = value;
> +    }
> +
> +    /**
>       * Gets the value of the id property.
>       *
>       *<p>
> @@ -337,6 +368,35 @@ public class Attributes {
>      }
>
>      /**
> +     * Gets the value of the elementCollection property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> elementCollection property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getElementCollection().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link ElementCollection }
> +     *
> +     *
> +     */
> +    public List<ElementCollection>  getElementCollection() {
> +        if (elementCollection == null) {
> +            elementCollection = new ArrayList<ElementCollection>();
> +        }
> +        return this.elementCollection;
> +    }
> +
> +    /**
>       * Gets the value of the embedded property.
>       *
>       *<p>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
> Thu Dec 23 15:58:55 2010
> @@ -50,9 +50,10 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;element name="enumerated"
> type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
> minOccurs="0"/>
>   *&lt;/choice>
>   *&lt;/sequence>
> - *&lt;attribute name="fetch"
> type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="fetch"
> type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
>   *&lt;attribute name="optional"
> type="{http://www.w3.org/2001/XMLSchema}boolean" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -73,12 +74,14 @@ public class Basic implements Field {
>      protected Lob lob;
>      protected TemporalType temporal;
>      protected EnumType enumerated;
> -    @XmlAttribute
> -    protected FetchType fetch;
>      @XmlAttribute(required = true)
>      protected String name;
>      @XmlAttribute
> +    protected FetchType fetch;
> +    @XmlAttribute
>      protected Boolean optional;
> +    @XmlAttribute
> +    protected AccessType access;
>
>      public Basic() {
>      }
> @@ -189,51 +192,51 @@ public class Basic implements Field {
>      }
>
>      /**
> -     * Gets the value of the fetch property.
> -     *
> +     * Gets the value of the name property.
> +     *
>       * @return
>       *     possible object is
> -     *     {@link FetchType }
> -     *
> +     *     {@link String }
> +     *
>       */
> -    public FetchType getFetch() {
> -        return fetch;
> +    public String getName() {
> +        return name;
>      }
>
>      /**
> -     * Sets the value of the fetch property.
> -     *
> +     * Sets the value of the name property.
> +     *
>       * @param value
>       *     allowed object is
> -     *     {@link FetchType }
> -     *
> +     *     {@link String }
> +     *
>       */
> -    public void setFetch(FetchType value) {
> -        this.fetch = value;
> +    public void setName(String value) {
> +        this.name = value;
>      }
>
>      /**
> -     * Gets the value of the name property.
> -     *
> +     * Gets the value of the fetch property.
> +     *
>       * @return
>       *     possible object is
> -     *     {@link String }
> -     *
> +     *     {@link FetchType }
> +     *
>       */
> -    public String getName() {
> -        return name;
> +    public FetchType getFetch() {
> +        return fetch;
>      }
>
>      /**
> -     * Sets the value of the name property.
> -     *
> +     * Sets the value of the fetch property.
> +     *
>       * @param value
>       *     allowed object is
> -     *     {@link String }
> -     *
> +     *     {@link FetchType }
> +     *
>       */
> -    public void setName(String value) {
> -        this.name = value;
> +    public void setFetch(FetchType value) {
> +        this.fetch = value;
>      }
>
>      /**
> @@ -260,6 +263,30 @@ public class Basic implements Field {
>          this.optional = value;
>      }
>
> +    /**
> +     * Gets the value of the access property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public AccessType getAccess() {
> +        return access;
> +    }
> +
> +    /**
> +     * Sets the value of the access property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public void setAccess(AccessType value) {
> +        this.access = value;
> +    }
> +
>      public Object getKey() {
>          return name;
>      }
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
> Thu Dec 23 15:58:55 2010
> @@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType
>   /**
>   *
>   *
> - *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};
> + *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE,
> REFRESH, DETACH};
>   *
>   *
>   *
> @@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;element name="cascade-merge"
> type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
> minOccurs="0"/>
>   *&lt;element name="cascade-remove"
> type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
> minOccurs="0"/>
>   *&lt;element name="cascade-refresh"
> type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
> minOccurs="0"/>
> + *&lt;element name="cascade-detach"
> type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
> minOccurs="0"/>
>   *&lt;/sequence>
>   *&lt;/restriction>
>   *&lt;/complexContent>
> @@ -58,7 +59,8 @@ import javax.xml.bind.annotation.XmlType
>      "cascadePersist",
>      "cascadeMerge",
>      "cascadeRemove",
> -    "cascadeRefresh"
> +    "cascadeRefresh",
> +    "cascadeDetach"
>   })
>   public class CascadeType {
>
> @@ -72,6 +74,8 @@ public class CascadeType {
>      protected EmptyType cascadeRemove;
>      @XmlElement(name = "cascade-refresh")
>      protected EmptyType cascadeRefresh;
> +    @XmlElement(name = "cascade-detach")
> +    protected EmptyType cascadeDetach;
>
>      /**
>       * Gets the value of the cascadeAll property.
> @@ -193,4 +197,27 @@ public class CascadeType {
>          this.cascadeRefresh = value ? new EmptyType() : null;
>      }
>
> +    /**
> +     * Gets the value of the cascadeDetach property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link boolean }
> +     *
> +     */
> +    public boolean isCascadeDetach() {
> +        return cascadeDetach != null;
> +    }
> +
> +    /**
> +     * Sets the value of the cascadeDetach property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link boolean }
> +     *
> +     */
> +    public void setCascadeDetach(boolean value) {
> +        this.cascadeDetach = value ? new EmptyType() : null;
> +    }
>   }
>
> Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java?rev=1052305&view=auto
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
> (added)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
> Thu Dec 23 15:58:55 2010
> @@ -0,0 +1,213 @@
> +/**
> + * 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.
> + */
> +
> +package org.apache.openejb.jee.jpa;
> +
> +import java.util.ArrayList;
> +import java.util.List;
> +import javax.xml.bind.annotation.XmlAccessType;
> +import javax.xml.bind.annotation.XmlAccessorType;
> +import javax.xml.bind.annotation.XmlAttribute;
> +import javax.xml.bind.annotation.XmlElement;
> +import javax.xml.bind.annotation.XmlType;
> +
> +
> +/**
> + *
> + *
> + *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
> + *         public @interface CollectionTable {
> + *           String name() default "";
> + *           String catalog() default "";
> + *           String schema() default "";
> + *           JoinColumn[] joinColumns() default {};
> + *           UniqueConstraint[] uniqueConstraints() default {};
> + *         }
> + *
> + *
> + *
> + *<p>Java class for collection-table complex type.
> + *
> + *<p>The following schema fragment specifies the expected content
> contained within this class.
> + *
> + *<pre>
> + *&lt;complexType name="collection-table">
> + *&lt;complexContent>
> + *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
> + *&lt;sequence>
> + *&lt;element name="join-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="unique-constraint"
> type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;/sequence>
> + *&lt;attribute name="name"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="catalog"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="schema"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;/restriction>
> + *&lt;/complexContent>
> + *&lt;/complexType>
> + *</pre>
> + *
> + *
> + */
> +@XmlAccessorType(XmlAccessType.FIELD)
> +@XmlType(name = "collection-table", propOrder = {
> +    "joinColumn",
> +    "uniqueConstraint"
> +})
> +public class CollectionTable {
> +
> +    @XmlElement(name = "join-column")
> +    protected List<JoinColumn>  joinColumn;
> +    @XmlElement(name = "unique-constraint")
> +    protected List<UniqueConstraint>  uniqueConstraint;
> +    @XmlAttribute
> +    protected String name;
> +    @XmlAttribute
> +    protected String catalog;
> +    @XmlAttribute
> +    protected String schema;
> +
> +    /**
> +     * Gets the value of the joinColumn property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> joinColumn property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getJoinColumn().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link org.apache.openejb.jee.jpa.JoinColumn }
> +     *
> +     *
> +     */
> +    public List<JoinColumn>  getJoinColumn() {
> +        if (joinColumn == null) {
> +            joinColumn = new ArrayList<JoinColumn>();
> +        }
> +        return this.joinColumn;
> +    }
> +
> +    /**
> +     * Gets the value of the uniqueConstraint property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> uniqueConstraint property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getUniqueConstraint().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link org.apache.openejb.jee.jpa.UniqueConstraint }
> +     *
> +     *
> +     */
> +    public List<UniqueConstraint>  getUniqueConstraint() {
> +        if (uniqueConstraint == null) {
> +            uniqueConstraint = new ArrayList<UniqueConstraint>();
> +        }
> +        return this.uniqueConstraint;
> +    }
> +
> +    /**
> +     * Gets the value of the name property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getName() {
> +        return name;
> +    }
> +
> +    /**
> +     * Sets the value of the name property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setName(String value) {
> +        this.name = value;
> +    }
> +
> +    /**
> +     * Gets the value of the catalog property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getCatalog() {
> +        return catalog;
> +    }
> +
> +    /**
> +     * Sets the value of the catalog property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setCatalog(String value) {
> +        this.catalog = value;
> +    }
> +
> +    /**
> +     * Gets the value of the schema property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getSchema() {
> +        return schema;
> +    }
> +
> +    /**
> +     * Sets the value of the schema property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setSchema(String value) {
> +        this.schema = value;
> +    }
> +
> +}
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "discriminator-type")
>   @XmlEnum
>   public enum DiscriminatorType {
>
>
> Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java?rev=1052305&view=auto
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
> (added)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
> Thu Dec 23 15:58:55 2010
> @@ -0,0 +1,653 @@
> +/**
> + * 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.
> + */
> +
> +package org.apache.openejb.jee.jpa;
> +
> +import java.util.ArrayList;
> +import java.util.List;
> +import javax.xml.bind.annotation.XmlAccessType;
> +import javax.xml.bind.annotation.XmlAccessorType;
> +import javax.xml.bind.annotation.XmlAttribute;
> +import javax.xml.bind.annotation.XmlElement;
> +import javax.xml.bind.annotation.XmlType;
> +
> +
> +/**
> + *
> + *
> + *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
> + *         public @interface ElementCollection {
> + *           Class targetClass() default void.class;
> + *           FetchType fetch() default LAZY;
> + *         }
> + *
> + *
> + *
> + *<p>Java class for element-collection complex type.
> + *
> + *<p>The following schema fragment specifies the expected content
> contained within this class.
> + *
> + *<pre>
> + *&lt;complexType name="element-collection">
> + *&lt;complexContent>
> + *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
> + *&lt;sequence>
> + *&lt;choice>
> + *&lt;element name="order-by"
> type="{http://java.sun.com/xml/ns/persistence/orm}order-by"
> minOccurs="0"/>
> + *&lt;element name="order-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}order-column"
> minOccurs="0"/>
> + *&lt;/choice>
> + *&lt;choice>
> + *&lt;element name="map-key"
> type="{http://java.sun.com/xml/ns/persistence/orm}map-key"
> minOccurs="0"/>
> + *&lt;sequence>
> + *&lt;element name="map-key-class"
> type="{http://java.sun.com/xml/ns/persistence/orm}map-key-class"
> minOccurs="0"/>
> + *&lt;choice>
> + *&lt;element name="map-key-temporal"
> type="{http://java.sun.com/xml/ns/persistence/orm}temporal"
> minOccurs="0"/>
> + *&lt;element name="map-key-enumerated"
> type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
> minOccurs="0"/>
> + *&lt;element name="map-key-attribute-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;/choice>
> + *&lt;choice>
> + *&lt;element name="map-key-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}map-key-column"
> minOccurs="0"/>
> + *&lt;element name="map-key-join-column"
> type="{http://java.sun.com/xml/ns/persistence/orm}map-key-join-column"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;/choice>
> + *&lt;/sequence>
> + *&lt;/choice>
> + *&lt;choice>
> + *&lt;sequence>
> + *&lt;element name="column"
> type="{http://java.sun.com/xml/ns/persistence/orm}column"
> minOccurs="0"/>
> + *&lt;choice>
> + *&lt;element name="temporal"
> type="{http://java.sun.com/xml/ns/persistence/orm}temporal"
> minOccurs="0"/>
> + *&lt;element name="enumerated"
> type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
> minOccurs="0"/>
> + *&lt;element name="lob"
> type="{http://java.sun.com/xml/ns/persistence/orm}lob" minOccurs="0"/>
> + *&lt;/choice>
> + *&lt;/sequence>
> + *&lt;sequence>
> + *&lt;element name="attribute-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="association-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;/sequence>
> + *&lt;/choice>
> + *&lt;element name="collection-table"
> type="{http://java.sun.com/xml/ns/persistence/orm}collection-table"
> minOccurs="0"/>
> + *&lt;/sequence>
> + *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="target-class"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="fetch"
> type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
> + *&lt;/restriction>
> + *&lt;/complexContent>
> + *&lt;/complexType>
> + *</pre>
> + *
> + *
> + */
> +@XmlAccessorType(XmlAccessType.FIELD)
> +@XmlType(name = "element-collection", propOrder = {
> +    "orderBy",
> +    "orderColumn",
> +    "mapKey",
> +    "mapKeyClass",
> +    "mapKeyTemporal",
> +    "mapKeyEnumerated",
> +    "mapKeyAttributeOverride",
> +    "mapKeyColumn",
> +    "mapKeyJoinColumn",
> +    "column",
> +    "temporal",
> +    "enumerated",
> +    "lob",
> +    "attributeOverride",
> +    "associationOverride",
> +    "collectionTable"
> +})
> +public class ElementCollection {
> +
> +    @XmlElement(name = "order-by")
> +    protected String orderBy;
> +    @XmlElement(name = "order-column")
> +    protected OrderColumn orderColumn;
> +    @XmlElement(name = "map-key")
> +    protected MapKey mapKey;
> +    @XmlElement(name = "map-key-class")
> +    protected MapKeyClass mapKeyClass;
> +    @XmlElement(name = "map-key-temporal")
> +    protected TemporalType mapKeyTemporal;
> +    @XmlElement(name = "map-key-enumerated")
> +    protected EnumType mapKeyEnumerated;
> +    @XmlElement(name = "map-key-attribute-override")
> +    protected List<AttributeOverride>  mapKeyAttributeOverride;
> +    @XmlElement(name = "map-key-column")
> +    protected MapKeyColumn mapKeyColumn;
> +    @XmlElement(name = "map-key-join-column")
> +    protected List<MapKeyJoinColumn>  mapKeyJoinColumn;
> +    protected Column column;
> +    protected TemporalType temporal;
> +    protected EnumType enumerated;
> +    protected Lob lob;
> +    @XmlElement(name = "attribute-override")
> +    protected List<AttributeOverride>  attributeOverride;
> +    @XmlElement(name = "association-override")
> +    protected List<AssociationOverride>  associationOverride;
> +    @XmlElement(name = "collection-table")
> +    protected CollectionTable collectionTable;
> +    @XmlAttribute(required = true)
> +    protected String name;
> +    @XmlAttribute(name = "target-class")
> +    protected String targetClass;
> +    @XmlAttribute
> +    protected FetchType fetch;
> +    @XmlAttribute
> +    protected AccessType access;
> +
> +    /**
> +     * Gets the value of the orderBy property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getOrderBy() {
> +        return orderBy;
> +    }
> +
> +    /**
> +     * Sets the value of the orderBy property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setOrderBy(String value) {
> +        this.orderBy = value;
> +    }
> +
> +    /**
> +     * Gets the value of the orderColumn property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link OrderColumn }
> +     *
> +     */
> +    public OrderColumn getOrderColumn() {
> +        return orderColumn;
> +    }
> +
> +    /**
> +     * Sets the value of the orderColumn property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link OrderColumn }
> +     *
> +     */
> +    public void setOrderColumn(OrderColumn value) {
> +        this.orderColumn = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKey property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.MapKey }
> +     *
> +     */
> +    public MapKey getMapKey() {
> +        return mapKey;
> +    }
> +
> +    /**
> +     * Sets the value of the mapKey property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.MapKey }
> +     *
> +     */
> +    public void setMapKey(MapKey value) {
> +        this.mapKey = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyClass property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link MapKeyClass }
> +     *
> +     */
> +    public MapKeyClass getMapKeyClass() {
> +        return mapKeyClass;
> +    }
> +
> +    /**
> +     * Sets the value of the mapKeyClass property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link MapKeyClass }
> +     *
> +     */
> +    public void setMapKeyClass(MapKeyClass value) {
> +        this.mapKeyClass = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyTemporal property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.TemporalType }
> +     *
> +     */
> +    public TemporalType getMapKeyTemporal() {
> +        return mapKeyTemporal;
> +    }
> +
> +    /**
> +     * Sets the value of the mapKeyTemporal property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.TemporalType }
> +     *
> +     */
> +    public void setMapKeyTemporal(TemporalType value) {
> +        this.mapKeyTemporal = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyEnumerated property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.EnumType }
> +     *
> +     */
> +    public EnumType getMapKeyEnumerated() {
> +        return mapKeyEnumerated;
> +    }
> +
> +    /**
> +     * Sets the value of the mapKeyEnumerated property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.EnumType }
> +     *
> +     */
> +    public void setMapKeyEnumerated(EnumType value) {
> +        this.mapKeyEnumerated = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyAttributeOverride property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> mapKeyAttributeOverride property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getMapKeyAttributeOverride().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
> +     *
> +     *
> +     */
> +    public List<AttributeOverride>  getMapKeyAttributeOverride() {
> +        if (mapKeyAttributeOverride == null) {
> +            mapKeyAttributeOverride = new ArrayList<AttributeOverride>();
> +        }
> +        return this.mapKeyAttributeOverride;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyColumn property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link MapKeyColumn }
> +     *
> +     */
> +    public MapKeyColumn getMapKeyColumn() {
> +        return mapKeyColumn;
> +    }
> +
> +    /**
> +     * Sets the value of the mapKeyColumn property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link MapKeyColumn }
> +     *
> +     */
> +    public void setMapKeyColumn(MapKeyColumn value) {
> +        this.mapKeyColumn = value;
> +    }
> +
> +    /**
> +     * Gets the value of the mapKeyJoinColumn property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> mapKeyJoinColumn property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getMapKeyJoinColumn().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link MapKeyJoinColumn }
> +     *
> +     *
> +     */
> +    public List<MapKeyJoinColumn>  getMapKeyJoinColumn() {
> +        if (mapKeyJoinColumn == null) {
> +            mapKeyJoinColumn = new ArrayList<MapKeyJoinColumn>();
> +        }
> +        return this.mapKeyJoinColumn;
> +    }
> +
> +    /**
> +     * Gets the value of the column property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.Column }
> +     *
> +     */
> +    public Column getColumn() {
> +        return column;
> +    }
> +
> +    /**
> +     * Sets the value of the column property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.Column }
> +     *
> +     */
> +    public void setColumn(Column value) {
> +        this.column = value;
> +    }
> +
> +    /**
> +     * Gets the value of the temporal property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.TemporalType }
> +     *
> +     */
> +    public TemporalType getTemporal() {
> +        return temporal;
> +    }
> +
> +    /**
> +     * Sets the value of the temporal property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.TemporalType }
> +     *
> +     */
> +    public void setTemporal(TemporalType value) {
> +        this.temporal = value;
> +    }
> +
> +    /**
> +     * Gets the value of the enumerated property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.EnumType }
> +     *
> +     */
> +    public EnumType getEnumerated() {
> +        return enumerated;
> +    }
> +
> +    /**
> +     * Sets the value of the enumerated property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.EnumType }
> +     *
> +     */
> +    public void setEnumerated(EnumType value) {
> +        this.enumerated = value;
> +    }
> +
> +    /**
> +     * Gets the value of the lob property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.Lob }
> +     *
> +     */
> +    public Lob getLob() {
> +        return lob;
> +    }
> +
> +    /**
> +     * Sets the value of the lob property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.Lob }
> +     *
> +     */
> +    public void setLob(Lob value) {
> +        this.lob = value;
> +    }
> +
> +    /**
> +     * Gets the value of the attributeOverride property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> attributeOverride property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getAttributeOverride().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
> +     *
> +     *
> +     */
> +    public List<AttributeOverride>  getAttributeOverride() {
> +        if (attributeOverride == null) {
> +            attributeOverride = new ArrayList<AttributeOverride>();
> +        }
> +        return this.attributeOverride;
> +    }
> +
> +    /**
> +     * Gets the value of the associationOverride property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> associationOverride property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getAssociationOverride().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link org.apache.openejb.jee.jpa.AssociationOverride }
> +     *
> +     *
> +     */
> +    public List<AssociationOverride>  getAssociationOverride() {
> +        if (associationOverride == null) {
> +            associationOverride = new ArrayList<AssociationOverride>();
> +        }
> +        return this.associationOverride;
> +    }
> +
> +    /**
> +     * Gets the value of the collectionTable property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link CollectionTable }
> +     *
> +     */
> +    public CollectionTable getCollectionTable() {
> +        return collectionTable;
> +    }
> +
> +    /**
> +     * Sets the value of the collectionTable property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link CollectionTable }
> +     *
> +     */
> +    public void setCollectionTable(CollectionTable value) {
> +        this.collectionTable = value;
> +    }
> +
> +    /**
> +     * Gets the value of the name property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getName() {
> +        return name;
> +    }
> +
> +    /**
> +     * Sets the value of the name property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setName(String value) {
> +        this.name = value;
> +    }
> +
> +    /**
> +     * Gets the value of the targetClass property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getTargetClass() {
> +        return targetClass;
> +    }
> +
> +    /**
> +     * Sets the value of the targetClass property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setTargetClass(String value) {
> +        this.targetClass = value;
> +    }
> +
> +    /**
> +     * Gets the value of the fetch property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.FetchType }
> +     *
> +     */
> +    public FetchType getFetch() {
> +        return fetch;
> +    }
> +
> +    /**
> +     * Sets the value of the fetch property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.FetchType }
> +     *
> +     */
> +    public void setFetch(FetchType value) {
> +        this.fetch = value;
> +    }
> +
> +    /**
> +     * Gets the value of the access property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link org.apache.openejb.jee.jpa.AccessType }
> +     *
> +     */
> +    public AccessType getAccess() {
> +        return access;
> +    }
> +
> +    /**
> +     * Sets the value of the access property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link org.apache.openejb.jee.jpa.AccessType }
> +     *
> +     */
> +    public void setAccess(AccessType value) {
> +        this.access = value;
> +    }
> +
> +}
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
> Thu Dec 23 15:58:55 2010
> @@ -36,6 +36,12 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
>   *&lt;element name="basic"
> type="{http://java.sun.com/xml/ns/persistence/orm}basic"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="many-to-one"
> type="{http://java.sun.com/xml/ns/persistence/orm}many-to-one"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="one-to-many"
> type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="one-to-one"
> type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="many-to-many"
> type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="element-collection"
> type="{http://java.sun.com/xml/ns/persistence/orm}element-collection"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="embedded"
> type="{http://java.sun.com/xml/ns/persistence/orm}embedded"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="transient"
> type="{http://java.sun.com/xml/ns/persistence/orm}transient"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;/sequence>
>   *&lt;/restriction>
> @@ -48,11 +54,28 @@ import javax.xml.bind.annotation.XmlType
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "embeddable-attributes", propOrder = {
>      "basic",
> +    "manyToOne",
> +    "oneToMany",
> +    "oneToOne",
> +    "manyToMany",
> +    "elementCollection",
> +    "embedded",
>      "_transient"
>   })
>   public class EmbeddableAttributes {
>
>      protected List<Basic>  basic;
> +    @XmlElement(name = "many-to-one")
> +    protected List<ManyToOne>  manyToOne;
> +    @XmlElement(name = "one-to-many")
> +    protected List<OneToMany>  oneToMany;
> +    @XmlElement(name = "one-to-one")
> +    protected List<OneToOne>  oneToOne;
> +    @XmlElement(name = "many-to-many")
> +    protected List<ManyToMany>  manyToMany;
> +    @XmlElement(name = "element-collection")
> +    protected List<ElementCollection>  elementCollection;
> +    protected List<Embedded>  embedded;
>      @XmlElement(name = "transient")
>      protected List<Transient>  _transient;
>
> @@ -86,6 +109,180 @@ public class EmbeddableAttributes {
>      }
>
>      /**
> +     * Gets the value of the manyToOne property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> manyToOne property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getManyToOne().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link ManyToOne }
> +     *
> +     *
> +     */
> +    public List<ManyToOne>  getManyToOne() {
> +        if (manyToOne == null) {
> +            manyToOne = new ArrayList<ManyToOne>();
> +        }
> +        return this.manyToOne;
> +    }
> +
> +    /**
> +     * Gets the value of the oneToMany property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> oneToMany property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getOneToMany().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link OneToMany }
> +     *
> +     *
> +     */
> +    public List<OneToMany>  getOneToMany() {
> +        if (oneToMany == null) {
> +            oneToMany = new ArrayList<OneToMany>();
> +        }
> +        return this.oneToMany;
> +    }
> +
> +    /**
> +     * Gets the value of the oneToOne property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> oneToOne property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getOneToOne().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link OneToOne }
> +     *
> +     *
> +     */
> +    public List<OneToOne>  getOneToOne() {
> +        if (oneToOne == null) {
> +            oneToOne = new ArrayList<OneToOne>();
> +        }
> +        return this.oneToOne;
> +    }
> +
> +    /**
> +     * Gets the value of the manyToMany property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> manyToMany property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getManyToMany().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link ManyToMany }
> +     *
> +     *
> +     */
> +    public List<ManyToMany>  getManyToMany() {
> +        if (manyToMany == null) {
> +            manyToMany = new ArrayList<ManyToMany>();
> +        }
> +        return this.manyToMany;
> +    }
> +
> +    /**
> +     * Gets the value of the elementCollection property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> elementCollection property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getElementCollection().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link ElementCollection }
> +     *
> +     *
> +     */
> +    public List<ElementCollection>  getElementCollection() {
> +        if (elementCollection == null) {
> +            elementCollection = new ArrayList<ElementCollection>();
> +        }
> +        return this.elementCollection;
> +    }
> +
> +    /**
> +     * Gets the value of the embedded property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> embedded property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getEmbedded().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link Embedded }
> +     *
> +     *
> +     */
> +    public List<Embedded>  getEmbedded() {
> +        if (embedded == null) {
> +            embedded = new ArrayList<Embedded>();
> +        }
> +        return this.embedded;
> +    }
> +
> +    /**
>       * Gets the value of the transient property.
>       *
>       *<p>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
> Thu Dec 23 15:58:55 2010
> @@ -44,8 +44,10 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
>   *&lt;element name="attribute-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
> maxOccurs="unbounded" minOccurs="0"/>
> + *&lt;element name="association-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;/sequence>
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -55,14 +57,19 @@ import javax.xml.bind.annotation.XmlType
>   */
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "embedded", propOrder = {
> -    "attributeOverride"
> +    "attributeOverride",
> +    "associationOverride"
>   })
>   public class Embedded {
>
>      @XmlElement(name = "attribute-override")
>      protected List<AttributeOverride>  attributeOverride;
> +    @XmlElement(name = "association-override")
> +    protected List<AssociationOverride>  associationOverride;
>      @XmlAttribute(required = true)
>      protected String name;
> +    @XmlAttribute
> +    protected AccessType access;
>
>      /**
>       * Gets the value of the attributeOverride property.
> @@ -94,6 +101,35 @@ public class Embedded {
>      }
>
>      /**
> +     * Gets the value of the associationOverride property.
> +     *
> +     *<p>
> +     * This accessor method returns a reference to the live list,
> +     * not a snapshot. Therefore any modification you make to the
> +     * returned list will be present inside the JAXB object.
> +     * This is why there is not a<CODE>set</CODE>  method for the
> associationOverride property.
> +     *
> +     *<p>
> +     * For example, to add a new item, do as follows:
> +     *<pre>
> +     *    getAssociationOverride().add(newItem);
> +     *</pre>
> +     *
> +     *
> +     *<p>
> +     * Objects of the following type(s) are allowed in the list
> +     * {@link AssociationOverride }
> +     *
> +     *
> +     */
> +    public List<AssociationOverride>  getAssociationOverride() {
> +        if (associationOverride == null) {
> +            associationOverride = new ArrayList<AssociationOverride>();
> +        }
> +        return this.associationOverride;
> +    }
> +
> +    /**
>       * Gets the value of the name property.
>       *
>       * @return
> @@ -117,4 +153,28 @@ public class Embedded {
>          this.name = value;
>      }
>
> +    /**
> +         * Gets the value of the access property.
> +         *
> +         * @return
> +         *     possible object is
> +         *     {@link AccessType }
> +         *
> +         */
> +        public AccessType getAccess() {
> +            return access;
> +        }
> +
> +        /**
> +         * Sets the value of the access property.
> +         *
> +         * @param value
> +         *     allowed object is
> +         *     {@link AccessType }
> +         *
> +         */
> +        public void setAccess(AccessType value) {
> +            this.access = value;
> +        }
> +
>   }
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
> Thu Dec 23 15:58:55 2010
> @@ -46,6 +46,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;element name="attribute-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;/sequence>
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -63,6 +64,8 @@ public class EmbeddedId {
>      protected List<AttributeOverride>  attributeOverride;
>      @XmlAttribute(required = true)
>      protected String name;
> +    @XmlAttribute
> +    protected AccessType access;
>
>      /**
>       * Gets the value of the attributeOverride property.
> @@ -117,4 +120,28 @@ public class EmbeddedId {
>          this.name = value;
>      }
>
> +    /**
> +     * Gets the value of the access property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public AccessType getAccess() {
> +        return access;
> +    }
> +
> +    /**
> +     * Sets the value of the access property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public void setAccess(AccessType value) {
> +        this.access = value;
> +    }
> +
>   }
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
> Thu Dec 23 15:58:55 2010
> @@ -82,10 +82,11 @@ import javax.xml.bind.annotation.XmlTran
>   *&lt;element name="association-override"
> type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="attributes"
> type="{http://java.sun.com/xml/ns/persistence/orm}attributes"
> minOccurs="0"/>
>   *&lt;/sequence>
> - *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
> + *&lt;attribute name="name"
> type="{http://www.w3.org/2001/XMLSchema}string" />
>   *&lt;attribute name="class" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
> + *&lt;attribute name="cacheable"
> type="{http://www.w3.org/2001/XMLSchema}boolean" />
>   *&lt;attribute name="metadata-complete"
> type="{http://www.w3.org/2001/XMLSchema}boolean" />
> - *&lt;attribute name="name"
> type="{http://www.w3.org/2001/XMLSchema}string" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -176,6 +177,8 @@ public class Entity implements Mapping,
>      protected AccessType access;
>      @XmlAttribute(name = "class", required = true)
>      protected String clazz;
> +    @XmlAttribute
> +    protected Boolean cacheable;
>      @XmlAttribute(name = "metadata-complete")
>      protected Boolean metadataComplete;
>      @XmlAttribute
> @@ -902,6 +905,30 @@ public class Entity implements Mapping,
>      }
>
>      /**
> +     * Gets the value of the cacheable property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link Boolean }
> +     *
> +     */
> +    public Boolean isCacheable() {
> +        return cacheable;
> +    }
> +
> +    /**
> +     * Sets the value of the cacheable property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link Boolean }
> +     *
> +     */
> +    public void setCacheable(Boolean value) {
> +        this.cacheable = value;
> +    }
> +
> +    /**
>       * Gets the value of the metadataComplete property.
>       *
>       * @return
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
> Thu Dec 23 15:58:55 2010
> @@ -41,6 +41,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;complexContent>
>   *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
>   *&lt;sequence>
> + *&lt;element name="description"
> type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
>   *&lt;element name="pre-persist"
> type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist"
> minOccurs="0"/>
>   *&lt;element name="post-persist"
> type="{http://java.sun.com/xml/ns/persistence/orm}post-persist"
> minOccurs="0"/>
>   *&lt;element name="pre-remove"
> type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove"
> minOccurs="0"/>
> @@ -59,6 +60,7 @@ import javax.xml.bind.annotation.XmlType
>   */
>   @XmlAccessorType(XmlAccessType.FIELD)
>   @XmlType(name = "entity-listener", propOrder = {
> +    "description",
>      "prePersist",
>      "postPersist",
>      "preRemove",
> @@ -69,6 +71,7 @@ import javax.xml.bind.annotation.XmlType
>   })
>   public class EntityListener {
>
> +    protected String description;
>      @XmlElement(name = "pre-persist")
>      protected PrePersist prePersist;
>      @XmlElement(name = "post-persist")
> @@ -87,6 +90,30 @@ public class EntityListener {
>      protected String clazz;
>
>      /**
> +     * Gets the value of the description property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link String }
> +     *
> +     */
> +    public String getDescription() {
> +        return description;
> +    }
> +
> +    /**
> +     * Sets the value of the description property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link String }
> +     *
> +     */
> +    public void setDescription(String value) {
> +        this.description = value;
> +    }
> +
> +    /**
>       * Gets the value of the prePersist property.
>       *
>       * @return
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
> Thu Dec 23 15:58:55 2010
> @@ -35,7 +35,7 @@ import javax.xml.bind.annotation.adapter
>   /**
>   *
>   *
> - *         The entity-mappings element is the root element of an mapping
> + *         The entity-mappings element is the root element of a mapping
>   *         file. It contains the following four types of elements:
>   *
>   *         1. The persistence-unit-metadata element contains metadata
> @@ -51,9 +51,9 @@ import javax.xml.bind.annotation.adapter
>   *         to the persistence unit. It is undefined to have more than one
>   *         sequence-generator or table-generator of the same name in the same
>   *         or different mapping files in a persistence unit. It is also
> - *         undefined to have more than one named-query or named-native-query
> - *         of the same name in the same or different mapping files in a
> - *         persistence unit.
> + *         undefined to have more than one named-query, named-native-query, or
> + *         result-set-mapping of the same name in the same or different mapping
> + *         files in a persistence unit.
>   *
>   *         4. The entity, mapped-superclass and embeddable elements each define
>   *         the mapping information for a managed persistent class. The mapping
> @@ -86,7 +86,7 @@ import javax.xml.bind.annotation.adapter
>   *&lt;element name="entity"
> type="{http://java.sun.com/xml/ns/persistence/orm}entity"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;element name="embeddable"
> type="{http://java.sun.com/xml/ns/persistence/orm}embeddable"
> maxOccurs="unbounded" minOccurs="0"/>
>   *&lt;/sequence>
> - *&lt;attribute name="version" use="required"
> type="{http://java.sun.com/xml/ns/persistence/orm}versionType"
> fixed="1.0" />
> + *&lt;attribute name="version" use="required"
> type="{http://java.sun.com/xml/ns/persistence/orm}versionType"
> fixed="2.0" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -138,7 +138,7 @@ public class EntityMappings {
>      protected List<Embeddable>  embeddable;
>      @XmlAttribute(required = true)
>      @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
> -    protected String version = "1.0";
> +    protected String version = "2.0";
>
>      /**
>       * Gets the value of the description property.
> @@ -534,7 +534,7 @@ public class EntityMappings {
>       */
>      public String getVersion() {
>          if (version == null) {
> -            return "1.0";
> +            return "2.0";
>          } else {
>              return version;
>          }
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "enum-type")
>   @XmlEnum
>   public enum EnumType {
>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "fetch-type")
>   @XmlEnum
>   public enum FetchType {
>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -37,6 +38,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "generation-type")
>   @XmlEnum
>   public enum GenerationType {
>
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
> Thu Dec 23 15:58:55 2010
> @@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
>   *&lt;element name="sequence-generator"
> type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator"
> minOccurs="0"/>
>   *&lt;/sequence>
>   *&lt;attribute name="name" use="required"
> type="{http://www.w3.org/2001/XMLSchema}string" />
> + *&lt;attribute name="access"
> type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
>   *&lt;/restriction>
>   *&lt;/complexContent>
>   *&lt;/complexType>
> @@ -75,6 +76,8 @@ public class Id implements Field {
>      protected SequenceGenerator sequenceGenerator;
>      @XmlAttribute(required = true)
>      protected String name;
> +    @XmlAttribute
> +    protected AccessType access;
>
>      public Id() {
>      }
> @@ -235,4 +238,28 @@ public class Id implements Field {
>      public Object getKey() {
>          return name;
>      }
> +
> +    /**
> +     * Gets the value of the access property.
> +     *
> +     * @return
> +     *     possible object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public AccessType getAccess() {
> +        return access;
> +    }
> +
> +    /**
> +     * Sets the value of the access property.
> +     *
> +     * @param value
> +     *     allowed object is
> +     *     {@link AccessType }
> +     *
> +     */
> +    public void setAccess(AccessType value) {
> +        this.access = value;
> +    }
>   }
>
> Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
> (original)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
> Thu Dec 23 15:58:55 2010
> @@ -18,6 +18,7 @@
>   package org.apache.openejb.jee.jpa;
>
>   import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
>
>
>   /**
> @@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
>   *</pre>
>   *
>   */
> +@XmlType(name = "inheritance-type")
>   @XmlEnum
>   public enum InheritanceType {
>
>
> Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
> URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java?rev=1052305&view=auto
> ==============================================================================
> --- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
> (added)
> +++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
> Thu Dec 23 15:58:55 2010
> @@ -0,0 +1,66 @@
> +/**
> + * 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.
> + */
> +
> +package org.apache.openejb.jee.jpa;
> +
> +import javax.xml.bind.annotation.XmlEnum;
> +import javax.xml.bind.annotation.XmlType;
> +
> +
> +/**
> + *<p>Java class for lock-mode-type.
> + *
> + *<p>The following schema fragment specifies the expected content
> contained within this class.
> + *<p>
> + *<pre>
> + *&lt;simpleType name="lock-mode-type">
> + *&lt;restriction base="{http://www.w3.org/2001/XMLSchema}token">
> + *&lt;enumeration value="READ"/>
> + *&lt;enumeration value="WRITE"/>
> + *&lt;enumeration value="OPTIMISTIC"/>
> + *&lt;enumeration value="OPTIMISTIC_FORCE_INCREMENT"/>
> + *&lt;enumeration value="PESSIMISTIC_READ"/>
> + *&lt;enumeration value="PESSIMISTIC_WRITE"/>
> + *&lt;enumeration value="PESSIMISTIC_FORCE_INCREMENT"/>
> + *&lt;enumeration value="NONE"/>
> + *&lt;/restriction>
> + *&lt;/simpleType>
> + *</pre>
> + *
> + */
> +@XmlType(name = "lock-mode-type")
> +@XmlEnum
> +public enum LockModeType {
> +
> +    READ,
> +    WRITE,
> +    OPTIMISTIC,
> +    OPTIMISTIC_FORCE_INCREMENT,
> +    PESSIMISTIC_READ,
> +    PESSIMISTIC_WRITE,
> +    PESSIMISTIC_FORCE_INCREMENT,
> +    NONE;
> +
> +    public String value() {
> +        return name();
> +    }
> +
> +    public static LockModeType fromValue(String v) {
> +        return valueOf(v);
> +    }
> +
> +}


Fwd: svn commit: r1052305 [1/3] - in /openejb/trunk/openejb3/container/openejb-jee/src: main/java/org/apache/openejb/jee/jpa/ test/java/org/apache/openejb/jee/jpa/ test/resources/

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi,

finally updated the JAXB tree to stick with XSD changes (orm.xml as
well as persistence.xml).
Everything still works in my computer (see after) but that'd be great
if someone can confim ;-)

Jean-Louis


[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] OpenEJB ........................................... SUCCESS [1.140s]
[INFO] OpenEJB :: Dependencies ........................... SUCCESS [0.110s]
[INFO] OpenEJB :: Dependencies :: JavaEE API ............. SUCCESS [13.031s]
[INFO] OpenEJB :: iTests ................................. SUCCESS [0.109s]
[INFO] OpenEJB :: iTests Beans ........................... SUCCESS [4.516s]
[INFO] OpenEJB :: iTests Servlets ........................ SUCCESS [1.266s]
[INFO] OpenEJB :: iTests Client .......................... SUCCESS [5.828s]
[INFO] OpenEJB :: iTests Interceptor Beans ............... SUCCESS [1.078s]
[INFO] OpenEJB :: iTests App ............................. SUCCESS [3.140s]
[INFO] OpenEJB :: iTests Web ............................. SUCCESS [1.125s]
[INFO] OpenEJB :: Container .............................. SUCCESS [0.110s]
[INFO] OpenEJB :: Container :: API ....................... SUCCESS [0.969s]
[INFO] OpenEJB :: Container :: Loader .................... SUCCESS [2.343s]
[INFO] OpenEJB :: Container :: Java Agent ................ SUCCESS [1.578s]
[INFO] OpenEJB :: Container :: Java EE ................... SUCCESS [35.626s]
[INFO] OpenEJB :: Container :: Core ...................... SUCCESS [8:42.609s]
[INFO] OpenEJB :: Container :: Spring .................... SUCCESS [12.844s]
[INFO] OpenEJB :: Container :: OSGi :: Core .............. SUCCESS [4.078s]
[INFO] OpenEJB :: Container :: OSGi ...................... SUCCESS [6.547s]
[INFO] OpenEJB :: Container :: ActiveMQ4 ................. SUCCESS [1:22.453s]
[INFO] OpenEJB :: Container :: JUnit ..................... SUCCESS [17.093s]
[INFO] OpenEJB :: Server ................................. SUCCESS [0.203s]
[INFO] OpenEJB :: Server :: Client ....................... SUCCESS [13.203s]
[INFO] OpenEJB :: Server :: Core ......................... SUCCESS [7.094s]
[INFO] OpenEJB :: Server :: Multicast Discovery .......... SUCCESS [28.516s]
[INFO] OpenEJB :: Server :: EJBd ......................... SUCCESS [1:02.952s]
[INFO] OpenEJB :: Server :: Admin ........................ SUCCESS [1.750s]
[INFO] OpenEJB :: Server :: Http ......................... SUCCESS [34.484s]
[INFO] OpenEJB :: Server :: WebAdmin ..................... SUCCESS [7.188s]
[INFO] OpenEJB :: Server :: Telnet ....................... SUCCESS [4.203s]
[INFO] OpenEJB :: Server :: ActiveMQ ..................... SUCCESS [3.531s]
[INFO] OpenEJB :: Server :: CORBA ........................ SUCCESS [1.406s]
[INFO] OpenEJB :: Server :: Derby Network Service ........ SUCCESS [3.422s]
[INFO] OpenEJB :: Server :: Hsql ......................... SUCCESS [3.657s]
[INFO] OpenEJB :: Server :: Webservices .................. SUCCESS [9.781s]
[INFO] OpenEJB :: Server :: Axis ......................... SUCCESS [16.172s]
[INFO] OpenEJB :: Server :: Axis2 ........................ SUCCESS [36.484s]
[INFO] OpenEJB :: Server :: CXF .......................... SUCCESS [34.828s]
[INFO] OpenEJB :: Server :: Daemon ....................... SUCCESS [3.000s]
[INFO] OpenEJB :: Examples :: @ApplicationException inheritance
SUCCESS [7.859s]
[INFO] OpenEJB :: Examples :: Simple Stateful Pojo ....... SUCCESS [7.265s]
[INFO] OpenEJB :: Examples :: Simple Stateless Pojo ...... SUCCESS [5.172s]
[INFO] OpenEJB :: Examples :: Simple Stateless With Deployment
Descriptor  SUCCESS [5.578s]
[INFO] OpenEJB :: Examples :: Simple Singleton ........... SUCCESS [4.422s]
[INFO] OpenEJB :: Examples :: Simple MDB Example ......... SUCCESS [6.360s]
[INFO] OpenEJB :: Examples :: Simple MDB Using Deployment Descriptor
Example  SUCCESS [7.859s]
[INFO] OpenEJB :: Examples :: Simple CMP2 Entity ......... SUCCESS [9.906s]
[INFO] OpenEJB :: Examples :: Simple Webservice .......... SUCCESS [11.906s]
[INFO] OpenEJB :: Examples :: EJB 2.1 Component Interfaces  SUCCESS [5.453s]
[INFO] OpenEJB :: Examples :: @EJB Injection ............. SUCCESS [5.125s]
[INFO] OpenEJB :: Examples :: @Resource env-entry Injection  SUCCESS [8.344s]
[INFO] OpenEJB :: Examples :: @Resource DataSource Injection  SUCCESS [4.719s]
[INFO] OpenEJB :: Examples :: @PersistenceContext EntityManager
Injection  SUCCESS [6.797s]
[INFO] OpenEJB :: Examples :: @Resource javax.jms.ConnectionFactory
SUCCESS [6.031s]
[INFO] OpenEJB :: Examples :: Testing Transactions ....... SUCCESS [7.250s]
[INFO] OpenEJB :: Examples :: Testing Security ........... SUCCESS [7.172s]
[INFO] OpenEJB :: Examples :: Testing Security ........... SUCCESS [6.828s]
[INFO] OpenEJB :: Examples :: TestCase Injection ......... SUCCESS [7.421s]
[INFO] OpenEJB :: Examples :: Alternate Descriptors ...... SUCCESS [7.750s]
[INFO] OpenEJB :: Examples :: Ear Testing ................ SUCCESS [0.110s]
[INFO] OpenEJB :: Examples :: Ear Testing :: Business Model  SUCCESS [1.140s]
[INFO] OpenEJB :: Examples :: Ear Testing :: Business Logic  SUCCESS [7.000s]
[INFO] OpenEJB :: Examples :: Interceptors ............... SUCCESS [8.282s]
[INFO] OpenEJB :: Examples :: Expanded support for Env Entries  SUCCESS [6.625s]
[INFO] OpenEJB :: Examples :: Hello World - Weblogic ..... SUCCESS [9.046s]
[INFO] OpenEJB :: Examples :: JPA with Hibernate ......... SUCCESS [17.719s]
[INFO] OpenEJB :: Examples :: JPA with EclipseLink ....... SUCCESS [8.500s]
[INFO] OpenEJB :: Examples :: Spring Integration ......... SUCCESS [13.984s]
[INFO] OpenEJB :: Examples :: Telephone Stateful Pojo .... SUCCESS [6.156s]
[INFO] OpenEJB :: Examples :: Quartz Application ......... SUCCESS [0.172s]
[INFO] Quartz Resource Adapter ........................... SUCCESS [0.813s]
[INFO] Quartz Beans ...................................... SUCCESS [8.390s]
[INFO] OpenEJB :: Examples :: Webservice Attachments ..... SUCCESS [11.110s]
[INFO] OpenEJB :: Web Examples :: EJB Examples War ....... SUCCESS [6.750s]
[INFO] OpenEJB :: Web Examples :: EJB WebService ......... SUCCESS [1.578s]
[INFO] OpenEJB :: Web Examples :: JSF with MyFaces ....... SUCCESS [7.375s]
[INFO] OpenEJB :: Web Examples :: Struts ................. SUCCESS [4.843s]
[INFO] OpenEJB :: Web Examples :: EJB WebService ......... SUCCESS [10.391s]
[INFO] OpenEJB :: Web Examples ........................... SUCCESS [0.234s]
[INFO] OpenEJB :: Web Examples :: EJB WebService with Security
SUCCESS [10.453s]
[INFO] OpenEJB :: Web Examples :: EJB WebService with WS-Security
SUCCESS [21.391s]
[INFO] OpenEJB :: Examples :: Webservice Inheritance ..... SUCCESS [12.640s]
[INFO] OpenEJB :: Examples :: Transaction Rollback ....... SUCCESS [11.719s]
[INFO] OpenEJB :: Examples :: Troubleshooting ............ SUCCESS [8.672s]
[INFO] OpenEJB :: Examples ............................... SUCCESS [0.391s]
[INFO] OpenEJB :: Assembly ............................... SUCCESS [0.359s]
[INFO] OpenEJB :: Assembly :: WebApp :: Common ........... SUCCESS [10.172s]
[INFO] OpenEJB :: Assembly :: iTests Standalone Client ... SUCCESS [10.875s]
[INFO] OpenEJB :: Assembly :: Tomcat ..................... SUCCESS [0.437s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Loader ........... SUCCESS [3.063s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Common ........... SUCCESS [8.781s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Catalina ......... SUCCESS [10.140s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Webapp ........... SUCCESS [1:11.453s]
[INFO] OpenEJB :: Assembly :: Tomcat :: Bundle ........... SUCCESS [7:22.081s]
[INFO] OpenEJB :: Assembly :: Jetty ...................... SUCCESS [1.438s]
[INFO] OpenEJB :: Assembly :: Jetty :: Loader ............ SUCCESS [6.547s]
[INFO] OpenEJB :: Assembly :: Jetty :: Common ............ SUCCESS [4:58.063s]
[INFO] OpenEJB :: Assembly :: Jetty :: Webapp ............ SUCCESS [1:51.063s]
[INFO] OpenEJB :: Assembly :: Webapp ..................... SUCCESS [50.874s]
[INFO] OpenEJB :: Assembly :: Java EE API Libraries ...... SUCCESS [20.219s]
[INFO] OpenEJB :: Assembly :: Standalone ................. SUCCESS [59.375s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40:30.655s
[INFO] Finished at: Thu Dec 23 16:46:22 CET 2010
[INFO] Final Memory: 117M/989M
[INFO] ------------------------------------------------------------------------


---------- Forwarded message ----------
From:  <jl...@apache.org>
Date: 2010/12/23
Subject: svn commit: r1052305 [1/3] - in
/openejb/trunk/openejb3/container/openejb-jee/src:
main/java/org/apache/openejb/jee/jpa/
test/java/org/apache/openejb/jee/jpa/ test/resources/
To: commits@openejb.apache.org


Author: jlmonteiro
Date: Thu Dec 23 15:58:55 2010
New Revision: 1052305

URL: http://svn.apache.org/viewvc?rev=1052305&view=rev
Log:
OPENEJB-1236 Provide JPA 2.0 support in addition to JPA 1.0
JaxB tree updated for orm.xml and persistence.xml files.
Also added some tests

Added:
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyClass.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyColumn.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKeyJoinColumn.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OrderColumn.java
   openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml
   openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml
Modified:
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToOne.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitDefaults.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PersistenceUnitMetadata.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java
   openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java
   openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java
   openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java
   openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml
   openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AccessType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "access-type")
 @XmlEnum
 public enum AccessType {


Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AssociationOverride.java
Thu Dec 23 15:58:55 2010
@@ -32,7 +32,8 @@ import javax.xml.bind.annotation.XmlType
 *         @Target({TYPE, METHOD, FIELD}) @Retention(RUNTIME)
 *         public @interface AssociationOverride {
 *           String name();
- *           JoinColumn[] joinColumns();
+ *           JoinColumn[] joinColumns() default{};
+ *           JoinTable joinTable() default @JoinTable;
 *         }
 *
 *
@@ -46,7 +47,11 @@ import javax.xml.bind.annotation.XmlType
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
- *         &lt;element name="join-column"
type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
maxOccurs="unbounded"/>
+ *         &lt;element name="description"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;choice>
+ *           &lt;element name="join-column"
type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;element name="join-table"
type="{http://java.sun.com/xml/ns/persistence/orm}join-table"
minOccurs="0"/>
+ *         &lt;/choice>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
 *     &lt;/restriction>
@@ -58,16 +63,45 @@ import javax.xml.bind.annotation.XmlType
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "association-override", propOrder = {
-    "joinColumn"
+    "description",
+    "joinColumn",
+    "joinTable"
 })
 public class AssociationOverride {

-    @XmlElement(name = "join-column", required = true)
+    protected String description;
+    @XmlElement(name = "join-column")
    protected List<JoinColumn> joinColumn;
+    @XmlElement(name = "join-table")
+    protected JoinTable joinTable;
    @XmlAttribute(required = true)
    protected String name;

    /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
     * Gets the value of the joinColumn property.
     *
     * <p>
@@ -97,6 +131,30 @@ public class AssociationOverride {
    }

    /**
+     * Gets the value of the joinTable property.
+     *
+     * @return
+     *     possible object is
+     *     {@link JoinTable }
+     *
+     */
+    public JoinTable getJoinTable() {
+        return joinTable;
+    }
+
+    /**
+     * Sets the value of the joinTable property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link JoinTable }
+     *
+     */
+    public void setJoinTable(JoinTable value) {
+        this.joinTable = value;
+    }
+
+    /**
     * Gets the value of the name property.
     *
     * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/AttributeOverride.java
Thu Dec 23 15:58:55 2010
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
+ *         &lt;element name="description"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="column"
type="{http://java.sun.com/xml/ns/persistence/orm}column"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
@@ -56,10 +57,12 @@ import javax.xml.bind.annotation.XmlType
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "attribute-override", propOrder = {
+    "description",
    "column"
 })
 public class AttributeOverride implements Field {

+    protected String description;
    @XmlElement(required = true)
    protected Column column;
    @XmlAttribute(required = true)
@@ -80,6 +83,30 @@ public class AttributeOverride implement
    }

    /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
     * Gets the value of the column property.
     *
     * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Attributes.java
Thu Dec 23 15:58:55 2010
@@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
+ *         &lt;element name="description"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;choice>
 *           &lt;element name="id"
type="{http://java.sun.com/xml/ns/persistence/orm}id"
maxOccurs="unbounded" minOccurs="0"/>
 *           &lt;element name="embedded-id"
type="{http://java.sun.com/xml/ns/persistence/orm}embedded-id"
minOccurs="0"/>
@@ -58,6 +59,7 @@ import javax.xml.bind.annotation.XmlType
 *         &lt;element name="one-to-many"
type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="one-to-one"
type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="many-to-many"
type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="element-collection"
type="{http://java.sun.com/xml/ns/persistence/orm}element-collection"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="embedded"
type="{http://java.sun.com/xml/ns/persistence/orm}embedded"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="transient"
type="{http://java.sun.com/xml/ns/persistence/orm}transient"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
@@ -70,6 +72,7 @@ import javax.xml.bind.annotation.XmlType
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "attributes", propOrder = {
+    "description",
    "id",
    "embeddedId",
    "basic",
@@ -78,11 +81,13 @@ import javax.xml.bind.annotation.XmlType
    "oneToMany",
    "oneToOne",
    "manyToMany",
+    "elementCollection",
    "embedded",
    "_transient"
 })
 public class Attributes {

+    protected String description;
    protected List<Id> id;
    @XmlElement(name = "embedded-id")
    protected EmbeddedId embeddedId;
@@ -96,11 +101,37 @@ public class Attributes {
    protected List<OneToOne> oneToOne;
    @XmlElement(name = "many-to-many")
    protected List<ManyToMany> manyToMany;
+    @XmlElement(name = "element-collection")
+    protected List<ElementCollection> elementCollection;
    protected List<Embedded> embedded;
    @XmlElement(name = "transient")
    protected List<Transient> _transient;

    /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
     * Gets the value of the id property.
     *
     * <p>
@@ -337,6 +368,35 @@ public class Attributes {
    }

    /**
+     * Gets the value of the elementCollection property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
elementCollection property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getElementCollection().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ElementCollection }
+     *
+     *
+     */
+    public List<ElementCollection> getElementCollection() {
+        if (elementCollection == null) {
+            elementCollection = new ArrayList<ElementCollection>();
+        }
+        return this.elementCollection;
+    }
+
+    /**
     * Gets the value of the embedded property.
     *
     * <p>

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Basic.java
Thu Dec 23 15:58:55 2010
@@ -50,9 +50,10 @@ import javax.xml.bind.annotation.XmlType
 *           &lt;element name="enumerated"
type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
minOccurs="0"/>
 *         &lt;/choice>
 *       &lt;/sequence>
- *       &lt;attribute name="fetch"
type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="fetch"
type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
 *       &lt;attribute name="optional"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -73,12 +74,14 @@ public class Basic implements Field {
    protected Lob lob;
    protected TemporalType temporal;
    protected EnumType enumerated;
-    @XmlAttribute
-    protected FetchType fetch;
    @XmlAttribute(required = true)
    protected String name;
    @XmlAttribute
+    protected FetchType fetch;
+    @XmlAttribute
    protected Boolean optional;
+    @XmlAttribute
+    protected AccessType access;

    public Basic() {
    }
@@ -189,51 +192,51 @@ public class Basic implements Field {
    }

    /**
-     * Gets the value of the fetch property.
-     *
+     * Gets the value of the name property.
+     *
     * @return
     *     possible object is
-     *     {@link FetchType }
-     *
+     *     {@link String }
+     *
     */
-    public FetchType getFetch() {
-        return fetch;
+    public String getName() {
+        return name;
    }

    /**
-     * Sets the value of the fetch property.
-     *
+     * Sets the value of the name property.
+     *
     * @param value
     *     allowed object is
-     *     {@link FetchType }
-     *
+     *     {@link String }
+     *
     */
-    public void setFetch(FetchType value) {
-        this.fetch = value;
+    public void setName(String value) {
+        this.name = value;
    }

    /**
-     * Gets the value of the name property.
-     *
+     * Gets the value of the fetch property.
+     *
     * @return
     *     possible object is
-     *     {@link String }
-     *
+     *     {@link FetchType }
+     *
     */
-    public String getName() {
-        return name;
+    public FetchType getFetch() {
+        return fetch;
    }

    /**
-     * Sets the value of the name property.
-     *
+     * Sets the value of the fetch property.
+     *
     * @param value
     *     allowed object is
-     *     {@link String }
-     *
+     *     {@link FetchType }
+     *
     */
-    public void setName(String value) {
-        this.name = value;
+    public void setFetch(FetchType value) {
+        this.fetch = value;
    }

    /**
@@ -260,6 +263,30 @@ public class Basic implements Field {
        this.optional = value;
    }

+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
    public Object getKey() {
        return name;
    }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CascadeType.java
Thu Dec 23 15:58:55 2010
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlType
 /**
 *
 *
- *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE, REFRESH};
+ *         public enum CascadeType { ALL, PERSIST, MERGE, REMOVE,
REFRESH, DETACH};
 *
 *
 *
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
 *         &lt;element name="cascade-merge"
type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
minOccurs="0"/>
 *         &lt;element name="cascade-remove"
type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
minOccurs="0"/>
 *         &lt;element name="cascade-refresh"
type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
minOccurs="0"/>
+ *         &lt;element name="cascade-detach"
type="{http://java.sun.com/xml/ns/persistence/orm}emptyType"
minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
@@ -58,7 +59,8 @@ import javax.xml.bind.annotation.XmlType
    "cascadePersist",
    "cascadeMerge",
    "cascadeRemove",
-    "cascadeRefresh"
+    "cascadeRefresh",
+    "cascadeDetach"
 })
 public class CascadeType {

@@ -72,6 +74,8 @@ public class CascadeType {
    protected EmptyType cascadeRemove;
    @XmlElement(name = "cascade-refresh")
    protected EmptyType cascadeRefresh;
+    @XmlElement(name = "cascade-detach")
+    protected EmptyType cascadeDetach;

    /**
     * Gets the value of the cascadeAll property.
@@ -193,4 +197,27 @@ public class CascadeType {
        this.cascadeRefresh = value ? new EmptyType() : null;
    }

+    /**
+     * Gets the value of the cascadeDetach property.
+     *
+     * @return
+     *     possible object is
+     *     {@link boolean }
+     *
+     */
+    public boolean isCascadeDetach() {
+        return cascadeDetach != null;
+    }
+
+    /**
+     * Sets the value of the cascadeDetach property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link boolean }
+     *
+     */
+    public void setCascadeDetach(boolean value) {
+        this.cascadeDetach = value ? new EmptyType() : null;
+    }
 }

Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
(added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/CollectionTable.java
Thu Dec 23 15:58:55 2010
@@ -0,0 +1,213 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ *         public @interface CollectionTable {
+ *           String name() default "";
+ *           String catalog() default "";
+ *           String schema() default "";
+ *           JoinColumn[] joinColumns() default {};
+ *           UniqueConstraint[] uniqueConstraints() default {};
+ *         }
+ *
+ *
+ *
+ * <p>Java class for collection-table complex type.
+ *
+ * <p>The following schema fragment specifies the expected content
contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="collection-table">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="join-column"
type="{http://java.sun.com/xml/ns/persistence/orm}join-column"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="unique-constraint"
type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint"
maxOccurs="unbounded" minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="catalog"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="schema"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "collection-table", propOrder = {
+    "joinColumn",
+    "uniqueConstraint"
+})
+public class CollectionTable {
+
+    @XmlElement(name = "join-column")
+    protected List<JoinColumn> joinColumn;
+    @XmlElement(name = "unique-constraint")
+    protected List<UniqueConstraint> uniqueConstraint;
+    @XmlAttribute
+    protected String name;
+    @XmlAttribute
+    protected String catalog;
+    @XmlAttribute
+    protected String schema;
+
+    /**
+     * Gets the value of the joinColumn property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
joinColumn property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getJoinColumn().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.JoinColumn }
+     *
+     *
+     */
+    public List<JoinColumn> getJoinColumn() {
+        if (joinColumn == null) {
+            joinColumn = new ArrayList<JoinColumn>();
+        }
+        return this.joinColumn;
+    }
+
+    /**
+     * Gets the value of the uniqueConstraint property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
uniqueConstraint property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getUniqueConstraint().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.UniqueConstraint }
+     *
+     *
+     */
+    public List<UniqueConstraint> getUniqueConstraint() {
+        if (uniqueConstraint == null) {
+            uniqueConstraint = new ArrayList<UniqueConstraint>();
+        }
+        return this.uniqueConstraint;
+    }
+
+    /**
+     * Gets the value of the name property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the catalog property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getCatalog() {
+        return catalog;
+    }
+
+    /**
+     * Sets the value of the catalog property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setCatalog(String value) {
+        this.catalog = value;
+    }
+
+    /**
+     * Gets the value of the schema property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getSchema() {
+        return schema;
+    }
+
+    /**
+     * Sets the value of the schema property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setSchema(String value) {
+        this.schema = value;
+    }
+
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/DiscriminatorType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "discriminator-type")
 @XmlEnum
 public enum DiscriminatorType {


Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
(added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ElementCollection.java
Thu Dec 23 15:58:55 2010
@@ -0,0 +1,653 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ *         public @interface ElementCollection {
+ *           Class targetClass() default void.class;
+ *           FetchType fetch() default LAZY;
+ *         }
+ *
+ *
+ *
+ * <p>Java class for element-collection complex type.
+ *
+ * <p>The following schema fragment specifies the expected content
contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="element-collection">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;choice>
+ *           &lt;element name="order-by"
type="{http://java.sun.com/xml/ns/persistence/orm}order-by"
minOccurs="0"/>
+ *           &lt;element name="order-column"
type="{http://java.sun.com/xml/ns/persistence/orm}order-column"
minOccurs="0"/>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *           &lt;element name="map-key"
type="{http://java.sun.com/xml/ns/persistence/orm}map-key"
minOccurs="0"/>
+ *           &lt;sequence>
+ *             &lt;element name="map-key-class"
type="{http://java.sun.com/xml/ns/persistence/orm}map-key-class"
minOccurs="0"/>
+ *             &lt;choice>
+ *               &lt;element name="map-key-temporal"
type="{http://java.sun.com/xml/ns/persistence/orm}temporal"
minOccurs="0"/>
+ *               &lt;element name="map-key-enumerated"
type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
minOccurs="0"/>
+ *               &lt;element name="map-key-attribute-override"
type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;/choice>
+ *             &lt;choice>
+ *               &lt;element name="map-key-column"
type="{http://java.sun.com/xml/ns/persistence/orm}map-key-column"
minOccurs="0"/>
+ *               &lt;element name="map-key-join-column"
type="{http://java.sun.com/xml/ns/persistence/orm}map-key-join-column"
maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;/choice>
+ *           &lt;/sequence>
+ *         &lt;/choice>
+ *         &lt;choice>
+ *           &lt;sequence>
+ *             &lt;element name="column"
type="{http://java.sun.com/xml/ns/persistence/orm}column"
minOccurs="0"/>
+ *             &lt;choice>
+ *               &lt;element name="temporal"
type="{http://java.sun.com/xml/ns/persistence/orm}temporal"
minOccurs="0"/>
+ *               &lt;element name="enumerated"
type="{http://java.sun.com/xml/ns/persistence/orm}enumerated"
minOccurs="0"/>
+ *               &lt;element name="lob"
type="{http://java.sun.com/xml/ns/persistence/orm}lob" minOccurs="0"/>
+ *             &lt;/choice>
+ *           &lt;/sequence>
+ *           &lt;sequence>
+ *             &lt;element name="attribute-override"
type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
maxOccurs="unbounded" minOccurs="0"/>
+ *             &lt;element name="association-override"
type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;/sequence>
+ *         &lt;/choice>
+ *         &lt;element name="collection-table"
type="{http://java.sun.com/xml/ns/persistence/orm}collection-table"
minOccurs="0"/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="target-class"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="fetch"
type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "element-collection", propOrder = {
+    "orderBy",
+    "orderColumn",
+    "mapKey",
+    "mapKeyClass",
+    "mapKeyTemporal",
+    "mapKeyEnumerated",
+    "mapKeyAttributeOverride",
+    "mapKeyColumn",
+    "mapKeyJoinColumn",
+    "column",
+    "temporal",
+    "enumerated",
+    "lob",
+    "attributeOverride",
+    "associationOverride",
+    "collectionTable"
+})
+public class ElementCollection {
+
+    @XmlElement(name = "order-by")
+    protected String orderBy;
+    @XmlElement(name = "order-column")
+    protected OrderColumn orderColumn;
+    @XmlElement(name = "map-key")
+    protected MapKey mapKey;
+    @XmlElement(name = "map-key-class")
+    protected MapKeyClass mapKeyClass;
+    @XmlElement(name = "map-key-temporal")
+    protected TemporalType mapKeyTemporal;
+    @XmlElement(name = "map-key-enumerated")
+    protected EnumType mapKeyEnumerated;
+    @XmlElement(name = "map-key-attribute-override")
+    protected List<AttributeOverride> mapKeyAttributeOverride;
+    @XmlElement(name = "map-key-column")
+    protected MapKeyColumn mapKeyColumn;
+    @XmlElement(name = "map-key-join-column")
+    protected List<MapKeyJoinColumn> mapKeyJoinColumn;
+    protected Column column;
+    protected TemporalType temporal;
+    protected EnumType enumerated;
+    protected Lob lob;
+    @XmlElement(name = "attribute-override")
+    protected List<AttributeOverride> attributeOverride;
+    @XmlElement(name = "association-override")
+    protected List<AssociationOverride> associationOverride;
+    @XmlElement(name = "collection-table")
+    protected CollectionTable collectionTable;
+    @XmlAttribute(required = true)
+    protected String name;
+    @XmlAttribute(name = "target-class")
+    protected String targetClass;
+    @XmlAttribute
+    protected FetchType fetch;
+    @XmlAttribute
+    protected AccessType access;
+
+    /**
+     * Gets the value of the orderBy property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getOrderBy() {
+        return orderBy;
+    }
+
+    /**
+     * Sets the value of the orderBy property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setOrderBy(String value) {
+        this.orderBy = value;
+    }
+
+    /**
+     * Gets the value of the orderColumn property.
+     *
+     * @return
+     *     possible object is
+     *     {@link OrderColumn }
+     *
+     */
+    public OrderColumn getOrderColumn() {
+        return orderColumn;
+    }
+
+    /**
+     * Sets the value of the orderColumn property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link OrderColumn }
+     *
+     */
+    public void setOrderColumn(OrderColumn value) {
+        this.orderColumn = value;
+    }
+
+    /**
+     * Gets the value of the mapKey property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.MapKey }
+     *
+     */
+    public MapKey getMapKey() {
+        return mapKey;
+    }
+
+    /**
+     * Sets the value of the mapKey property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.MapKey }
+     *
+     */
+    public void setMapKey(MapKey value) {
+        this.mapKey = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyClass property.
+     *
+     * @return
+     *     possible object is
+     *     {@link MapKeyClass }
+     *
+     */
+    public MapKeyClass getMapKeyClass() {
+        return mapKeyClass;
+    }
+
+    /**
+     * Sets the value of the mapKeyClass property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link MapKeyClass }
+     *
+     */
+    public void setMapKeyClass(MapKeyClass value) {
+        this.mapKeyClass = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyTemporal property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *
+     */
+    public TemporalType getMapKeyTemporal() {
+        return mapKeyTemporal;
+    }
+
+    /**
+     * Sets the value of the mapKeyTemporal property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *
+     */
+    public void setMapKeyTemporal(TemporalType value) {
+        this.mapKeyTemporal = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyEnumerated property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *
+     */
+    public EnumType getMapKeyEnumerated() {
+        return mapKeyEnumerated;
+    }
+
+    /**
+     * Sets the value of the mapKeyEnumerated property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *
+     */
+    public void setMapKeyEnumerated(EnumType value) {
+        this.mapKeyEnumerated = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyAttributeOverride property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
mapKeyAttributeOverride property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapKeyAttributeOverride().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
+     *
+     *
+     */
+    public List<AttributeOverride> getMapKeyAttributeOverride() {
+        if (mapKeyAttributeOverride == null) {
+            mapKeyAttributeOverride = new ArrayList<AttributeOverride>();
+        }
+        return this.mapKeyAttributeOverride;
+    }
+
+    /**
+     * Gets the value of the mapKeyColumn property.
+     *
+     * @return
+     *     possible object is
+     *     {@link MapKeyColumn }
+     *
+     */
+    public MapKeyColumn getMapKeyColumn() {
+        return mapKeyColumn;
+    }
+
+    /**
+     * Sets the value of the mapKeyColumn property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link MapKeyColumn }
+     *
+     */
+    public void setMapKeyColumn(MapKeyColumn value) {
+        this.mapKeyColumn = value;
+    }
+
+    /**
+     * Gets the value of the mapKeyJoinColumn property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
mapKeyJoinColumn property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMapKeyJoinColumn().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link MapKeyJoinColumn }
+     *
+     *
+     */
+    public List<MapKeyJoinColumn> getMapKeyJoinColumn() {
+        if (mapKeyJoinColumn == null) {
+            mapKeyJoinColumn = new ArrayList<MapKeyJoinColumn>();
+        }
+        return this.mapKeyJoinColumn;
+    }
+
+    /**
+     * Gets the value of the column property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.Column }
+     *
+     */
+    public Column getColumn() {
+        return column;
+    }
+
+    /**
+     * Sets the value of the column property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.Column }
+     *
+     */
+    public void setColumn(Column value) {
+        this.column = value;
+    }
+
+    /**
+     * Gets the value of the temporal property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *
+     */
+    public TemporalType getTemporal() {
+        return temporal;
+    }
+
+    /**
+     * Sets the value of the temporal property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.TemporalType }
+     *
+     */
+    public void setTemporal(TemporalType value) {
+        this.temporal = value;
+    }
+
+    /**
+     * Gets the value of the enumerated property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *
+     */
+    public EnumType getEnumerated() {
+        return enumerated;
+    }
+
+    /**
+     * Sets the value of the enumerated property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.EnumType }
+     *
+     */
+    public void setEnumerated(EnumType value) {
+        this.enumerated = value;
+    }
+
+    /**
+     * Gets the value of the lob property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.Lob }
+     *
+     */
+    public Lob getLob() {
+        return lob;
+    }
+
+    /**
+     * Sets the value of the lob property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.Lob }
+     *
+     */
+    public void setLob(Lob value) {
+        this.lob = value;
+    }
+
+    /**
+     * Gets the value of the attributeOverride property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
attributeOverride property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAttributeOverride().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AttributeOverride }
+     *
+     *
+     */
+    public List<AttributeOverride> getAttributeOverride() {
+        if (attributeOverride == null) {
+            attributeOverride = new ArrayList<AttributeOverride>();
+        }
+        return this.attributeOverride;
+    }
+
+    /**
+     * Gets the value of the associationOverride property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
associationOverride property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAssociationOverride().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link org.apache.openejb.jee.jpa.AssociationOverride }
+     *
+     *
+     */
+    public List<AssociationOverride> getAssociationOverride() {
+        if (associationOverride == null) {
+            associationOverride = new ArrayList<AssociationOverride>();
+        }
+        return this.associationOverride;
+    }
+
+    /**
+     * Gets the value of the collectionTable property.
+     *
+     * @return
+     *     possible object is
+     *     {@link CollectionTable }
+     *
+     */
+    public CollectionTable getCollectionTable() {
+        return collectionTable;
+    }
+
+    /**
+     * Sets the value of the collectionTable property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link CollectionTable }
+     *
+     */
+    public void setCollectionTable(CollectionTable value) {
+        this.collectionTable = value;
+    }
+
+    /**
+     * Gets the value of the name property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the targetClass property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getTargetClass() {
+        return targetClass;
+    }
+
+    /**
+     * Sets the value of the targetClass property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setTargetClass(String value) {
+        this.targetClass = value;
+    }
+
+    /**
+     * Gets the value of the fetch property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.FetchType }
+     *
+     */
+    public FetchType getFetch() {
+        return fetch;
+    }
+
+    /**
+     * Sets the value of the fetch property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.FetchType }
+     *
+     */
+    public void setFetch(FetchType value) {
+        this.fetch = value;
+    }
+
+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link org.apache.openejb.jee.jpa.AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link org.apache.openejb.jee.jpa.AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
+}

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddableAttributes.java
Thu Dec 23 15:58:55 2010
@@ -36,6 +36,12 @@ import javax.xml.bind.annotation.XmlType
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="basic"
type="{http://java.sun.com/xml/ns/persistence/orm}basic"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="many-to-one"
type="{http://java.sun.com/xml/ns/persistence/orm}many-to-one"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="one-to-many"
type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="one-to-one"
type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="many-to-many"
type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="element-collection"
type="{http://java.sun.com/xml/ns/persistence/orm}element-collection"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="embedded"
type="{http://java.sun.com/xml/ns/persistence/orm}embedded"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="transient"
type="{http://java.sun.com/xml/ns/persistence/orm}transient"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
@@ -48,11 +54,28 @@ import javax.xml.bind.annotation.XmlType
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "embeddable-attributes", propOrder = {
    "basic",
+    "manyToOne",
+    "oneToMany",
+    "oneToOne",
+    "manyToMany",
+    "elementCollection",
+    "embedded",
    "_transient"
 })
 public class EmbeddableAttributes {

    protected List<Basic> basic;
+    @XmlElement(name = "many-to-one")
+    protected List<ManyToOne> manyToOne;
+    @XmlElement(name = "one-to-many")
+    protected List<OneToMany> oneToMany;
+    @XmlElement(name = "one-to-one")
+    protected List<OneToOne> oneToOne;
+    @XmlElement(name = "many-to-many")
+    protected List<ManyToMany> manyToMany;
+    @XmlElement(name = "element-collection")
+    protected List<ElementCollection> elementCollection;
+    protected List<Embedded> embedded;
    @XmlElement(name = "transient")
    protected List<Transient> _transient;

@@ -86,6 +109,180 @@ public class EmbeddableAttributes {
    }

    /**
+     * Gets the value of the manyToOne property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
manyToOne property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getManyToOne().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ManyToOne }
+     *
+     *
+     */
+    public List<ManyToOne> getManyToOne() {
+        if (manyToOne == null) {
+            manyToOne = new ArrayList<ManyToOne>();
+        }
+        return this.manyToOne;
+    }
+
+    /**
+     * Gets the value of the oneToMany property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
oneToMany property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOneToMany().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OneToMany }
+     *
+     *
+     */
+    public List<OneToMany> getOneToMany() {
+        if (oneToMany == null) {
+            oneToMany = new ArrayList<OneToMany>();
+        }
+        return this.oneToMany;
+    }
+
+    /**
+     * Gets the value of the oneToOne property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
oneToOne property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getOneToOne().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link OneToOne }
+     *
+     *
+     */
+    public List<OneToOne> getOneToOne() {
+        if (oneToOne == null) {
+            oneToOne = new ArrayList<OneToOne>();
+        }
+        return this.oneToOne;
+    }
+
+    /**
+     * Gets the value of the manyToMany property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
manyToMany property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getManyToMany().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ManyToMany }
+     *
+     *
+     */
+    public List<ManyToMany> getManyToMany() {
+        if (manyToMany == null) {
+            manyToMany = new ArrayList<ManyToMany>();
+        }
+        return this.manyToMany;
+    }
+
+    /**
+     * Gets the value of the elementCollection property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
elementCollection property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getElementCollection().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link ElementCollection }
+     *
+     *
+     */
+    public List<ElementCollection> getElementCollection() {
+        if (elementCollection == null) {
+            elementCollection = new ArrayList<ElementCollection>();
+        }
+        return this.elementCollection;
+    }
+
+    /**
+     * Gets the value of the embedded property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
embedded property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getEmbedded().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Embedded }
+     *
+     *
+     */
+    public List<Embedded> getEmbedded() {
+        if (embedded == null) {
+            embedded = new ArrayList<Embedded>();
+        }
+        return this.embedded;
+    }
+
+    /**
     * Gets the value of the transient property.
     *
     * <p>

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Embedded.java
Thu Dec 23 15:58:55 2010
@@ -44,8 +44,10 @@ import javax.xml.bind.annotation.XmlType
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="attribute-override"
type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;element name="association-override"
type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -55,14 +57,19 @@ import javax.xml.bind.annotation.XmlType
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "embedded", propOrder = {
-    "attributeOverride"
+    "attributeOverride",
+    "associationOverride"
 })
 public class Embedded {

    @XmlElement(name = "attribute-override")
    protected List<AttributeOverride> attributeOverride;
+    @XmlElement(name = "association-override")
+    protected List<AssociationOverride> associationOverride;
    @XmlAttribute(required = true)
    protected String name;
+    @XmlAttribute
+    protected AccessType access;

    /**
     * Gets the value of the attributeOverride property.
@@ -94,6 +101,35 @@ public class Embedded {
    }

    /**
+     * Gets the value of the associationOverride property.
+     *
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the
associationOverride property.
+     *
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAssociationOverride().add(newItem);
+     * </pre>
+     *
+     *
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link AssociationOverride }
+     *
+     *
+     */
+    public List<AssociationOverride> getAssociationOverride() {
+        if (associationOverride == null) {
+            associationOverride = new ArrayList<AssociationOverride>();
+        }
+        return this.associationOverride;
+    }
+
+    /**
     * Gets the value of the name property.
     *
     * @return
@@ -117,4 +153,28 @@ public class Embedded {
        this.name = value;
    }

+    /**
+         * Gets the value of the access property.
+         *
+         * @return
+         *     possible object is
+         *     {@link AccessType }
+         *
+         */
+        public AccessType getAccess() {
+            return access;
+        }
+
+        /**
+         * Sets the value of the access property.
+         *
+         * @param value
+         *     allowed object is
+         *     {@link AccessType }
+         *
+         */
+        public void setAccess(AccessType value) {
+            this.access = value;
+        }
+
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EmbeddedId.java
Thu Dec 23 15:58:55 2010
@@ -46,6 +46,7 @@ import javax.xml.bind.annotation.XmlType
 *         &lt;element name="attribute-override"
type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -63,6 +64,8 @@ public class EmbeddedId {
    protected List<AttributeOverride> attributeOverride;
    @XmlAttribute(required = true)
    protected String name;
+    @XmlAttribute
+    protected AccessType access;

    /**
     * Gets the value of the attributeOverride property.
@@ -117,4 +120,28 @@ public class EmbeddedId {
        this.name = value;
    }

+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
+
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Entity.java
Thu Dec 23 15:58:55 2010
@@ -82,10 +82,11 @@ import javax.xml.bind.annotation.XmlTran
 *         &lt;element name="association-override"
type="{http://java.sun.com/xml/ns/persistence/orm}association-override"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="attributes"
type="{http://java.sun.com/xml/ns/persistence/orm}attributes"
minOccurs="0"/>
 *       &lt;/sequence>
- *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *       &lt;attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="class" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ *       &lt;attribute name="cacheable"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
 *       &lt;attribute name="metadata-complete"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *       &lt;attribute name="name"
type="{http://www.w3.org/2001/XMLSchema}string" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -176,6 +177,8 @@ public class Entity implements Mapping,
    protected AccessType access;
    @XmlAttribute(name = "class", required = true)
    protected String clazz;
+    @XmlAttribute
+    protected Boolean cacheable;
    @XmlAttribute(name = "metadata-complete")
    protected Boolean metadataComplete;
    @XmlAttribute
@@ -902,6 +905,30 @@ public class Entity implements Mapping,
    }

    /**
+     * Gets the value of the cacheable property.
+     *
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *
+     */
+    public Boolean isCacheable() {
+        return cacheable;
+    }
+
+    /**
+     * Sets the value of the cacheable property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *
+     */
+    public void setCacheable(Boolean value) {
+        this.cacheable = value;
+    }
+
+    /**
     * Gets the value of the metadataComplete property.
     *
     * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityListener.java
Thu Dec 23 15:58:55 2010
@@ -41,6 +41,7 @@ import javax.xml.bind.annotation.XmlType
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
+ *         &lt;element name="description"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         &lt;element name="pre-persist"
type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist"
minOccurs="0"/>
 *         &lt;element name="post-persist"
type="{http://java.sun.com/xml/ns/persistence/orm}post-persist"
minOccurs="0"/>
 *         &lt;element name="pre-remove"
type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove"
minOccurs="0"/>
@@ -59,6 +60,7 @@ import javax.xml.bind.annotation.XmlType
 */
 @XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "entity-listener", propOrder = {
+    "description",
    "prePersist",
    "postPersist",
    "preRemove",
@@ -69,6 +71,7 @@ import javax.xml.bind.annotation.XmlType
 })
 public class EntityListener {

+    protected String description;
    @XmlElement(name = "pre-persist")
    protected PrePersist prePersist;
    @XmlElement(name = "post-persist")
@@ -87,6 +90,30 @@ public class EntityListener {
    protected String clazz;

    /**
+     * Gets the value of the description property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getDescription() {
+        return description;
+    }
+
+    /**
+     * Sets the value of the description property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setDescription(String value) {
+        this.description = value;
+    }
+
+    /**
     * Gets the value of the prePersist property.
     *
     * @return

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EntityMappings.java
Thu Dec 23 15:58:55 2010
@@ -35,7 +35,7 @@ import javax.xml.bind.annotation.adapter
 /**
 *
 *
- *         The entity-mappings element is the root element of an mapping
+ *         The entity-mappings element is the root element of a mapping
 *         file. It contains the following four types of elements:
 *
 *         1. The persistence-unit-metadata element contains metadata
@@ -51,9 +51,9 @@ import javax.xml.bind.annotation.adapter
 *         to the persistence unit. It is undefined to have more than one
 *         sequence-generator or table-generator of the same name in the same
 *         or different mapping files in a persistence unit. It is also
- *         undefined to have more than one named-query or named-native-query
- *         of the same name in the same or different mapping files in a
- *         persistence unit.
+ *         undefined to have more than one named-query, named-native-query, or
+ *         result-set-mapping of the same name in the same or different mapping
+ *         files in a persistence unit.
 *
 *         4. The entity, mapped-superclass and embeddable elements each define
 *         the mapping information for a managed persistent class. The mapping
@@ -86,7 +86,7 @@ import javax.xml.bind.annotation.adapter
 *         &lt;element name="entity"
type="{http://java.sun.com/xml/ns/persistence/orm}entity"
maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="embeddable"
type="{http://java.sun.com/xml/ns/persistence/orm}embeddable"
maxOccurs="unbounded" minOccurs="0"/>
 *       &lt;/sequence>
- *       &lt;attribute name="version" use="required"
type="{http://java.sun.com/xml/ns/persistence/orm}versionType"
fixed="1.0" />
+ *       &lt;attribute name="version" use="required"
type="{http://java.sun.com/xml/ns/persistence/orm}versionType"
fixed="2.0" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -138,7 +138,7 @@ public class EntityMappings {
    protected List<Embeddable> embeddable;
    @XmlAttribute(required = true)
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
-    protected String version = "1.0";
+    protected String version = "2.0";

    /**
     * Gets the value of the description property.
@@ -534,7 +534,7 @@ public class EntityMappings {
     */
    public String getVersion() {
        if (version == null) {
-            return "1.0";
+            return "2.0";
        } else {
            return version;
        }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/EnumType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "enum-type")
 @XmlEnum
 public enum EnumType {


Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/FetchType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -35,6 +36,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "fetch-type")
 @XmlEnum
 public enum FetchType {


Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/GenerationType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -37,6 +38,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "generation-type")
 @XmlEnum
 public enum GenerationType {


Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Id.java
Thu Dec 23 15:58:55 2010
@@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
 *         &lt;element name="sequence-generator"
type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator"
minOccurs="0"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required"
type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       &lt;attribute name="access"
type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
@@ -75,6 +76,8 @@ public class Id implements Field {
    protected SequenceGenerator sequenceGenerator;
    @XmlAttribute(required = true)
    protected String name;
+    @XmlAttribute
+    protected AccessType access;

    public Id() {
    }
@@ -235,4 +238,28 @@ public class Id implements Field {
    public Object getKey() {
        return name;
    }
+
+    /**
+     * Gets the value of the access property.
+     *
+     * @return
+     *     possible object is
+     *     {@link AccessType }
+     *
+     */
+    public AccessType getAccess() {
+        return access;
+    }
+
+    /**
+     * Sets the value of the access property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link AccessType }
+     *
+     */
+    public void setAccess(AccessType value) {
+        this.access = value;
+    }
 }

Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
(original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
Thu Dec 23 15:58:55 2010
@@ -18,6 +18,7 @@
 package org.apache.openejb.jee.jpa;

 import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;


 /**
@@ -36,6 +37,7 @@ import javax.xml.bind.annotation.XmlEnum
 * </pre>
 *
 */
+@XmlType(name = "inheritance-type")
 @XmlEnum
 public enum InheritanceType {


Added: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
(added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/LockModeType.java
Thu Dec 23 15:58:55 2010
@@ -0,0 +1,66 @@
+/**
+ * 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.
+ */
+
+package org.apache.openejb.jee.jpa;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for lock-mode-type.
+ *
+ * <p>The following schema fragment specifies the expected content
contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="lock-mode-type">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ *     &lt;enumeration value="READ"/>
+ *     &lt;enumeration value="WRITE"/>
+ *     &lt;enumeration value="OPTIMISTIC"/>
+ *     &lt;enumeration value="OPTIMISTIC_FORCE_INCREMENT"/>
+ *     &lt;enumeration value="PESSIMISTIC_READ"/>
+ *     &lt;enumeration value="PESSIMISTIC_WRITE"/>
+ *     &lt;enumeration value="PESSIMISTIC_FORCE_INCREMENT"/>
+ *     &lt;enumeration value="NONE"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ *
+ */
+@XmlType(name = "lock-mode-type")
+@XmlEnum
+public enum LockModeType {
+
+    READ,
+    WRITE,
+    OPTIMISTIC,
+    OPTIMISTIC_FORCE_INCREMENT,
+    PESSIMISTIC_READ,
+    PESSIMISTIC_WRITE,
+    PESSIMISTIC_FORCE_INCREMENT,
+    NONE;
+
+    public String value() {
+        return name();
+    }
+
+    public static LockModeType fromValue(String v) {
+        return valueOf(v);
+    }
+
+}