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 [3/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/
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostLoad.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="post-load">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "post-load")
+@XmlType(name = "post-load", propOrder = {
+ "description"
+})
public class PostLoad {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostPersist.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="post-persist">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "post-persist")
+@XmlType(name = "post-persist", propOrder = {
+ "description"
+})
public class PostPersist {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostRemove.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="post-remove">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "post-remove")
+@XmlType(name = "post-remove", propOrder = {
+ "description"
+})
public class PostRemove {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PostUpdate.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="post-update">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "post-update")
+@XmlType(name = "post-update", propOrder = {
+ "description"
+})
public class PostUpdate {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PrePersist.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="pre-persist">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "pre-persist")
+@XmlType(name = "pre-persist", propOrder = {
+ "description"
+})
public class PrePersist {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreRemove.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="pre-remove">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "pre-remove")
+@XmlType(name = "pre-remove", propOrder = {
+ "description"
+})
public class PreRemove {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/PreUpdate.java Thu Dec 23 15:58:55 2010
@@ -39,6 +39,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="pre-update">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="method-name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
@@ -48,13 +51,40 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "pre-update")
+@XmlType(name = "pre-update", propOrder = {
+ "description"
+})
public class PreUpdate {
+ protected String description;
@XmlAttribute(name = "method-name", required = true)
protected String methodName;
/**
+ * 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 methodName property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/QueryHint.java Thu Dec 23 15:58:55 2010
@@ -42,6 +42,9 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="query-hint">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
@@ -52,15 +55,42 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "query-hint")
+@XmlType(name = "query-hint", propOrder = {
+ "description"
+})
public class QueryHint {
+ protected String description;
@XmlAttribute(required = true)
protected String name;
@XmlAttribute(required = true)
protected String value;
/**
+ * 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 name property.
*
* @return
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SequenceGenerator.java Thu Dec 23 15:58:55 2010
@@ -30,6 +30,8 @@ import javax.xml.bind.annotation.XmlType
* public @interface SequenceGenerator {
* String name();
* String sequenceName() default "";
+ * String catalog() default "";
+ * String schema() default "";
* int initialValue() default 1;
* int allocationSize() default 50;
* }
@@ -44,10 +46,15 @@ import javax.xml.bind.annotation.XmlType
* <complexType name="sequence-generator">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <attribute name="allocation-size" type="{http://www.w3.org/2001/XMLSchema}int" />
- * <attribute name="initial-value" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * </sequence>
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="sequence-name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="initial-value" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="allocation-size" type="{http://www.w3.org/2001/XMLSchema}int" />
* </restriction>
* </complexContent>
* </complexType>
@@ -56,9 +63,12 @@ import javax.xml.bind.annotation.XmlType
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "sequence-generator")
+@XmlType(name = "sequence-generator", propOrder = {
+ "description"
+})
public class SequenceGenerator {
+ protected String description;
@XmlAttribute(name = "allocation-size")
protected Integer allocationSize;
@XmlAttribute(name = "initial-value")
@@ -67,6 +77,34 @@ public class SequenceGenerator {
protected String name;
@XmlAttribute(name = "sequence-name")
protected String sequenceName;
+ @XmlAttribute
+ protected String catalog;
+ @XmlAttribute
+ protected String schema;
+
+ /**
+ * 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 allocationSize property.
@@ -164,4 +202,52 @@ public class SequenceGenerator {
this.sequenceName = 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/SqlResultSetMapping.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/SqlResultSetMapping.java Thu Dec 23 15:58:55 2010
@@ -47,6 +47,7 @@ import javax.xml.bind.annotation.XmlType
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="entity-result" type="{http://java.sun.com/xml/ns/persistence/orm}entity-result" maxOccurs="unbounded" minOccurs="0"/>
* <element name="column-result" type="{http://java.sun.com/xml/ns/persistence/orm}column-result" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
@@ -60,11 +61,13 @@ import javax.xml.bind.annotation.XmlType
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "sql-result-set-mapping", propOrder = {
+ "description",
"entityResult",
"columnResult"
})
public class SqlResultSetMapping {
+ protected String description;
@XmlElement(name = "entity-result")
protected List<EntityResult> entityResult;
@XmlElement(name = "column-result")
@@ -73,6 +76,30 @@ public class SqlResultSetMapping {
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 entityResult property.
*
* <p>
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TableGenerator.java Thu Dec 23 15:58:55 2010
@@ -54,17 +54,18 @@ import javax.xml.bind.annotation.XmlType
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
+ * <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
- * <attribute name="allocation-size" type="{http://www.w3.org/2001/XMLSchema}int" />
- * <attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="initial-value" type="{http://www.w3.org/2001/XMLSchema}int" />
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="pk-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="pk-column-value" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="pk-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="value-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="pk-column-value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="initial-value" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="allocation-size" type="{http://www.w3.org/2001/XMLSchema}int" />
* </restriction>
* </complexContent>
* </complexType>
@@ -74,10 +75,12 @@ import javax.xml.bind.annotation.XmlType
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "table-generator", propOrder = {
+ "description",
"uniqueConstraint"
})
public class TableGenerator {
+ protected String description;
@XmlElement(name = "unique-constraint")
protected List<UniqueConstraint> uniqueConstraint;
@XmlAttribute(name = "allocation-size")
@@ -100,6 +103,30 @@ public class TableGenerator {
protected String valueColumnName;
/**
+ * 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 uniqueConstraint property.
*
* <p>
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/TemporalType.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 = "temporal-type")
@XmlEnum
public enum TemporalType {
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/UniqueConstraint.java Thu Dec 23 15:58:55 2010
@@ -21,6 +21,7 @@ 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;
@@ -30,6 +31,7 @@ import javax.xml.bind.annotation.XmlType
*
* @Target({}) @Retention(RUNTIME)
* public @interface UniqueConstraint {
+ * String name() default "";
* String[] columnNames();
* }
*
@@ -46,6 +48,7 @@ import javax.xml.bind.annotation.XmlType
* <sequence>
* <element name="column-name" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* </sequence>
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
@@ -61,6 +64,8 @@ public class UniqueConstraint {
@XmlElement(name = "column-name", required = true)
protected List<String> columnName;
+ @XmlAttribute
+ protected String name;
/**
* Gets the value of the columnName property.
@@ -91,4 +96,28 @@ public class UniqueConstraint {
return this.columnName;
}
+ /**
+ * 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;
+ }
+
}
Modified: openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Version.java Thu Dec 23 15:58:55 2010
@@ -44,6 +44,7 @@ import javax.xml.bind.annotation.XmlType
* <element name="temporal" type="{http://java.sun.com/xml/ns/persistence/orm}temporal" minOccurs="0"/>
* </sequence>
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
* </restriction>
* </complexContent>
* </complexType>
@@ -62,6 +63,8 @@ public class Version {
protected TemporalType temporal;
@XmlAttribute(required = true)
protected String name;
+ @XmlAttribute
+ protected AccessType access;
/**
* Gets the value of the column property.
@@ -135,4 +138,28 @@ public class Version {
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/test/java/org/apache/openejb/jee/jpa/JaxbTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/JaxbTest.java Thu Dec 23 15:58:55 2010
@@ -22,6 +22,7 @@ import java.io.InputStream;
import java.io.IOException;
import java.io.BufferedInputStream;
+import org.custommonkey.xmlunit.DetailedDiff;
import org.custommonkey.xmlunit.Diff;
/**
@@ -31,6 +32,7 @@ public class JaxbTest extends TestCase {
public void testEntityMappings() throws Exception {
unmarshalAndMarshal(EntityMappings.class, "jpa-mapping-full.xml");
+ unmarshalAndMarshal(EntityMappings.class, "jpa-mapping-full_2.0.xml");
}
private <T> void unmarshalAndMarshal(Class<T> type, java.lang.String xmlFileName) throws Exception {
Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/java/org/apache/openejb/jee/jpa/PersistenceXmlTest.java Thu Dec 23 15:58:55 2010
@@ -42,37 +42,9 @@ import org.custommonkey.xmlunit.Diff;
public class PersistenceXmlTest extends TestCase {
/**
- * TODO: What does the test test out? The comparision using assertEquals doesn't seem to work well with xml files.
- *
* @throws Exception
*/
- public void testAll() throws Exception {
-// Persistence persistence = new Persistence();
-// persistence.setVersion("1.0");
-// Persistence.PersistenceUnit persistenceUnit = new Persistence.PersistenceUnit();
-// persistenceUnit.setDescription("description");
-// persistenceUnit.setExcludeUnlistedClasses(true);
-// persistenceUnit.setJtaDataSource("jtadatasource");
-// persistenceUnit.setName("name");
-// persistenceUnit.setNonJtaDataSource("nonjtadatasource");
-// persistenceUnit.setProvider("org.acme.Provider");
-// persistenceUnit.setTransactionType(TransactionType.JTA);
-// persistenceUnit.getClazz().add("org.acme.Person");
-// persistenceUnit.getClazz().add("org.acme.Animal");
-// persistenceUnit.getJarFile().add("jarfile1");
-// persistenceUnit.getJarFile().add("jarfile2");
-// persistenceUnit.getMappingFile().add("mappingfile1");
-// persistenceUnit.getMappingFile().add("mappingfile2");
-//
-// Persistence.PersistenceUnit.Properties properties = new Persistence.PersistenceUnit.Properties();
-// properties.setProperty("foo","oof");
-// properties.setProperty("bar","rab");
-// properties.setProperty("baz","zab");
-// persistenceUnit.setProperties(properties);
-//
-// persistenceUnit.setProperties(properties);
-// persistence.getPersistenceUnit().add(persistenceUnit);
-
+ public void testPersistenceVersion1() throws Exception {
JAXBContext ctx = JAXBContextFactory.newInstance(Persistence.class);
Unmarshaller unmarshaller = ctx.createUnmarshaller();
@@ -95,6 +67,33 @@ public class PersistenceXmlTest extends
Diff myDiff = new Diff(expected, actual);
assertTrue("Files are similar " + myDiff, myDiff.similar());
}
+
+ /**
+ * @throws Exception
+ */
+ public void testPersistenceVersion2() throws Exception {
+ JAXBContext ctx = JAXBContextFactory.newInstance(Persistence.class);
+ Unmarshaller unmarshaller = ctx.createUnmarshaller();
+
+ URL resource = this.getClass().getClassLoader().getResource("persistence_2.0-example.xml");
+ InputStream in = resource.openStream();
+ java.lang.String expected = readContent(in);
+
+ Persistence element = (Persistence) unmarshaller.unmarshal(new ByteArrayInputStream(expected.getBytes()));
+ unmarshaller.setEventHandler(new TestValidationEventHandler());
+ System.out.println("unmarshalled");
+
+ Marshaller marshaller = ctx.createMarshaller();
+ marshaller.setProperty("jaxb.formatted.output", true);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ marshaller.marshal(element, baos);
+
+ String actual = new String(baos.toByteArray());
+
+ Diff myDiff = new Diff(expected, actual);
+ assertTrue("Files are similar " + myDiff, myDiff.similar());
+ }
private java.lang.String readContent(InputStream in) throws IOException {
StringBuffer sb = new StringBuffer();
Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full.xml Thu Dec 23 15:58:55 2010
@@ -18,7 +18,10 @@
-->
<!-- $Rev$ $Date$ -->
-<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" version="1.0">
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
+ version="1.0">
<description>String</description>
<persistence-unit-metadata>
<xml-mapping-metadata-complete/>
Added: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/jpa-mapping-full_2.0.xml Thu Dec 23 15:58:55 2010
@@ -0,0 +1,567 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ 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.
+-->
+<!-- $Rev: 662644 $ $Date: 2008-06-03 06:46:16 +0200 (mar., 03 juin 2008) $ -->
+
+<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
+ version="2.0">
+ <description>String</description>
+ <persistence-unit-metadata>
+ <description>String</description>
+ <xml-mapping-metadata-complete/>
+ <persistence-unit-defaults>
+ <description>String</description>
+ <schema>String</schema>
+ <catalog>String</catalog>
+ <delimited-identifiers/>
+ <access>PROPERTY</access>
+ <cascade-persist/>
+ <entity-listeners>
+ <entity-listener class="String">
+ <description>String</description>
+ <pre-persist method-name="String">
+ <description>String</description>
+ </pre-persist>
+ <post-persist method-name="String">
+ <description>String</description>
+ </post-persist>
+ <pre-remove method-name="String">
+ <description>String</description>
+ </pre-remove>
+ <post-remove method-name="String">
+ <description>String</description>
+ </post-remove>
+ <pre-update method-name="String">
+ <description>String</description>
+ </pre-update>
+ <post-update method-name="String">
+ <description>String</description>
+ </post-update>
+ <post-load method-name="String">
+ <description>String</description>
+ </post-load>
+ </entity-listener>
+ </entity-listeners>
+ </persistence-unit-defaults>
+ </persistence-unit-metadata>
+ <package>String</package>
+ <schema>String</schema>
+ <catalog>String</catalog>
+ <access>PROPERTY</access>
+ <sequence-generator schema="String" catalog="String" sequence-name="String" name="String" initial-value="0" allocation-size="0">
+ <description>String</description>
+ </sequence-generator>
+ <table-generator value-column-name="String" table="String" schema="String" pk-column-value="String" pk-column-name="String" name="String" initial-value="0" catalog="String" allocation-size="0">
+ <description>String</description>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </table-generator>
+ <named-query name="String">
+ <description>String</description>
+ <query>String</query>
+ <lock-mode>READ</lock-mode>
+ <hint value="String" name="String">
+ <description>String</description>
+ </hint>
+ </named-query>
+ <named-native-query result-set-mapping="String" result-class="String" name="String">
+ <description>String</description>
+ <query>String</query>
+ <hint value="String" name="String">
+ <description>String</description>
+ </hint>
+ </named-native-query>
+ <sql-result-set-mapping name="String">
+ <description>String</description>
+ <entity-result entity-class="String" discriminator-column="String">
+ <field-result name="String" column="String"/>
+ </entity-result>
+ <column-result name="String"/>
+ </sql-result-set-mapping>
+ <mapped-superclass metadata-complete="true" class="String" access="PROPERTY">
+ <description>String</description>
+ <id-class class="String"/>
+ <exclude-default-listeners/>
+ <exclude-superclass-listeners/>
+ <entity-listeners>
+ <entity-listener class="String">
+ <description>String</description>
+ <pre-persist method-name="String">
+ <description>String</description>
+ </pre-persist>
+ <post-persist method-name="String">
+ <description>String</description>
+ </post-persist>
+ <pre-remove method-name="String">
+ <description>String</description>
+ </pre-remove>
+ <post-remove method-name="String">
+ <description>String</description>
+ </post-remove>
+ <pre-update method-name="String">
+ <description>String</description>
+ </pre-update>
+ <post-update method-name="String">
+ <description>String</description>
+ </post-update>
+ <post-load method-name="String">
+ <description>String</description>
+ </post-load>
+ </entity-listener>
+ </entity-listeners>
+ <pre-persist method-name="String">
+ <description>String</description>
+ </pre-persist>
+ <post-persist method-name="String">
+ <description>String</description>
+ </post-persist>
+ <pre-remove method-name="String">
+ <description>String</description>
+ </pre-remove>
+ <post-remove method-name="String">
+ <description>String</description>
+ </post-remove>
+ <pre-update method-name="String">
+ <description>String</description>
+ </pre-update>
+ <post-update method-name="String">
+ <description>String</description>
+ </post-update>
+ <post-load method-name="String">
+ <description>String</description>
+ </post-load>
+ <attributes>
+ <description>String</description>
+ <id access="PROPERTY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <generated-value strategy="TABLE" generator="String"/>
+ <temporal>DATE</temporal>
+ <table-generator value-column-name="String" table="String" schema="String" pk-column-value="String" pk-column-name="String" name="String" initial-value="0" catalog="String" allocation-size="0">
+ <description>String</description>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </table-generator>
+ <sequence-generator schema="String" catalog="String" sequence-name="String" name="String" initial-value="0" allocation-size="0">
+ <description>String</description>
+ </sequence-generator>
+ </id>
+ <basic access="PROPERTY" optional="true" fetch="LAZY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <lob/>
+ </basic>
+ <version access="PROPERTY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <temporal>DATE</temporal>
+ </version>
+ <many-to-one id="true" maps-id="String" access="PROPERTY" target-entity="String" optional="true" name="String" fetch="LAZY">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-one>
+ <one-to-many target-entity="String" name="String" orphan-removal="true" mapped-by="String" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-many>
+ <one-to-one target-entity="String" optional="true" name="String" id="true" maps-id="String" orphan-removal="true" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <primary-key-join-column referenced-column-name="String" name="String" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-one>
+ <many-to-many target-entity="String" name="String" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-many>
+ <element-collection access="PROPERTY" fetch="LAZY" target-class="String" name="String">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <temporal>DATE</temporal>
+ <collection-table schema="String" catalog="String" name="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </collection-table>
+ </element-collection>
+ <embedded access="PROPERTY" name="String">
+ <attribute-override name="String">
+ <description>String</description>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ </attribute-override>
+ <association-override name="String">
+ <description>String</description>
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ </association-override>
+ </embedded>
+ <transient name="String"/>
+ </attributes>
+ </mapped-superclass>
+ <entity name="String" metadata-complete="true" cacheable="true" class="String" access="PROPERTY">
+ <description>String</description>
+ <table schema="String" name="String" catalog="String">
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </table>
+ <secondary-table schema="String" name="String" catalog="String">
+ <primary-key-join-column referenced-column-name="String" name="String" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </secondary-table>
+ <primary-key-join-column referenced-column-name="String" name="String" column-definition="String"/>
+ <id-class class="String"/>
+ <inheritance strategy="SINGLE_TABLE"/>
+ <discriminator-value>String</discriminator-value>
+ <discriminator-column name="String" length="0" discriminator-type="STRING" column-definition="String"/>
+ <sequence-generator schema="String" catalog="String" sequence-name="String" name="String" initial-value="0" allocation-size="0">
+ <description>String</description>
+ </sequence-generator>
+ <table-generator value-column-name="String" table="String" schema="String" pk-column-value="String" pk-column-name="String" name="String" initial-value="0" catalog="String" allocation-size="0">
+ <description>String</description>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </table-generator>
+ <named-query name="String">
+ <description>String</description>
+ <query>String</query>
+ <lock-mode>READ</lock-mode>
+ <hint value="String" name="String">
+ <description>String</description>
+ </hint>
+ </named-query>
+ <named-native-query result-set-mapping="String" result-class="String" name="String">
+ <description>String</description>
+ <query>String</query>
+ <hint value="String" name="String">
+ <description>String</description>
+ </hint>
+ </named-native-query>
+ <sql-result-set-mapping name="String">
+ <description>String</description>
+ <entity-result entity-class="String" discriminator-column="String">
+ <field-result name="String" column="String"/>
+ </entity-result>
+ <column-result name="String"/>
+ </sql-result-set-mapping>
+ <exclude-default-listeners/>
+ <exclude-superclass-listeners/>
+ <entity-listeners>
+ <entity-listener class="String">
+ <description>String</description>
+ <pre-persist method-name="String">
+ <description>String</description>
+ </pre-persist>
+ <post-persist method-name="String">
+ <description>String</description>
+ </post-persist>
+ <pre-remove method-name="String">
+ <description>String</description>
+ </pre-remove>
+ <post-remove method-name="String">
+ <description>String</description>
+ </post-remove>
+ <pre-update method-name="String">
+ <description>String</description>
+ </pre-update>
+ <post-update method-name="String">
+ <description>String</description>
+ </post-update>
+ <post-load method-name="String">
+ <description>String</description>
+ </post-load>
+ </entity-listener>
+ </entity-listeners>
+ <pre-persist method-name="String">
+ <description>String</description>
+ </pre-persist>
+ <post-persist method-name="String">
+ <description>String</description>
+ </post-persist>
+ <pre-remove method-name="String">
+ <description>String</description>
+ </pre-remove>
+ <post-remove method-name="String">
+ <description>String</description>
+ </post-remove>
+ <pre-update method-name="String">
+ <description>String</description>
+ </pre-update>
+ <post-update method-name="String">
+ <description>String</description>
+ </post-update>
+ <post-load method-name="String">
+ <description>String</description>
+ </post-load>
+ <attribute-override name="String">
+ <description>String</description>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ </attribute-override>
+ <association-override name="String">
+ <description>String</description>
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ </association-override>
+ <attributes>
+ <description>String</description>
+ <id access="PROPERTY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <generated-value strategy="TABLE" generator="String"/>
+ <temporal>DATE</temporal>
+ <table-generator value-column-name="String" table="String" schema="String" pk-column-value="String" pk-column-name="String" name="String" initial-value="0" catalog="String" allocation-size="0">
+ <description>String</description>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </table-generator>
+ <sequence-generator schema="String" catalog="String" sequence-name="String" name="String" initial-value="0" allocation-size="0">
+ <description>String</description>
+ </sequence-generator>
+ </id>
+ <basic access="PROPERTY" optional="true" fetch="LAZY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <lob/>
+ </basic>
+ <version access="PROPERTY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <temporal>DATE</temporal>
+ </version>
+ <many-to-one id="true" maps-id="String" access="PROPERTY" target-entity="String" optional="true" name="String" fetch="LAZY">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-one>
+ <one-to-many target-entity="String" name="String" orphan-removal="true" mapped-by="String" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-many>
+ <one-to-one target-entity="String" optional="true" name="String" id="true" maps-id="String" orphan-removal="true" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <primary-key-join-column referenced-column-name="String" name="String" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-one>
+ <many-to-many target-entity="String" name="String" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-many>
+ <element-collection access="PROPERTY" fetch="LAZY" target-class="String" name="String">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <temporal>DATE</temporal>
+ <collection-table schema="String" catalog="String" name="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </collection-table>
+ </element-collection>
+ <embedded access="PROPERTY" name="String">
+ <attribute-override name="String">
+ <description>String</description>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ </attribute-override>
+ <association-override name="String">
+ <description>String</description>
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ </association-override>
+ </embedded>
+ <transient name="String"/>
+ </attributes>
+ </entity>
+ <embeddable metadata-complete="true" class="String" access="PROPERTY">
+ <description>String</description>
+ <attributes>
+ <basic access="PROPERTY" optional="true" fetch="LAZY" name="String">
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <lob/>
+ </basic>
+ <many-to-one id="true" maps-id="String" access="PROPERTY" target-entity="String" optional="true" name="String" fetch="LAZY">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-one>
+ <one-to-many target-entity="String" name="String" orphan-removal="true" mapped-by="String" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-many>
+ <one-to-one target-entity="String" optional="true" name="String" id="true" maps-id="String" orphan-removal="true" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <primary-key-join-column referenced-column-name="String" name="String" column-definition="String"/>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </one-to-one>
+ <many-to-many target-entity="String" name="String" mapped-by="String" access="PROPERTY" fetch="LAZY">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <join-table schema="String" name="String" catalog="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <inverse-join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </join-table>
+ <cascade>
+ <cascade-all/>
+ <cascade-persist/>
+ <cascade-merge/>
+ <cascade-remove/>
+ <cascade-refresh/>
+ <cascade-detach/>
+ </cascade>
+ </many-to-many>
+ <element-collection access="PROPERTY" fetch="LAZY" target-class="String" name="String">
+ <order-by>String</order-by>
+ <map-key name="String"/>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ <temporal>DATE</temporal>
+ <collection-table schema="String" catalog="String" name="String">
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ <unique-constraint name="String">
+ <column-name>String</column-name>
+ </unique-constraint>
+ </collection-table>
+ </element-collection>
+ <embedded access="PROPERTY" name="String">
+ <attribute-override name="String">
+ <description>String</description>
+ <column updatable="true" unique="true" table="String" scale="0" precision="0" nullable="true" name="String" length="0" insertable="true" column-definition="String"/>
+ </attribute-override>
+ <association-override name="String">
+ <description>String</description>
+ <join-column updatable="true" unique="true" table="String" referenced-column-name="String" nullable="true" name="String" insertable="true" column-definition="String"/>
+ </association-override>
+ </embedded>
+ <transient name="String"/>
+ </attributes>
+ </embeddable>
+</entity-mappings>
Modified: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml?rev=1052305&r1=1052304&r2=1052305&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml (original)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence-example.xml Thu Dec 23 15:58:55 2010
@@ -19,7 +19,10 @@
<!-- $Rev$ $Date$ -->
-<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ version="1.0">
<persistence-unit transaction-type="JTA" name="foo">
<description>description</description>
<provider>org.acme.Provider</provider>
Added: openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml?rev=1052305&view=auto
==============================================================================
--- openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml (added)
+++ openejb/trunk/openejb3/container/openejb-jee/src/test/resources/persistence_2.0-example.xml Thu Dec 23 15:58:55 2010
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+ 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.
+-->
+
+<!-- $Rev$ -->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+ version="2.0">
+ <persistence-unit transaction-type="JTA" name="foo">
+ <description>description</description>
+ <provider>org.acme.Provider</provider>
+ <jta-data-source>jtadatasource</jta-data-source>
+ <non-jta-data-source>nonjtadatasource</non-jta-data-source>
+ <mapping-file>mappingfile1</mapping-file>
+ <mapping-file>mappingfile2</mapping-file>
+ <jar-file>jarfile1</jar-file>
+ <jar-file>jarfile2</jar-file>
+ <class>org.acme.Person</class>
+ <class>org.acme.Animal</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ <shared-cache-mode>ALL</shared-cache-mode>
+ <validation-mode>AUTO</validation-mode>
+ <properties>
+ <property value="rab" name="bar"/>
+ <property value="zab" name="baz"/>
+ <property value="oof" name="foo"/>
+ </properties>
+ </persistence-unit>
+ <persistence-unit transaction-type="RESOURCE_LOCAL" name="bar">
+ <description>description2</description>
+ <provider>org.acme.Provider2</provider>
+ <jta-data-source>jtadatasource2</jta-data-source>
+ <non-jta-data-source>nonjtadatasource2</non-jta-data-source>
+ <mapping-file>mappingfile12</mapping-file>
+ <mapping-file>mappingfile22</mapping-file>
+ <jar-file>jarfile12</jar-file>
+ <jar-file>jarfile22</jar-file>
+ <class>org.acme.Person2</class>
+ <class>org.acme.Animal2</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+ <properties>
+ <property value="rab2" name="bar2"/>
+ <property value="oof2" name="foo2"/>
+ <property value="zab2" name="baz2"/>
+ </properties>
+ </persistence-unit>
+</persistence>