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.jpa;
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: *
027: *
028: * This element contains the entity field or property mappings.
029: * It may be sparsely populated to include only a subset of the
030: * fields or properties. If metadata-complete for the entity is true
031: * then the remainder of the attributes will be defaulted according
032: * to the default rules.
033: *
034: *
035: *
036: * <p>Java class for attributes complex type.
037: *
038: * <p>The following schema fragment specifies the expected content contained within this class.
039: *
040: * <pre>
041: * <complexType name="attributes">
042: * <complexContent>
043: * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
044: * <sequence>
045: * <choice>
046: * <element name="id" type="{http://java.sun.com/xml/ns/persistence/orm}id" maxOccurs="unbounded" minOccurs="0"/>
047: * <element name="embedded-id" type="{http://java.sun.com/xml/ns/persistence/orm}embedded-id" minOccurs="0"/>
048: * </choice>
049: * <element name="basic" type="{http://java.sun.com/xml/ns/persistence/orm}basic" maxOccurs="unbounded" minOccurs="0"/>
050: * <element name="version" type="{http://java.sun.com/xml/ns/persistence/orm}version" maxOccurs="unbounded" minOccurs="0"/>
051: * <element name="many-to-one" type="{http://java.sun.com/xml/ns/persistence/orm}many-to-one" maxOccurs="unbounded" minOccurs="0"/>
052: * <element name="one-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-many" maxOccurs="unbounded" minOccurs="0"/>
053: * <element name="one-to-one" type="{http://java.sun.com/xml/ns/persistence/orm}one-to-one" maxOccurs="unbounded" minOccurs="0"/>
054: * <element name="many-to-many" type="{http://java.sun.com/xml/ns/persistence/orm}many-to-many" maxOccurs="unbounded" minOccurs="0"/>
055: * <element name="embedded" type="{http://java.sun.com/xml/ns/persistence/orm}embedded" maxOccurs="unbounded" minOccurs="0"/>
056: * <element name="transient" type="{http://java.sun.com/xml/ns/persistence/orm}transient" maxOccurs="unbounded" minOccurs="0"/>
057: * </sequence>
058: * </restriction>
059: * </complexContent>
060: * </complexType>
061: * </pre>
062: *
063: *
064: */
065: @XmlAccessorType(XmlAccessType.FIELD)
066: @XmlType(name="attributes",propOrder={"id","embeddedId","basic","version","manyToOne","oneToMany","oneToOne","manyToMany","embedded","_transient"})
067: public class Attributes {
068:
069: protected List<Id> id;
070: @XmlElement(name="embedded-id")
071: protected EmbeddedId embeddedId;
072: protected List<Basic> basic;
073: protected List<Version> version;
074: @XmlElement(name="many-to-one")
075: protected List<ManyToOne> manyToOne;
076: @XmlElement(name="one-to-many")
077: protected List<OneToMany> oneToMany;
078: @XmlElement(name="one-to-one")
079: protected List<OneToOne> oneToOne;
080: @XmlElement(name="many-to-many")
081: protected List<ManyToMany> manyToMany;
082: protected List<Embedded> embedded;
083: @XmlElement(name="transient")
084: protected List<Transient> _transient;
085:
086: /**
087: * Gets the value of the id property.
088: *
089: * <p>
090: * This accessor method returns a reference to the live list,
091: * not a snapshot. Therefore any modification you make to the
092: * returned list will be present inside the JAXB object.
093: * This is why there is not a <CODE>set</CODE> method for the id property.
094: *
095: * <p>
096: * For example, to add a new item, do as follows:
097: * <pre>
098: * getId().add(newItem);
099: * </pre>
100: *
101: *
102: * <p>
103: * Objects of the following type(s) are allowed in the list
104: * {@link Id }
105: *
106: *
107: */
108: public List<Id> getId() {
109: if (id == null) {
110: id = new ArrayList<Id>();
111: }
112: return this .id;
113: }
114:
115: /**
116: * Gets the value of the embeddedId property.
117: *
118: * @return
119: * possible object is
120: * {@link EmbeddedId }
121: *
122: */
123: public EmbeddedId getEmbeddedId() {
124: return embeddedId;
125: }
126:
127: /**
128: * Sets the value of the embeddedId property.
129: *
130: * @param value
131: * allowed object is
132: * {@link EmbeddedId }
133: *
134: */
135: public void setEmbeddedId(EmbeddedId value) {
136: this .embeddedId = value;
137: }
138:
139: /**
140: * Gets the value of the basic property.
141: *
142: * <p>
143: * This accessor method returns a reference to the live list,
144: * not a snapshot. Therefore any modification you make to the
145: * returned list will be present inside the JAXB object.
146: * This is why there is not a <CODE>set</CODE> method for the basic property.
147: *
148: * <p>
149: * For example, to add a new item, do as follows:
150: * <pre>
151: * getBasic().add(newItem);
152: * </pre>
153: *
154: *
155: * <p>
156: * Objects of the following type(s) are allowed in the list
157: * {@link Basic }
158: *
159: *
160: */
161: public List<Basic> getBasic() {
162: if (basic == null) {
163: basic = new ArrayList<Basic>();
164: }
165: return this .basic;
166: }
167:
168: /**
169: * Gets the value of the version property.
170: *
171: * <p>
172: * This accessor method returns a reference to the live list,
173: * not a snapshot. Therefore any modification you make to the
174: * returned list will be present inside the JAXB object.
175: * This is why there is not a <CODE>set</CODE> method for the version property.
176: *
177: * <p>
178: * For example, to add a new item, do as follows:
179: * <pre>
180: * getVersion().add(newItem);
181: * </pre>
182: *
183: *
184: * <p>
185: * Objects of the following type(s) are allowed in the list
186: * {@link Version }
187: *
188: *
189: */
190: public List<Version> getVersion() {
191: if (version == null) {
192: version = new ArrayList<Version>();
193: }
194: return this .version;
195: }
196:
197: /**
198: * Gets the value of the manyToOne property.
199: *
200: * <p>
201: * This accessor method returns a reference to the live list,
202: * not a snapshot. Therefore any modification you make to the
203: * returned list will be present inside the JAXB object.
204: * This is why there is not a <CODE>set</CODE> method for the manyToOne property.
205: *
206: * <p>
207: * For example, to add a new item, do as follows:
208: * <pre>
209: * getManyToOne().add(newItem);
210: * </pre>
211: *
212: *
213: * <p>
214: * Objects of the following type(s) are allowed in the list
215: * {@link ManyToOne }
216: *
217: *
218: */
219: public List<ManyToOne> getManyToOne() {
220: if (manyToOne == null) {
221: manyToOne = new ArrayList<ManyToOne>();
222: }
223: return this .manyToOne;
224: }
225:
226: /**
227: * Gets the value of the oneToMany property.
228: *
229: * <p>
230: * This accessor method returns a reference to the live list,
231: * not a snapshot. Therefore any modification you make to the
232: * returned list will be present inside the JAXB object.
233: * This is why there is not a <CODE>set</CODE> method for the oneToMany property.
234: *
235: * <p>
236: * For example, to add a new item, do as follows:
237: * <pre>
238: * getOneToMany().add(newItem);
239: * </pre>
240: *
241: *
242: * <p>
243: * Objects of the following type(s) are allowed in the list
244: * {@link OneToMany }
245: *
246: *
247: */
248: public List<OneToMany> getOneToMany() {
249: if (oneToMany == null) {
250: oneToMany = new ArrayList<OneToMany>();
251: }
252: return this .oneToMany;
253: }
254:
255: /**
256: * Gets the value of the oneToOne property.
257: *
258: * <p>
259: * This accessor method returns a reference to the live list,
260: * not a snapshot. Therefore any modification you make to the
261: * returned list will be present inside the JAXB object.
262: * This is why there is not a <CODE>set</CODE> method for the oneToOne property.
263: *
264: * <p>
265: * For example, to add a new item, do as follows:
266: * <pre>
267: * getOneToOne().add(newItem);
268: * </pre>
269: *
270: *
271: * <p>
272: * Objects of the following type(s) are allowed in the list
273: * {@link OneToOne }
274: *
275: *
276: */
277: public List<OneToOne> getOneToOne() {
278: if (oneToOne == null) {
279: oneToOne = new ArrayList<OneToOne>();
280: }
281: return this .oneToOne;
282: }
283:
284: /**
285: * Gets the value of the manyToMany property.
286: *
287: * <p>
288: * This accessor method returns a reference to the live list,
289: * not a snapshot. Therefore any modification you make to the
290: * returned list will be present inside the JAXB object.
291: * This is why there is not a <CODE>set</CODE> method for the manyToMany property.
292: *
293: * <p>
294: * For example, to add a new item, do as follows:
295: * <pre>
296: * getManyToMany().add(newItem);
297: * </pre>
298: *
299: *
300: * <p>
301: * Objects of the following type(s) are allowed in the list
302: * {@link ManyToMany }
303: *
304: *
305: */
306: public List<ManyToMany> getManyToMany() {
307: if (manyToMany == null) {
308: manyToMany = new ArrayList<ManyToMany>();
309: }
310: return this .manyToMany;
311: }
312:
313: /**
314: * Gets the value of the embedded property.
315: *
316: * <p>
317: * This accessor method returns a reference to the live list,
318: * not a snapshot. Therefore any modification you make to the
319: * returned list will be present inside the JAXB object.
320: * This is why there is not a <CODE>set</CODE> method for the embedded property.
321: *
322: * <p>
323: * For example, to add a new item, do as follows:
324: * <pre>
325: * getEmbedded().add(newItem);
326: * </pre>
327: *
328: *
329: * <p>
330: * Objects of the following type(s) are allowed in the list
331: * {@link Embedded }
332: *
333: *
334: */
335: public List<Embedded> getEmbedded() {
336: if (embedded == null) {
337: embedded = new ArrayList<Embedded>();
338: }
339: return this .embedded;
340: }
341:
342: /**
343: * Gets the value of the transient property.
344: *
345: * <p>
346: * This accessor method returns a reference to the live list,
347: * not a snapshot. Therefore any modification you make to the
348: * returned list will be present inside the JAXB object.
349: * This is why there is not a <CODE>set</CODE> method for the transient property.
350: *
351: * <p>
352: * For example, to add a new item, do as follows:
353: * <pre>
354: * getTransient().add(newItem);
355: * </pre>
356: *
357: *
358: * <p>
359: * Objects of the following type(s) are allowed in the list
360: * {@link Transient }
361: *
362: *
363: */
364: public List<Transient> getTransient() {
365: if (_transient == null) {
366: _transient = new ArrayList<Transient>();
367: }
368: return this._transient;
369: }
370:
371: }
|