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.annotation.XmlAccessType;
021: import javax.xml.bind.annotation.XmlAccessorType;
022: import javax.xml.bind.annotation.XmlElement;
023: import javax.xml.bind.annotation.XmlType;
024:
025: /**
026: * <p>Java class for ejb-relationship-roleType complex type.
027: *
028: * <p>The following schema fragment specifies the expected content contained within this class.
029: *
030: * <pre>
031: * <complexType name="ejb-relationship-roleType">
032: * <complexContent>
033: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
034: * <sequence>
035: * <element name="ejb-relationship-role-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
036: * <element name="relationship-role-source">
037: * <complexType>
038: * <complexContent>
039: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
040: * <sequence>
041: * <element name="ejb-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
042: * </sequence>
043: * </restriction>
044: * </complexContent>
045: * </complexType>
046: * </element>
047: * <element name="cmr-field" minOccurs="0">
048: * <complexType>
049: * <complexContent>
050: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
051: * <sequence>
052: * <element name="cmr-field-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
053: * </sequence>
054: * </restriction>
055: * </complexContent>
056: * </complexType>
057: * </element>
058: * <element name="foreign-key-column-on-source" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
059: * <element name="role-mapping">
060: * <complexType>
061: * <complexContent>
062: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
063: * <sequence>
064: * <element name="cmr-field-mapping" maxOccurs="unbounded">
065: * <complexType>
066: * <complexContent>
067: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
068: * <sequence>
069: * <element name="key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
070: * <element name="foreign-key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
071: * </sequence>
072: * </restriction>
073: * </complexContent>
074: * </complexType>
075: * </element>
076: * </sequence>
077: * </restriction>
078: * </complexContent>
079: * </complexType>
080: * </element>
081: * </sequence>
082: * </restriction>
083: * </complexContent>
084: * </complexType>
085: * </pre>
086: *
087: *
088: */
089: @XmlAccessorType(XmlAccessType.FIELD)
090: @XmlType(name="ejb-relationship-roleType",propOrder={"ejbRelationshipRoleName","relationshipRoleSource","cmrField","foreignKeyColumnOnSource","roleMapping"})
091: public class EjbRelationshipRoleType {
092:
093: @XmlElement(name="ejb-relationship-role-name")
094: protected String ejbRelationshipRoleName;
095: @XmlElement(name="relationship-role-source",required=true)
096: protected EjbRelationshipRoleType.RelationshipRoleSource relationshipRoleSource;
097: @XmlElement(name="cmr-field")
098: protected EjbRelationshipRoleType.CmrField cmrField;
099: @XmlElement(name="foreign-key-column-on-source")
100: protected EmptyType foreignKeyColumnOnSource;
101: @XmlElement(name="role-mapping",required=true)
102: protected EjbRelationshipRoleType.RoleMapping roleMapping;
103:
104: /**
105: * Gets the value of the ejbRelationshipRoleName property.
106: *
107: * @return
108: * possible object is
109: * {@link String }
110: *
111: */
112: public String getEjbRelationshipRoleName() {
113: return ejbRelationshipRoleName;
114: }
115:
116: /**
117: * Sets the value of the ejbRelationshipRoleName property.
118: *
119: * @param value
120: * allowed object is
121: * {@link String }
122: *
123: */
124: public void setEjbRelationshipRoleName(String value) {
125: this .ejbRelationshipRoleName = value;
126: }
127:
128: /**
129: * Gets the value of the relationshipRoleSource property.
130: *
131: * @return
132: * possible object is
133: * {@link EjbRelationshipRoleType.RelationshipRoleSource }
134: *
135: */
136: public EjbRelationshipRoleType.RelationshipRoleSource getRelationshipRoleSource() {
137: return relationshipRoleSource;
138: }
139:
140: /**
141: * Sets the value of the relationshipRoleSource property.
142: *
143: * @param value
144: * allowed object is
145: * {@link EjbRelationshipRoleType.RelationshipRoleSource }
146: *
147: */
148: public void setRelationshipRoleSource(
149: EjbRelationshipRoleType.RelationshipRoleSource value) {
150: this .relationshipRoleSource = value;
151: }
152:
153: /**
154: * Gets the value of the cmrField property.
155: *
156: * @return
157: * possible object is
158: * {@link EjbRelationshipRoleType.CmrField }
159: *
160: */
161: public EjbRelationshipRoleType.CmrField getCmrField() {
162: return cmrField;
163: }
164:
165: /**
166: * Sets the value of the cmrField property.
167: *
168: * @param value
169: * allowed object is
170: * {@link EjbRelationshipRoleType.CmrField }
171: *
172: */
173: public void setCmrField(EjbRelationshipRoleType.CmrField value) {
174: this .cmrField = value;
175: }
176:
177: /**
178: * Gets the value of the foreignKeyColumnOnSource property.
179: *
180: * @return
181: * possible object is
182: * {@link boolean }
183: *
184: */
185: public boolean isForeignKeyColumnOnSource() {
186: return foreignKeyColumnOnSource != null;
187: }
188:
189: /**
190: * Sets the value of the foreignKeyColumnOnSource property.
191: *
192: * @param value
193: * allowed object is
194: * {@link boolean }
195: *
196: */
197: public void setForeignKeyColumnOnSource(boolean value) {
198: this .foreignKeyColumnOnSource = value ? new EmptyType() : null;
199: }
200:
201: /**
202: * Gets the value of the roleMapping property.
203: *
204: * @return
205: * possible object is
206: * {@link EjbRelationshipRoleType.RoleMapping }
207: *
208: */
209: public EjbRelationshipRoleType.RoleMapping getRoleMapping() {
210: return roleMapping;
211: }
212:
213: /**
214: * Sets the value of the roleMapping property.
215: *
216: * @param value
217: * allowed object is
218: * {@link EjbRelationshipRoleType.RoleMapping }
219: *
220: */
221: public void setRoleMapping(EjbRelationshipRoleType.RoleMapping value) {
222: this .roleMapping = value;
223: }
224:
225: /**
226: * <p>Java class for anonymous complex type.
227: *
228: * <p>The following schema fragment specifies the expected content contained within this class.
229: *
230: * <pre>
231: * <complexType>
232: * <complexContent>
233: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
234: * <sequence>
235: * <element name="cmr-field-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
236: * </sequence>
237: * </restriction>
238: * </complexContent>
239: * </complexType>
240: * </pre>
241: *
242: *
243: */
244: @XmlAccessorType(XmlAccessType.FIELD)
245: @XmlType(name="",propOrder={"cmrFieldName"})
246: public static class CmrField {
247:
248: @XmlElement(name="cmr-field-name",required=true)
249: protected String cmrFieldName;
250:
251: /**
252: * Gets the value of the cmrFieldName property.
253: *
254: * @return
255: * possible object is
256: * {@link String }
257: *
258: */
259: public String getCmrFieldName() {
260: return cmrFieldName;
261: }
262:
263: /**
264: * Sets the value of the cmrFieldName property.
265: *
266: * @param value
267: * allowed object is
268: * {@link String }
269: *
270: */
271: public void setCmrFieldName(String value) {
272: this .cmrFieldName = value;
273: }
274:
275: }
276:
277: /**
278: * <p>Java class for anonymous complex type.
279: *
280: * <p>The following schema fragment specifies the expected content contained within this class.
281: *
282: * <pre>
283: * <complexType>
284: * <complexContent>
285: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
286: * <sequence>
287: * <element name="ejb-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
288: * </sequence>
289: * </restriction>
290: * </complexContent>
291: * </complexType>
292: * </pre>
293: *
294: *
295: */
296: @XmlAccessorType(XmlAccessType.FIELD)
297: @XmlType(name="",propOrder={"ejbName"})
298: public static class RelationshipRoleSource {
299:
300: @XmlElement(name="ejb-name",required=true)
301: protected String ejbName;
302:
303: /**
304: * Gets the value of the ejbName property.
305: *
306: * @return
307: * possible object is
308: * {@link String }
309: *
310: */
311: public String getEjbName() {
312: return ejbName;
313: }
314:
315: /**
316: * Sets the value of the ejbName property.
317: *
318: * @param value
319: * allowed object is
320: * {@link String }
321: *
322: */
323: public void setEjbName(String value) {
324: this .ejbName = value;
325: }
326:
327: }
328:
329: /**
330: * <p>Java class for anonymous complex type.
331: *
332: * <p>The following schema fragment specifies the expected content contained within this class.
333: *
334: * <pre>
335: * <complexType>
336: * <complexContent>
337: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
338: * <sequence>
339: * <element name="cmr-field-mapping" maxOccurs="unbounded">
340: * <complexType>
341: * <complexContent>
342: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
343: * <sequence>
344: * <element name="key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
345: * <element name="foreign-key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
346: * </sequence>
347: * </restriction>
348: * </complexContent>
349: * </complexType>
350: * </element>
351: * </sequence>
352: * </restriction>
353: * </complexContent>
354: * </complexType>
355: * </pre>
356: *
357: *
358: */
359: @XmlAccessorType(XmlAccessType.FIELD)
360: @XmlType(name="",propOrder={"cmrFieldMapping"})
361: public static class RoleMapping {
362:
363: @XmlElement(name="cmr-field-mapping",required=true)
364: protected List<EjbRelationshipRoleType.RoleMapping.CmrFieldMapping> cmrFieldMapping;
365:
366: /**
367: * Gets the value of the cmrFieldMapping property.
368: *
369: * <p>
370: * This accessor method returns a reference to the live list,
371: * not a snapshot. Therefore any modification you make to the
372: * returned list will be present inside the JAXB object.
373: * This is why there is not a <CODE>set</CODE> method for the cmrFieldMapping property.
374: *
375: * <p>
376: * For example, to add a new item, do as follows:
377: * <pre>
378: * getCmrFieldMapping().add(newItem);
379: * </pre>
380: *
381: *
382: * <p>
383: * Objects of the following type(s) are allowed in the list
384: * {@link EjbRelationshipRoleType.RoleMapping.CmrFieldMapping }
385: *
386: *
387: */
388: public List<EjbRelationshipRoleType.RoleMapping.CmrFieldMapping> getCmrFieldMapping() {
389: if (cmrFieldMapping == null) {
390: cmrFieldMapping = new ArrayList<EjbRelationshipRoleType.RoleMapping.CmrFieldMapping>();
391: }
392: return this .cmrFieldMapping;
393: }
394:
395: /**
396: * <p>Java class for anonymous complex type.
397: *
398: * <p>The following schema fragment specifies the expected content contained within this class.
399: *
400: * <pre>
401: * <complexType>
402: * <complexContent>
403: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
404: * <sequence>
405: * <element name="key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
406: * <element name="foreign-key-column" type="{http://www.w3.org/2001/XMLSchema}string"/>
407: * </sequence>
408: * </restriction>
409: * </complexContent>
410: * </complexType>
411: * </pre>
412: *
413: *
414: */
415: @XmlAccessorType(XmlAccessType.FIELD)
416: @XmlType(name="",propOrder={"keyColumn","foreignKeyColumn"})
417: public static class CmrFieldMapping {
418:
419: @XmlElement(name="key-column",required=true)
420: protected String keyColumn;
421: @XmlElement(name="foreign-key-column",required=true)
422: protected String foreignKeyColumn;
423:
424: /**
425: * Gets the value of the keyColumn property.
426: *
427: * @return
428: * possible object is
429: * {@link String }
430: *
431: */
432: public String getKeyColumn() {
433: return keyColumn;
434: }
435:
436: /**
437: * Sets the value of the keyColumn property.
438: *
439: * @param value
440: * allowed object is
441: * {@link String }
442: *
443: */
444: public void setKeyColumn(String value) {
445: this .keyColumn = value;
446: }
447:
448: /**
449: * Gets the value of the foreignKeyColumn property.
450: *
451: * @return
452: * possible object is
453: * {@link String }
454: *
455: */
456: public String getForeignKeyColumn() {
457: return foreignKeyColumn;
458: }
459:
460: /**
461: * Sets the value of the foreignKeyColumn property.
462: *
463: * @param value
464: * allowed object is
465: * {@link String }
466: *
467: */
468: public void setForeignKeyColumn(String value) {
469: this.foreignKeyColumn = value;
470: }
471:
472: }
473:
474: }
475:
476: }
|