001: /**
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */package org.apache.openejb.jee.oejb2;
017:
018: import java.util.ArrayList;
019: import java.util.List;
020: import javax.xml.bind.JAXBElement;
021: import javax.xml.bind.annotation.XmlAccessType;
022: import javax.xml.bind.annotation.XmlAccessorType;
023: import javax.xml.bind.annotation.XmlElement;
024: import javax.xml.bind.annotation.XmlElementRef;
025: import javax.xml.bind.annotation.XmlElementWrapper;
026: import javax.xml.bind.annotation.XmlElements;
027: import javax.xml.bind.annotation.XmlType;
028:
029: import org.apache.openejb.jee.jpa.unit.Persistence;
030:
031: /**
032: * <p>Java class for openejb-jarType complex type.
033: *
034: * <p>The following schema fragment specifies the expected content contained within this class.
035: *
036: * <pre>
037: * <complexType name="openejb-jarType">
038: * <complexContent>
039: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
040: * <sequence>
041: * <element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}environment" minOccurs="0"/>
042: * <element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory" minOccurs="0"/>
043: * <element name="ejb-ql-compiler-factory" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
044: * <element name="db-syntax-factory" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
045: * <element name="enforce-foreign-key-constraints" type="{http://geronimo.apache.org/xml/ns/deployment-1.2}emptyType" minOccurs="0"/>
046: * <element name="enterprise-beans">
047: * <complexType>
048: * <complexContent>
049: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
050: * <choice maxOccurs="unbounded" minOccurs="0">
051: * <element name="session" type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}session-beanType"/>
052: * <element name="entity" type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}entity-beanType"/>
053: * <element name="message-driven" type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}message-driven-beanType"/>
054: * </choice>
055: * </restriction>
056: * </complexContent>
057: * </complexType>
058: * </element>
059: * <element name="relationships" type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationshipsType" minOccurs="0"/>
060: * <element ref="{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination" maxOccurs="unbounded" minOccurs="0"/>
061: * <element ref="{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security" minOccurs="0"/>
062: * <element ref="{http://geronimo.apache.org/xml/ns/deployment-1.2}service" maxOccurs="unbounded" minOccurs="0"/>
063: * </sequence>
064: * </restriction>
065: * </complexContent>
066: * </complexType>
067: * </pre>
068: *
069: *
070: */
071: @XmlAccessorType(XmlAccessType.FIELD)
072: @XmlType(name="openejb-jarType",namespace="http://openejb.apache.org/xml/ns/openejb-jar-2.2",propOrder={"environment","cmpConnectionFactory","ejbQlCompilerFactory","dbSyntaxFactory","enforceForeignKeyConstraints","enterpriseBeans","ejbRelation","messageDestination","security","service","persistence"})
073: public class OpenejbJarType {
074:
075: @XmlElement(name="environment",namespace="http://geronimo.apache.org/xml/ns/deployment-1.2")
076: protected EnvironmentType environment;
077:
078: @XmlElement(name="cmp-connection-factory",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
079: protected ResourceLocatorType cmpConnectionFactory;
080:
081: @XmlElement(name="ejb-ql-compiler-factory")
082: protected String ejbQlCompilerFactory;
083:
084: @XmlElement(name="db-syntax-factory")
085: protected String dbSyntaxFactory;
086:
087: @XmlElement(name="enforce-foreign-key-constraints")
088: protected EmptyType enforceForeignKeyConstraints;
089:
090: @XmlElementWrapper(name="enterprise-beans")
091: @XmlElements({@XmlElement(name="message-driven",required=true,type=MessageDrivenBeanType.class),@XmlElement(name="session",required=true,type=SessionBeanType.class),@XmlElement(name="entity",required=true,type=EntityBeanType.class)})
092: protected List<EnterpriseBean> enterpriseBeans = new ArrayList<EnterpriseBean>();
093:
094: @XmlElementWrapper(name="relationships")
095: @XmlElement(name="ejb-relation",required=true)
096: protected List<EjbRelationType> ejbRelation;
097:
098: @XmlElement(name="message-destination",namespace="http://geronimo.apache.org/xml/ns/naming-1.2")
099: protected List<MessageDestinationType> messageDestination;
100:
101: @XmlElementRef(name="security",namespace="http://geronimo.apache.org/xml/ns/j2ee/application-1.2",type=JAXBElement.class)
102: protected JAXBElement<? extends AbstractSecurityType> security;
103:
104: @XmlElementRef(name="service",namespace="http://geronimo.apache.org/xml/ns/deployment-1.2",type=JAXBElement.class)
105: protected List<JAXBElement<? extends AbstractServiceType>> service;
106:
107: @XmlElementRef(name="persistence",namespace="http://java.sun.com/xml/ns/persistence",type=Persistence.class)
108: protected List<Persistence> persistence;
109:
110: /**
111: * Gets the value of the environment property.
112: *
113: * @return
114: * possible object is
115: * {@link EnvironmentType }
116: *
117: */
118: public EnvironmentType getEnvironment() {
119: return environment;
120: }
121:
122: /**
123: * Sets the value of the environment property.
124: *
125: * @param value
126: * allowed object is
127: * {@link EnvironmentType }
128: *
129: */
130: public void setEnvironment(EnvironmentType value) {
131: this .environment = value;
132: }
133:
134: /**
135: * Gets the value of the cmpConnectionFactory property.
136: *
137: * @return
138: * possible object is
139: * {@link ResourceLocatorType }
140: *
141: */
142: public ResourceLocatorType getCmpConnectionFactory() {
143: return cmpConnectionFactory;
144: }
145:
146: /**
147: * Sets the value of the cmpConnectionFactory property.
148: *
149: * @param value
150: * allowed object is
151: * {@link ResourceLocatorType }
152: *
153: */
154: public void setCmpConnectionFactory(ResourceLocatorType value) {
155: this .cmpConnectionFactory = value;
156: }
157:
158: /**
159: * Gets the value of the ejbQlCompilerFactory property.
160: *
161: * @return
162: * possible object is
163: * {@link String }
164: *
165: */
166: public String getEjbQlCompilerFactory() {
167: return ejbQlCompilerFactory;
168: }
169:
170: /**
171: * Sets the value of the ejbQlCompilerFactory property.
172: *
173: * @param value
174: * allowed object is
175: * {@link String }
176: *
177: */
178: public void setEjbQlCompilerFactory(String value) {
179: this .ejbQlCompilerFactory = value;
180: }
181:
182: /**
183: * Gets the value of the dbSyntaxFactory property.
184: *
185: * @return
186: * possible object is
187: * {@link String }
188: *
189: */
190: public String getDbSyntaxFactory() {
191: return dbSyntaxFactory;
192: }
193:
194: public void setDbSyntaxFactory(String value) {
195: this .dbSyntaxFactory = value;
196: }
197:
198: public boolean isEnforceForeignKeyConstraints() {
199: return enforceForeignKeyConstraints != null;
200: }
201:
202: public void setEnforceForeignKeyConstraints(boolean value) {
203: this .enforceForeignKeyConstraints = value ? new EmptyType()
204: : null;
205: }
206:
207: public List<EnterpriseBean> getEnterpriseBeans() {
208: return enterpriseBeans;
209: }
210:
211: public List<EjbRelationType> getEjbRelation() {
212: if (ejbRelation == null) {
213: ejbRelation = new ArrayList<EjbRelationType>();
214: }
215: return ejbRelation;
216: }
217:
218: public void setEjbRelation(List<EjbRelationType> ejbRelation) {
219: this .ejbRelation = ejbRelation;
220: }
221:
222: public List<MessageDestinationType> getMessageDestination() {
223: if (messageDestination == null) {
224: messageDestination = new ArrayList<MessageDestinationType>();
225: }
226: return this .messageDestination;
227: }
228:
229: public JAXBElement<? extends AbstractSecurityType> getSecurity() {
230: return security;
231: }
232:
233: public void setSecurity(
234: JAXBElement<? extends AbstractSecurityType> security) {
235: this .security = security;
236: }
237:
238: public List<JAXBElement<? extends AbstractServiceType>> getService() {
239: if (service == null) {
240: service = new ArrayList<JAXBElement<? extends AbstractServiceType>>();
241: }
242: return this .service;
243: }
244:
245: public List<Persistence> getPersistence() {
246: if (persistence == null) {
247: persistence = new ArrayList<Persistence>();
248: }
249: return persistence;
250: }
251: }
|