You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2006/12/20 01:13:44 UTC
svn commit: r488864 [13/23] - in
/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee:
./ jba/ jba/cmp/ jpa/ oej2/ sun/
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Inheritance.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Inheritance.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Inheritance.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Inheritance.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,83 @@
+/**
+ * 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.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ * @Target({TYPE}) @Retention(RUNTIME)
+ * public @interface Inheritance {
+ * InheritanceType strategy() default SINGLE_TABLE;
+ * }
+ *
+ *
+ *
+ * <p>Java class for inheritance complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="inheritance">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <attribute name="strategy" type="{http://java.sun.com/xml/ns/persistence/orm}inheritance-type" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "inheritance")
+public class Inheritance {
+
+ @XmlAttribute
+ protected InheritanceType strategy;
+
+ /**
+ * Gets the value of the strategy property.
+ *
+ * @return
+ * possible object is
+ * {@link InheritanceType }
+ *
+ */
+ public InheritanceType getStrategy() {
+ return strategy;
+ }
+
+ /**
+ * Sets the value of the strategy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InheritanceType }
+ *
+ */
+ public void setStrategy(InheritanceType value) {
+ this.strategy = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/InheritanceType.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,54 @@
+/**
+ * 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;
+
+
+/**
+ * <p>Java class for inheritance-type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * <simpleType name="inheritance-type">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}token">
+ * <enumeration value="SINGLE_TABLE"/>
+ * <enumeration value="JOINED"/>
+ * <enumeration value="TABLE_PER_CLASS"/>
+ * </restriction>
+ * </simpleType>
+ * </pre>
+ *
+ */
+@XmlEnum
+public enum InheritanceType {
+
+ SINGLE_TABLE,
+ JOINED,
+ TABLE_PER_CLASS;
+
+ public String value() {
+ return name();
+ }
+
+ public static InheritanceType fromValue(String v) {
+ return valueOf(v);
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinColumn.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinColumn.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinColumn.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinColumn.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,279 @@
+/**
+ * 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.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ * @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ * public @interface JoinColumn {
+ * String name() default "";
+ * String referencedColumnName() default "";
+ * boolean unique() default false;
+ * boolean nullable() default true;
+ * boolean insertable() default true;
+ * boolean updatable() default true;
+ * String columnDefinition() default "";
+ * String table() default "";
+ * }
+ *
+ *
+ *
+ * <p>Java class for join-column complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="join-column">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <attribute name="column-definition" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="insertable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="nullable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="referenced-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="updatable" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "join-column")
+public class JoinColumn {
+
+ @XmlAttribute(name = "column-definition")
+ protected String columnDefinition;
+ @XmlAttribute
+ protected Boolean insertable;
+ @XmlAttribute
+ protected String name;
+ @XmlAttribute
+ protected Boolean nullable;
+ @XmlAttribute(name = "referenced-column-name")
+ protected String referencedColumnName;
+ @XmlAttribute
+ protected String table;
+ @XmlAttribute
+ protected Boolean unique;
+ @XmlAttribute
+ protected Boolean updatable;
+
+ /**
+ * Gets the value of the columnDefinition property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getColumnDefinition() {
+ return columnDefinition;
+ }
+
+ /**
+ * Sets the value of the columnDefinition property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setColumnDefinition(String value) {
+ this.columnDefinition = value;
+ }
+
+ /**
+ * Gets the value of the insertable property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isInsertable() {
+ return insertable;
+ }
+
+ /**
+ * Sets the value of the insertable property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setInsertable(Boolean value) {
+ this.insertable = 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 nullable property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isNullable() {
+ return nullable;
+ }
+
+ /**
+ * Sets the value of the nullable property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setNullable(Boolean value) {
+ this.nullable = value;
+ }
+
+ /**
+ * Gets the value of the referencedColumnName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getReferencedColumnName() {
+ return referencedColumnName;
+ }
+
+ /**
+ * Sets the value of the referencedColumnName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setReferencedColumnName(String value) {
+ this.referencedColumnName = value;
+ }
+
+ /**
+ * Gets the value of the table property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTable() {
+ return table;
+ }
+
+ /**
+ * Sets the value of the table property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTable(String value) {
+ this.table = value;
+ }
+
+ /**
+ * Gets the value of the unique property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isUnique() {
+ return unique;
+ }
+
+ /**
+ * Sets the value of the unique property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setUnique(Boolean value) {
+ this.unique = value;
+ }
+
+ /**
+ * Gets the value of the updatable property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isUpdatable() {
+ return updatable;
+ }
+
+ /**
+ * Sets the value of the updatable property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setUpdatable(Boolean value) {
+ this.updatable = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinTable.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinTable.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinTable.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/JoinTable.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,247 @@
+/**
+ * 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 JoinTable {
+ * String name() default "";
+ * String catalog() default "";
+ * String schema() default "";
+ * JoinColumn[] joinColumns() default {};
+ * JoinColumn[] inverseJoinColumns() default {};
+ * UniqueConstraint[] uniqueConstraints() default {};
+ * }
+ *
+ *
+ *
+ * <p>Java class for join-table complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="join-table">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="inverse-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "join-table", propOrder = {
+ "joinColumn",
+ "inverseJoinColumn",
+ "uniqueConstraint"
+})
+public class JoinTable {
+
+ @XmlElement(name = "join-column")
+ protected List<JoinColumn> joinColumn;
+ @XmlElement(name = "inverse-join-column")
+ protected List<JoinColumn> inverseJoinColumn;
+ @XmlElement(name = "unique-constraint")
+ protected List<UniqueConstraint> uniqueConstraint;
+ @XmlAttribute
+ protected String catalog;
+ @XmlAttribute
+ protected String name;
+ @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 JoinColumn }
+ *
+ *
+ */
+ public List<JoinColumn> getJoinColumn() {
+ if (joinColumn == null) {
+ joinColumn = new ArrayList<JoinColumn>();
+ }
+ return this.joinColumn;
+ }
+
+ /**
+ * Gets the value of the inverseJoinColumn 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 inverseJoinColumn property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getInverseJoinColumn().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link JoinColumn }
+ *
+ *
+ */
+ public List<JoinColumn> getInverseJoinColumn() {
+ if (inverseJoinColumn == null) {
+ inverseJoinColumn = new ArrayList<JoinColumn>();
+ }
+ return this.inverseJoinColumn;
+ }
+
+ /**
+ * 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 UniqueConstraint }
+ *
+ *
+ */
+ public List<UniqueConstraint> getUniqueConstraint() {
+ if (uniqueConstraint == null) {
+ uniqueConstraint = new ArrayList<UniqueConstraint>();
+ }
+ return this.uniqueConstraint;
+ }
+
+ /**
+ * 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 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 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;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Lob.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Lob.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Lob.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/Lob.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,53 @@
+/**
+ * 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.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ * @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ * public @interface Lob {}
+ *
+ *
+ *
+ * <p>Java class for lob complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="lob">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "lob")
+public class Lob {
+
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToMany.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,282 @@
+/**
+ * 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.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 ManyToMany {
+ * Class targetEntity() default void.class;
+ * CascadeType[] cascade() default {};
+ * FetchType fetch() default LAZY;
+ * String mappedBy() default "";
+ * }
+ *
+ *
+ *
+ * <p>Java class for many-to-many complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="many-to-many">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="order-by" type="{http://java.sun.com/xml/ns/persistence/orm}order-by" minOccurs="0"/>
+ * <element name="map-key" type="{http://java.sun.com/xml/ns/persistence/orm}map-key" minOccurs="0"/>
+ * <element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
+ * <element name="cascade" type="{http://java.sun.com/xml/ns/persistence/orm}cascade-type" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
+ * <attribute name="mapped-by" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "many-to-many", propOrder = {
+ "orderBy",
+ "mapKey",
+ "joinTable",
+ "cascade"
+})
+public class ManyToMany {
+
+ @XmlElement(name = "order-by")
+ protected String orderBy;
+ @XmlElement(name = "map-key")
+ protected MapKey mapKey;
+ @XmlElement(name = "join-table")
+ protected JoinTable joinTable;
+ protected CascadeType cascade;
+ @XmlAttribute
+ protected FetchType fetch;
+ @XmlAttribute(name = "mapped-by")
+ protected String mappedBy;
+ @XmlAttribute(required = true)
+ protected String name;
+ @XmlAttribute(name = "target-entity")
+ protected String targetEntity;
+
+ /**
+ * 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 mapKey property.
+ *
+ * @return
+ * possible object is
+ * {@link MapKey }
+ *
+ */
+ public MapKey getMapKey() {
+ return mapKey;
+ }
+
+ /**
+ * Sets the value of the mapKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MapKey }
+ *
+ */
+ public void setMapKey(MapKey value) {
+ this.mapKey = value;
+ }
+
+ /**
+ * 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 cascade property.
+ *
+ * @return
+ * possible object is
+ * {@link CascadeType }
+ *
+ */
+ public CascadeType getCascade() {
+ return cascade;
+ }
+
+ /**
+ * Sets the value of the cascade property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CascadeType }
+ *
+ */
+ public void setCascade(CascadeType value) {
+ this.cascade = value;
+ }
+
+ /**
+ * Gets the value of the fetch property.
+ *
+ * @return
+ * possible object is
+ * {@link FetchType }
+ *
+ */
+ public FetchType getFetch() {
+ return fetch;
+ }
+
+ /**
+ * Sets the value of the fetch property.
+ *
+ * @param value
+ * allowed object is
+ * {@link FetchType }
+ *
+ */
+ public void setFetch(FetchType value) {
+ this.fetch = value;
+ }
+
+ /**
+ * Gets the value of the mappedBy property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMappedBy() {
+ return mappedBy;
+ }
+
+ /**
+ * Sets the value of the mappedBy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMappedBy(String value) {
+ this.mappedBy = 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 targetEntity property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTargetEntity() {
+ return targetEntity;
+ }
+
+ /**
+ * Sets the value of the targetEntity property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTargetEntity(String value) {
+ this.targetEntity = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ManyToOne.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,263 @@
+/**
+ * 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 ManyToOne {
+ * Class targetEntity() default void.class;
+ * CascadeType[] cascade() default {};
+ * FetchType fetch() default EAGER;
+ * boolean optional() default true;
+ * }
+ *
+ *
+ *
+ * <p>Java class for many-to-one complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="many-to-one">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <choice>
+ * <element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
+ * </choice>
+ * <element name="cascade" type="{http://java.sun.com/xml/ns/persistence/orm}cascade-type" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "many-to-one", propOrder = {
+ "joinColumn",
+ "joinTable",
+ "cascade"
+})
+public class ManyToOne {
+
+ @XmlElement(name = "join-column")
+ protected List<JoinColumn> joinColumn;
+ @XmlElement(name = "join-table")
+ protected JoinTable joinTable;
+ protected CascadeType cascade;
+ @XmlAttribute
+ protected FetchType fetch;
+ @XmlAttribute(required = true)
+ protected String name;
+ @XmlAttribute
+ protected Boolean optional;
+ @XmlAttribute(name = "target-entity")
+ protected String targetEntity;
+
+ /**
+ * 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 JoinColumn }
+ *
+ *
+ */
+ public List<JoinColumn> getJoinColumn() {
+ if (joinColumn == null) {
+ joinColumn = new ArrayList<JoinColumn>();
+ }
+ return this.joinColumn;
+ }
+
+ /**
+ * 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 cascade property.
+ *
+ * @return
+ * possible object is
+ * {@link CascadeType }
+ *
+ */
+ public CascadeType getCascade() {
+ return cascade;
+ }
+
+ /**
+ * Sets the value of the cascade property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CascadeType }
+ *
+ */
+ public void setCascade(CascadeType value) {
+ this.cascade = value;
+ }
+
+ /**
+ * Gets the value of the fetch property.
+ *
+ * @return
+ * possible object is
+ * {@link FetchType }
+ *
+ */
+ public FetchType getFetch() {
+ return fetch;
+ }
+
+ /**
+ * Sets the value of the fetch property.
+ *
+ * @param value
+ * allowed object is
+ * {@link FetchType }
+ *
+ */
+ public void setFetch(FetchType value) {
+ this.fetch = 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 optional property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isOptional() {
+ return optional;
+ }
+
+ /**
+ * Sets the value of the optional property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setOptional(Boolean value) {
+ this.optional = value;
+ }
+
+ /**
+ * Gets the value of the targetEntity property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTargetEntity() {
+ return targetEntity;
+ }
+
+ /**
+ * Sets the value of the targetEntity property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTargetEntity(String value) {
+ this.targetEntity = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKey.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKey.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKey.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MapKey.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,83 @@
+/**
+ * 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.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ *
+ * @Target({METHOD, FIELD}) @Retention(RUNTIME)
+ * public @interface MapKey {
+ * String name() default "";
+ * }
+ *
+ *
+ *
+ * <p>Java class for map-key complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="map-key">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "map-key")
+public class MapKey {
+
+ @XmlAttribute
+ protected String name;
+
+ /**
+ * 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;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/MappedSuperclass.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,508 @@
+/**
+ * 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.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;
+
+
+/**
+ *
+ *
+ * Defines the settings and mappings for a mapped superclass. Is
+ * allowed to be sparsely populated and used in conjunction with
+ * the annotations. Alternatively, the metadata-complete attribute
+ * can be used to indicate that no annotations are to be processed
+ * If this is the case then the defaulting rules will be recursively
+ * applied.
+ *
+ * @Target(TYPE) @Retention(RUNTIME)
+ * public @interface MappedSuperclass{}
+ *
+ *
+ *
+ * <p>Java class for mapped-superclass complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="mapped-superclass">
+ * <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="id-class" type="{http://java.sun.com/xml/ns/persistence/orm}id-class" minOccurs="0"/>
+ * <element name="exclude-default-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
+ * <element name="exclude-superclass-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
+ * <element name="entity-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}entity-listeners" minOccurs="0"/>
+ * <element name="pre-persist" type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist" minOccurs="0"/>
+ * <element name="post-persist" type="{http://java.sun.com/xml/ns/persistence/orm}post-persist" minOccurs="0"/>
+ * <element name="pre-remove" type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove" minOccurs="0"/>
+ * <element name="post-remove" type="{http://java.sun.com/xml/ns/persistence/orm}post-remove" minOccurs="0"/>
+ * <element name="pre-update" type="{http://java.sun.com/xml/ns/persistence/orm}pre-update" minOccurs="0"/>
+ * <element name="post-update" type="{http://java.sun.com/xml/ns/persistence/orm}post-update" minOccurs="0"/>
+ * <element name="post-load" type="{http://java.sun.com/xml/ns/persistence/orm}post-load" minOccurs="0"/>
+ * <element name="attributes" type="{http://java.sun.com/xml/ns/persistence/orm}attributes" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" />
+ * <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="metadata-complete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "mapped-superclass", propOrder = {
+ "description",
+ "idClass",
+ "excludeDefaultListeners",
+ "excludeSuperclassListeners",
+ "entityListeners",
+ "prePersist",
+ "postPersist",
+ "preRemove",
+ "postRemove",
+ "preUpdate",
+ "postUpdate",
+ "postLoad",
+ "attributes"
+})
+public class MappedSuperclass {
+
+ protected String description;
+ @XmlElement(name = "id-class")
+ protected IdClass idClass;
+ @XmlElement(name = "exclude-default-listeners")
+ protected EmptyType excludeDefaultListeners;
+ @XmlElement(name = "exclude-superclass-listeners")
+ protected EmptyType excludeSuperclassListeners;
+ @XmlElement(name = "entity-listeners")
+ protected EntityListeners entityListeners;
+ @XmlElement(name = "pre-persist")
+ protected PrePersist prePersist;
+ @XmlElement(name = "post-persist")
+ protected PostPersist postPersist;
+ @XmlElement(name = "pre-remove")
+ protected PreRemove preRemove;
+ @XmlElement(name = "post-remove")
+ protected PostRemove postRemove;
+ @XmlElement(name = "pre-update")
+ protected PreUpdate preUpdate;
+ @XmlElement(name = "post-update")
+ protected PostUpdate postUpdate;
+ @XmlElement(name = "post-load")
+ protected PostLoad postLoad;
+ protected Attributes attributes;
+ @XmlAttribute
+ protected AccessType access;
+ @XmlAttribute(name = "class", required = true)
+ protected String clazz;
+ @XmlAttribute(name = "metadata-complete")
+ protected Boolean metadataComplete;
+
+ /**
+ * 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 idClass property.
+ *
+ * @return
+ * possible object is
+ * {@link IdClass }
+ *
+ */
+ public IdClass getIdClass() {
+ return idClass;
+ }
+
+ /**
+ * Sets the value of the idClass property.
+ *
+ * @param value
+ * allowed object is
+ * {@link IdClass }
+ *
+ */
+ public void setIdClass(IdClass value) {
+ this.idClass = value;
+ }
+
+ /**
+ * Gets the value of the excludeDefaultListeners property.
+ *
+ * @return
+ * possible object is
+ * {@link EmptyType }
+ *
+ */
+ public EmptyType getExcludeDefaultListeners() {
+ return excludeDefaultListeners;
+ }
+
+ /**
+ * Sets the value of the excludeDefaultListeners property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EmptyType }
+ *
+ */
+ public void setExcludeDefaultListeners(EmptyType value) {
+ this.excludeDefaultListeners = value;
+ }
+
+ /**
+ * Gets the value of the excludeSuperclassListeners property.
+ *
+ * @return
+ * possible object is
+ * {@link EmptyType }
+ *
+ */
+ public EmptyType getExcludeSuperclassListeners() {
+ return excludeSuperclassListeners;
+ }
+
+ /**
+ * Sets the value of the excludeSuperclassListeners property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EmptyType }
+ *
+ */
+ public void setExcludeSuperclassListeners(EmptyType value) {
+ this.excludeSuperclassListeners = value;
+ }
+
+ /**
+ * Gets the value of the entityListeners property.
+ *
+ * @return
+ * possible object is
+ * {@link EntityListeners }
+ *
+ */
+ public EntityListeners getEntityListeners() {
+ return entityListeners;
+ }
+
+ /**
+ * Sets the value of the entityListeners property.
+ *
+ * @param value
+ * allowed object is
+ * {@link EntityListeners }
+ *
+ */
+ public void setEntityListeners(EntityListeners value) {
+ this.entityListeners = value;
+ }
+
+ /**
+ * Gets the value of the prePersist property.
+ *
+ * @return
+ * possible object is
+ * {@link PrePersist }
+ *
+ */
+ public PrePersist getPrePersist() {
+ return prePersist;
+ }
+
+ /**
+ * Sets the value of the prePersist property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PrePersist }
+ *
+ */
+ public void setPrePersist(PrePersist value) {
+ this.prePersist = value;
+ }
+
+ /**
+ * Gets the value of the postPersist property.
+ *
+ * @return
+ * possible object is
+ * {@link PostPersist }
+ *
+ */
+ public PostPersist getPostPersist() {
+ return postPersist;
+ }
+
+ /**
+ * Sets the value of the postPersist property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PostPersist }
+ *
+ */
+ public void setPostPersist(PostPersist value) {
+ this.postPersist = value;
+ }
+
+ /**
+ * Gets the value of the preRemove property.
+ *
+ * @return
+ * possible object is
+ * {@link PreRemove }
+ *
+ */
+ public PreRemove getPreRemove() {
+ return preRemove;
+ }
+
+ /**
+ * Sets the value of the preRemove property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PreRemove }
+ *
+ */
+ public void setPreRemove(PreRemove value) {
+ this.preRemove = value;
+ }
+
+ /**
+ * Gets the value of the postRemove property.
+ *
+ * @return
+ * possible object is
+ * {@link PostRemove }
+ *
+ */
+ public PostRemove getPostRemove() {
+ return postRemove;
+ }
+
+ /**
+ * Sets the value of the postRemove property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PostRemove }
+ *
+ */
+ public void setPostRemove(PostRemove value) {
+ this.postRemove = value;
+ }
+
+ /**
+ * Gets the value of the preUpdate property.
+ *
+ * @return
+ * possible object is
+ * {@link PreUpdate }
+ *
+ */
+ public PreUpdate getPreUpdate() {
+ return preUpdate;
+ }
+
+ /**
+ * Sets the value of the preUpdate property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PreUpdate }
+ *
+ */
+ public void setPreUpdate(PreUpdate value) {
+ this.preUpdate = value;
+ }
+
+ /**
+ * Gets the value of the postUpdate property.
+ *
+ * @return
+ * possible object is
+ * {@link PostUpdate }
+ *
+ */
+ public PostUpdate getPostUpdate() {
+ return postUpdate;
+ }
+
+ /**
+ * Sets the value of the postUpdate property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PostUpdate }
+ *
+ */
+ public void setPostUpdate(PostUpdate value) {
+ this.postUpdate = value;
+ }
+
+ /**
+ * Gets the value of the postLoad property.
+ *
+ * @return
+ * possible object is
+ * {@link PostLoad }
+ *
+ */
+ public PostLoad getPostLoad() {
+ return postLoad;
+ }
+
+ /**
+ * Sets the value of the postLoad property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PostLoad }
+ *
+ */
+ public void setPostLoad(PostLoad value) {
+ this.postLoad = value;
+ }
+
+ /**
+ * Gets the value of the attributes property.
+ *
+ * @return
+ * possible object is
+ * {@link Attributes }
+ *
+ */
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * Sets the value of the attributes property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Attributes }
+ *
+ */
+ public void setAttributes(Attributes value) {
+ this.attributes = 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;
+ }
+
+ /**
+ * Gets the value of the clazz property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getClazz() {
+ return clazz;
+ }
+
+ /**
+ * Sets the value of the clazz property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setClazz(String value) {
+ this.clazz = value;
+ }
+
+ /**
+ * Gets the value of the metadataComplete property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isMetadataComplete() {
+ return metadataComplete;
+ }
+
+ /**
+ * Sets the value of the metadataComplete property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setMetadataComplete(Boolean value) {
+ this.metadataComplete = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedNativeQuery.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,207 @@
+/**
+ * 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({TYPE}) @Retention(RUNTIME)
+ * public @interface NamedNativeQuery {
+ * String name();
+ * String query();
+ * QueryHint[] hints() default {};
+ * Class resultClass() default void.class;
+ * String resultSetMapping() default ""; //named SqlResultSetMapping
+ * }
+ *
+ *
+ *
+ * <p>Java class for named-native-query complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="named-native-query">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="query" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="hint" type="{http://java.sun.com/xml/ns/persistence/orm}query-hint" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="result-class" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="result-set-mapping" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "named-native-query", propOrder = {
+ "query",
+ "hint"
+})
+public class NamedNativeQuery {
+
+ @XmlElement(required = true)
+ protected String query;
+ protected List<QueryHint> hint;
+ @XmlAttribute(required = true)
+ protected String name;
+ @XmlAttribute(name = "result-class")
+ protected String resultClass;
+ @XmlAttribute(name = "result-set-mapping")
+ protected String resultSetMapping;
+
+ /**
+ * Gets the value of the query property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * Sets the value of the query property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setQuery(String value) {
+ this.query = value;
+ }
+
+ /**
+ * Gets the value of the hint 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 hint property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getHint().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link QueryHint }
+ *
+ *
+ */
+ public List<QueryHint> getHint() {
+ if (hint == null) {
+ hint = new ArrayList<QueryHint>();
+ }
+ return this.hint;
+ }
+
+ /**
+ * 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 resultClass property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResultClass() {
+ return resultClass;
+ }
+
+ /**
+ * Sets the value of the resultClass property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResultClass(String value) {
+ this.resultClass = value;
+ }
+
+ /**
+ * Gets the value of the resultSetMapping property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResultSetMapping() {
+ return resultSetMapping;
+ }
+
+ /**
+ * Sets the value of the resultSetMapping property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResultSetMapping(String value) {
+ this.resultSetMapping = value;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/NamedQuery.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,151 @@
+/**
+ * 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({TYPE}) @Retention(RUNTIME)
+ * public @interface NamedQuery {
+ * String name();
+ * String query();
+ * QueryHint[] hints() default {};
+ * }
+ *
+ *
+ *
+ * <p>Java class for named-query complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="named-query">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="query" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="hint" type="{http://java.sun.com/xml/ns/persistence/orm}query-hint" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "named-query", propOrder = {
+ "query",
+ "hint"
+})
+public class NamedQuery {
+
+ @XmlElement(required = true)
+ protected String query;
+ protected List<QueryHint> hint;
+ @XmlAttribute(required = true)
+ protected String name;
+
+ /**
+ * Gets the value of the query property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getQuery() {
+ return query;
+ }
+
+ /**
+ * Sets the value of the query property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setQuery(String value) {
+ this.query = value;
+ }
+
+ /**
+ * Gets the value of the hint 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 hint property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getHint().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link QueryHint }
+ *
+ *
+ */
+ public List<QueryHint> getHint() {
+ if (hint == null) {
+ hint = new ArrayList<QueryHint>();
+ }
+ return this.hint;
+ }
+
+ /**
+ * 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;
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/ObjectFactory.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,472 @@
+/**
+ * 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.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.apache.openejb.jee.jpa package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.apache.openejb.jee.jpa
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link PreRemove }
+ *
+ */
+ public PreRemove createPreRemove() {
+ return new PreRemove();
+ }
+
+ /**
+ * Create an instance of {@link PostUpdate }
+ *
+ */
+ public PostUpdate createPostUpdate() {
+ return new PostUpdate();
+ }
+
+ /**
+ * Create an instance of {@link Basic }
+ *
+ */
+ public Basic createBasic() {
+ return new Basic();
+ }
+
+ /**
+ * Create an instance of {@link JoinColumn }
+ *
+ */
+ public JoinColumn createJoinColumn() {
+ return new JoinColumn();
+ }
+
+ /**
+ * Create an instance of {@link TableGenerator }
+ *
+ */
+ public TableGenerator createTableGenerator() {
+ return new TableGenerator();
+ }
+
+ /**
+ * Create an instance of {@link DiscriminatorColumn }
+ *
+ */
+ public DiscriminatorColumn createDiscriminatorColumn() {
+ return new DiscriminatorColumn();
+ }
+
+ /**
+ * Create an instance of {@link Embeddable }
+ *
+ */
+ public Embeddable createEmbeddable() {
+ return new Embeddable();
+ }
+
+ /**
+ * Create an instance of {@link NamedNativeQuery }
+ *
+ */
+ public NamedNativeQuery createNamedNativeQuery() {
+ return new NamedNativeQuery();
+ }
+
+ /**
+ * Create an instance of {@link ColumnResult }
+ *
+ */
+ public ColumnResult createColumnResult() {
+ return new ColumnResult();
+ }
+
+ /**
+ * Create an instance of {@link EmbeddableAttributes }
+ *
+ */
+ public EmbeddableAttributes createEmbeddableAttributes() {
+ return new EmbeddableAttributes();
+ }
+
+ /**
+ * Create an instance of {@link QueryHint }
+ *
+ */
+ public QueryHint createQueryHint() {
+ return new QueryHint();
+ }
+
+ /**
+ * Create an instance of {@link FieldResult }
+ *
+ */
+ public FieldResult createFieldResult() {
+ return new FieldResult();
+ }
+
+ /**
+ * Create an instance of {@link Id }
+ *
+ */
+ public Id createId() {
+ return new Id();
+ }
+
+ /**
+ * Create an instance of {@link ManyToOne }
+ *
+ */
+ public ManyToOne createManyToOne() {
+ return new ManyToOne();
+ }
+
+ /**
+ * Create an instance of {@link EntityMappings }
+ *
+ */
+ public EntityMappings createEntityMappings() {
+ return new EntityMappings();
+ }
+
+ /**
+ * Create an instance of {@link Table }
+ *
+ */
+ public Table createTable() {
+ return new Table();
+ }
+
+ /**
+ * Create an instance of {@link SecondaryTable }
+ *
+ */
+ public SecondaryTable createSecondaryTable() {
+ return new SecondaryTable();
+ }
+
+ /**
+ * Create an instance of {@link PrimaryKeyJoinColumn }
+ *
+ */
+ public PrimaryKeyJoinColumn createPrimaryKeyJoinColumn() {
+ return new PrimaryKeyJoinColumn();
+ }
+
+ /**
+ * Create an instance of {@link ManyToMany }
+ *
+ */
+ public ManyToMany createManyToMany() {
+ return new ManyToMany();
+ }
+
+ /**
+ * Create an instance of {@link SequenceGenerator }
+ *
+ */
+ public SequenceGenerator createSequenceGenerator() {
+ return new SequenceGenerator();
+ }
+
+ /**
+ * Create an instance of {@link EntityListeners }
+ *
+ */
+ public EntityListeners createEntityListeners() {
+ return new EntityListeners();
+ }
+
+ /**
+ * Create an instance of {@link SqlResultSetMapping }
+ *
+ */
+ public SqlResultSetMapping createSqlResultSetMapping() {
+ return new SqlResultSetMapping();
+ }
+
+ /**
+ * Create an instance of {@link PersistenceUnitDefaults }
+ *
+ */
+ public PersistenceUnitDefaults createPersistenceUnitDefaults() {
+ return new PersistenceUnitDefaults();
+ }
+
+ /**
+ * Create an instance of {@link MappedSuperclass }
+ *
+ */
+ public MappedSuperclass createMappedSuperclass() {
+ return new MappedSuperclass();
+ }
+
+ /**
+ * Create an instance of {@link PersistenceUnitMetadata }
+ *
+ */
+ public PersistenceUnitMetadata createPersistenceUnitMetadata() {
+ return new PersistenceUnitMetadata();
+ }
+
+ /**
+ * Create an instance of {@link PreUpdate }
+ *
+ */
+ public PreUpdate createPreUpdate() {
+ return new PreUpdate();
+ }
+
+ /**
+ * Create an instance of {@link PrePersist }
+ *
+ */
+ public PrePersist createPrePersist() {
+ return new PrePersist();
+ }
+
+ /**
+ * Create an instance of {@link Version }
+ *
+ */
+ public Version createVersion() {
+ return new Version();
+ }
+
+ /**
+ * Create an instance of {@link Entity }
+ *
+ */
+ public Entity createEntity() {
+ return new Entity();
+ }
+
+ /**
+ * Create an instance of {@link MapKey }
+ *
+ */
+ public MapKey createMapKey() {
+ return new MapKey();
+ }
+
+ /**
+ * Create an instance of {@link CascadeType }
+ *
+ */
+ public CascadeType createCascadeType() {
+ return new CascadeType();
+ }
+
+ /**
+ * Create an instance of {@link AssociationOverride }
+ *
+ */
+ public AssociationOverride createAssociationOverride() {
+ return new AssociationOverride();
+ }
+
+ /**
+ * Create an instance of {@link EmbeddedId }
+ *
+ */
+ public EmbeddedId createEmbeddedId() {
+ return new EmbeddedId();
+ }
+
+ /**
+ * Create an instance of {@link Transient }
+ *
+ */
+ public Transient createTransient() {
+ return new Transient();
+ }
+
+ /**
+ * Create an instance of {@link GeneratedValue }
+ *
+ */
+ public GeneratedValue createGeneratedValue() {
+ return new GeneratedValue();
+ }
+
+ /**
+ * Create an instance of {@link Lob }
+ *
+ */
+ public Lob createLob() {
+ return new Lob();
+ }
+
+ /**
+ * Create an instance of {@link UniqueConstraint }
+ *
+ */
+ public UniqueConstraint createUniqueConstraint() {
+ return new UniqueConstraint();
+ }
+
+ /**
+ * Create an instance of {@link Embedded }
+ *
+ */
+ public Embedded createEmbedded() {
+ return new Embedded();
+ }
+
+ /**
+ * Create an instance of {@link EmptyType }
+ *
+ */
+ public EmptyType createEmptyType() {
+ return new EmptyType();
+ }
+
+ /**
+ * Create an instance of {@link Attributes }
+ *
+ */
+ public Attributes createAttributes() {
+ return new Attributes();
+ }
+
+ /**
+ * Create an instance of {@link IdClass }
+ *
+ */
+ public IdClass createIdClass() {
+ return new IdClass();
+ }
+
+ /**
+ * Create an instance of {@link OneToMany }
+ *
+ */
+ public OneToMany createOneToMany() {
+ return new OneToMany();
+ }
+
+ /**
+ * Create an instance of {@link PostLoad }
+ *
+ */
+ public PostLoad createPostLoad() {
+ return new PostLoad();
+ }
+
+ /**
+ * Create an instance of {@link EntityListener }
+ *
+ */
+ public EntityListener createEntityListener() {
+ return new EntityListener();
+ }
+
+ /**
+ * Create an instance of {@link EntityResult }
+ *
+ */
+ public EntityResult createEntityResult() {
+ return new EntityResult();
+ }
+
+ /**
+ * Create an instance of {@link JoinTable }
+ *
+ */
+ public JoinTable createJoinTable() {
+ return new JoinTable();
+ }
+
+ /**
+ * Create an instance of {@link AttributeOverride }
+ *
+ */
+ public AttributeOverride createAttributeOverride() {
+ return new AttributeOverride();
+ }
+
+ /**
+ * Create an instance of {@link OneToOne }
+ *
+ */
+ public OneToOne createOneToOne() {
+ return new OneToOne();
+ }
+
+ /**
+ * Create an instance of {@link NamedQuery }
+ *
+ */
+ public NamedQuery createNamedQuery() {
+ return new NamedQuery();
+ }
+
+ /**
+ * Create an instance of {@link PostPersist }
+ *
+ */
+ public PostPersist createPostPersist() {
+ return new PostPersist();
+ }
+
+ /**
+ * Create an instance of {@link Column }
+ *
+ */
+ public Column createColumn() {
+ return new Column();
+ }
+
+ /**
+ * Create an instance of {@link Inheritance }
+ *
+ */
+ public Inheritance createInheritance() {
+ return new Inheritance();
+ }
+
+ /**
+ * Create an instance of {@link PostRemove }
+ *
+ */
+ public PostRemove createPostRemove() {
+ return new PostRemove();
+ }
+
+}
Added: incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java?view=auto&rev=488864
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java (added)
+++ incubator/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/jpa/OneToMany.java Tue Dec 19 16:13:33 2006
@@ -0,0 +1,319 @@
+/**
+ * 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 OneToMany {
+ * Class targetEntity() default void.class;
+ * CascadeType[] cascade() default {};
+ * FetchType fetch() default LAZY;
+ * String mappedBy() default "";
+ * }
+ *
+ *
+ *
+ * <p>Java class for one-to-many complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="one-to-many">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="order-by" type="{http://java.sun.com/xml/ns/persistence/orm}order-by" minOccurs="0"/>
+ * <element name="map-key" type="{http://java.sun.com/xml/ns/persistence/orm}map-key" minOccurs="0"/>
+ * <choice>
+ * <element name="join-table" type="{http://java.sun.com/xml/ns/persistence/orm}join-table" minOccurs="0"/>
+ * <element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
+ * </choice>
+ * <element name="cascade" type="{http://java.sun.com/xml/ns/persistence/orm}cascade-type" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="fetch" type="{http://java.sun.com/xml/ns/persistence/orm}fetch-type" />
+ * <attribute name="mapped-by" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="target-entity" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "one-to-many", propOrder = {
+ "orderBy",
+ "mapKey",
+ "joinTable",
+ "joinColumn",
+ "cascade"
+})
+public class OneToMany {
+
+ @XmlElement(name = "order-by")
+ protected String orderBy;
+ @XmlElement(name = "map-key")
+ protected MapKey mapKey;
+ @XmlElement(name = "join-table")
+ protected JoinTable joinTable;
+ @XmlElement(name = "join-column")
+ protected List<JoinColumn> joinColumn;
+ protected CascadeType cascade;
+ @XmlAttribute
+ protected FetchType fetch;
+ @XmlAttribute(name = "mapped-by")
+ protected String mappedBy;
+ @XmlAttribute(required = true)
+ protected String name;
+ @XmlAttribute(name = "target-entity")
+ protected String targetEntity;
+
+ /**
+ * 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 mapKey property.
+ *
+ * @return
+ * possible object is
+ * {@link MapKey }
+ *
+ */
+ public MapKey getMapKey() {
+ return mapKey;
+ }
+
+ /**
+ * Sets the value of the mapKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MapKey }
+ *
+ */
+ public void setMapKey(MapKey value) {
+ this.mapKey = value;
+ }
+
+ /**
+ * 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 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 JoinColumn }
+ *
+ *
+ */
+ public List<JoinColumn> getJoinColumn() {
+ if (joinColumn == null) {
+ joinColumn = new ArrayList<JoinColumn>();
+ }
+ return this.joinColumn;
+ }
+
+ /**
+ * Gets the value of the cascade property.
+ *
+ * @return
+ * possible object is
+ * {@link CascadeType }
+ *
+ */
+ public CascadeType getCascade() {
+ return cascade;
+ }
+
+ /**
+ * Sets the value of the cascade property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CascadeType }
+ *
+ */
+ public void setCascade(CascadeType value) {
+ this.cascade = value;
+ }
+
+ /**
+ * Gets the value of the fetch property.
+ *
+ * @return
+ * possible object is
+ * {@link FetchType }
+ *
+ */
+ public FetchType getFetch() {
+ return fetch;
+ }
+
+ /**
+ * Sets the value of the fetch property.
+ *
+ * @param value
+ * allowed object is
+ * {@link FetchType }
+ *
+ */
+ public void setFetch(FetchType value) {
+ this.fetch = value;
+ }
+
+ /**
+ * Gets the value of the mappedBy property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMappedBy() {
+ return mappedBy;
+ }
+
+ /**
+ * Sets the value of the mappedBy property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMappedBy(String value) {
+ this.mappedBy = 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 targetEntity property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTargetEntity() {
+ return targetEntity;
+ }
+
+ /**
+ * Sets the value of the targetEntity property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTargetEntity(String value) {
+ this.targetEntity = value;
+ }
+
+}