001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 
003    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004    // Any modifications to this file will be lost upon recompilation of the source schema. 
005    // Generated on: 2010.08.18 at 10:46:56 PM CEST 
006    //
007    
008    
009    package net.sourceforge.jpaxjc.ns.persistence.orm;
010    
011    import java.util.ArrayList;
012    import java.util.Iterator;
013    import java.util.List;
014    import javax.annotation.Generated;
015    import javax.xml.bind.annotation.XmlAccessType;
016    import javax.xml.bind.annotation.XmlAccessorType;
017    import javax.xml.bind.annotation.XmlAttribute;
018    import javax.xml.bind.annotation.XmlElement;
019    import javax.xml.bind.annotation.XmlType;
020    
021    
022    /**
023     * 
024     * 
025     *         @Target({METHOD, FIELD}) @Retention(RUNTIME)
026     *         public @interface JoinTable {
027     *           String name() default "";
028     *           String catalog() default "";
029     *           String schema() default "";
030     *           JoinColumn[] joinColumns() default {};
031     *           JoinColumn[] inverseJoinColumns() default {};
032     *           UniqueConstraint[] uniqueConstraints() default {};
033     *         }
034     * 
035     *       
036     * 
037     * <p>Java class for join-table complex type.
038     * 
039     * <p>The following schema fragment specifies the expected content contained within this class.
040     * 
041     * <pre>
042     * &lt;complexType name="join-table">
043     *   &lt;complexContent>
044     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
045     *       &lt;sequence>
046     *         &lt;element name="join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
047     *         &lt;element name="inverse-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}join-column" maxOccurs="unbounded" minOccurs="0"/>
048     *         &lt;element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
049     *       &lt;/sequence>
050     *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
051     *       &lt;attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
052     *       &lt;attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
053     *     &lt;/restriction>
054     *   &lt;/complexContent>
055     * &lt;/complexType>
056     * </pre>
057     * 
058     * 
059     */
060    @XmlAccessorType(XmlAccessType.FIELD)
061    @XmlType(name = "join-table", propOrder = {
062        "joinColumn",
063        "inverseJoinColumn",
064        "uniqueConstraint"
065    })
066    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
067    public class JoinTable implements Cloneable
068    {
069    
070        @XmlElement(name = "join-column")
071        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
072        protected List<JoinColumn> joinColumn;
073        @XmlElement(name = "inverse-join-column")
074        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
075        protected List<JoinColumn> inverseJoinColumn;
076        @XmlElement(name = "unique-constraint")
077        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
078        protected List<UniqueConstraint> uniqueConstraint;
079        @XmlAttribute
080        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
081        protected String name;
082        @XmlAttribute
083        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
084        protected String catalog;
085        @XmlAttribute
086        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
087        protected String schema;
088    
089        /**
090         * Creates a new {@code JoinTable} instance.
091         * 
092         */
093        public JoinTable() {
094            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
095            super();
096        }
097    
098        /**
099         * Creates a new {@code JoinTable} instance by deeply copying a given {@code JoinTable} instance.
100         * 
101         * 
102         * @param o
103         *     The instance to copy.
104         * @throws NullPointerException
105         *     if {@code o} is {@code null}.
106         */
107        public JoinTable(final JoinTable o) {
108            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
109            super();
110            if (o == null) {
111                throw new NullPointerException("Cannot create a copy of 'JoinTable' from 'null'.");
112            }
113            // 'JoinColumn' collection.
114            copyJoinColumn(o.getJoinColumn(), getJoinColumn());
115            // 'InverseJoinColumn' collection.
116            copyInverseJoinColumn(o.getInverseJoinColumn(), getInverseJoinColumn());
117            // 'UniqueConstraint' collection.
118            copyUniqueConstraint(o.getUniqueConstraint(), getUniqueConstraint());
119            // CBuiltinLeafInfo: java.lang.String
120            this.name = o.getName();
121            // CBuiltinLeafInfo: java.lang.String
122            this.catalog = o.getCatalog();
123            // CBuiltinLeafInfo: java.lang.String
124            this.schema = o.getSchema();
125        }
126    
127        /**
128         * Gets the value of the joinColumn property.
129         * 
130         * <p>
131         * This accessor method returns a reference to the live list,
132         * not a snapshot. Therefore any modification you make to the
133         * returned list will be present inside the JAXB object.
134         * This is why there is not a <CODE>set</CODE> method for the joinColumn property.
135         * 
136         * <p>
137         * For example, to add a new item, do as follows:
138         * <pre>
139         *    getJoinColumn().add(newItem);
140         * </pre>
141         * 
142         * 
143         * <p>
144         * Objects of the following type(s) are allowed in the list
145         * {@link JoinColumn }
146         * 
147         * 
148         */
149        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
150        public List<JoinColumn> getJoinColumn() {
151            if (joinColumn == null) {
152                joinColumn = new ArrayList<JoinColumn>();
153            }
154            return this.joinColumn;
155        }
156    
157        /**
158         * Gets the value of the inverseJoinColumn property.
159         * 
160         * <p>
161         * This accessor method returns a reference to the live list,
162         * not a snapshot. Therefore any modification you make to the
163         * returned list will be present inside the JAXB object.
164         * This is why there is not a <CODE>set</CODE> method for the inverseJoinColumn property.
165         * 
166         * <p>
167         * For example, to add a new item, do as follows:
168         * <pre>
169         *    getInverseJoinColumn().add(newItem);
170         * </pre>
171         * 
172         * 
173         * <p>
174         * Objects of the following type(s) are allowed in the list
175         * {@link JoinColumn }
176         * 
177         * 
178         */
179        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
180        public List<JoinColumn> getInverseJoinColumn() {
181            if (inverseJoinColumn == null) {
182                inverseJoinColumn = new ArrayList<JoinColumn>();
183            }
184            return this.inverseJoinColumn;
185        }
186    
187        /**
188         * Gets the value of the uniqueConstraint property.
189         * 
190         * <p>
191         * This accessor method returns a reference to the live list,
192         * not a snapshot. Therefore any modification you make to the
193         * returned list will be present inside the JAXB object.
194         * This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
195         * 
196         * <p>
197         * For example, to add a new item, do as follows:
198         * <pre>
199         *    getUniqueConstraint().add(newItem);
200         * </pre>
201         * 
202         * 
203         * <p>
204         * Objects of the following type(s) are allowed in the list
205         * {@link UniqueConstraint }
206         * 
207         * 
208         */
209        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
210        public List<UniqueConstraint> getUniqueConstraint() {
211            if (uniqueConstraint == null) {
212                uniqueConstraint = new ArrayList<UniqueConstraint>();
213            }
214            return this.uniqueConstraint;
215        }
216    
217        /**
218         * Gets the value of the name property.
219         * 
220         * @return
221         *     possible object is
222         *     {@link String }
223         *     
224         */
225        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
226        public String getName() {
227            return name;
228        }
229    
230        /**
231         * Sets the value of the name property.
232         * 
233         * @param value
234         *     allowed object is
235         *     {@link String }
236         *     
237         */
238        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
239        public void setName(String value) {
240            this.name = value;
241        }
242    
243        /**
244         * Gets the value of the catalog property.
245         * 
246         * @return
247         *     possible object is
248         *     {@link String }
249         *     
250         */
251        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
252        public String getCatalog() {
253            return catalog;
254        }
255    
256        /**
257         * Sets the value of the catalog property.
258         * 
259         * @param value
260         *     allowed object is
261         *     {@link String }
262         *     
263         */
264        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
265        public void setCatalog(String value) {
266            this.catalog = value;
267        }
268    
269        /**
270         * Gets the value of the schema property.
271         * 
272         * @return
273         *     possible object is
274         *     {@link String }
275         *     
276         */
277        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
278        public String getSchema() {
279            return schema;
280        }
281    
282        /**
283         * Sets the value of the schema property.
284         * 
285         * @param value
286         *     allowed object is
287         *     {@link String }
288         *     
289         */
290        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
291        public void setSchema(String value) {
292            this.schema = value;
293        }
294    
295        /**
296         * Copies all values of property {@code JoinColumn} deeply.
297         * 
298         * @param target
299         *     The target to copy {@code source} to.
300         * @param source
301         *     The source to copy from.
302         * @throws NullPointerException
303         *     if {@code source} or {@code target} is {@code null}.
304         */
305        @SuppressWarnings("unchecked")
306        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
307        private static void copyJoinColumn(final List<JoinColumn> source, final List<JoinColumn> target) {
308            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
309            if (!source.isEmpty()) {
310                for (Iterator it = source.iterator(); it.hasNext(); ) {
311                    final Object next = it.next();
312                    if (next instanceof JoinColumn) {
313                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.JoinColumn
314                        target.add(((JoinColumn) next).clone());
315                        continue;
316                    }
317                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
318                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'JoinColumn' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.JoinTable'."));
319                }
320            }
321        }
322    
323        /**
324         * Copies all values of property {@code InverseJoinColumn} deeply.
325         * 
326         * @param target
327         *     The target to copy {@code source} to.
328         * @param source
329         *     The source to copy from.
330         * @throws NullPointerException
331         *     if {@code source} or {@code target} is {@code null}.
332         */
333        @SuppressWarnings("unchecked")
334        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
335        private static void copyInverseJoinColumn(final List<JoinColumn> source, final List<JoinColumn> target) {
336            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
337            if (!source.isEmpty()) {
338                for (Iterator it = source.iterator(); it.hasNext(); ) {
339                    final Object next = it.next();
340                    if (next instanceof JoinColumn) {
341                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.JoinColumn
342                        target.add(((JoinColumn) next).clone());
343                        continue;
344                    }
345                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
346                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'InverseJoinColumn' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.JoinTable'."));
347                }
348            }
349        }
350    
351        /**
352         * Copies all values of property {@code UniqueConstraint} deeply.
353         * 
354         * @param target
355         *     The target to copy {@code source} to.
356         * @param source
357         *     The source to copy from.
358         * @throws NullPointerException
359         *     if {@code source} or {@code target} is {@code null}.
360         */
361        @SuppressWarnings("unchecked")
362        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
363        private static void copyUniqueConstraint(final List<UniqueConstraint> source, final List<UniqueConstraint> target) {
364            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
365            if (!source.isEmpty()) {
366                for (Iterator it = source.iterator(); it.hasNext(); ) {
367                    final Object next = it.next();
368                    if (next instanceof UniqueConstraint) {
369                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.UniqueConstraint
370                        target.add(((UniqueConstraint) next).clone());
371                        continue;
372                    }
373                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
374                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'UniqueConstraint' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.JoinTable'."));
375                }
376            }
377        }
378    
379        /**
380         * Creates and returns a deep copy of this object.
381         * 
382         * 
383         * @return
384         *     A deep copy of this object.
385         */
386        @Override
387        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
388        public JoinTable clone() {
389            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
390            return new JoinTable(this);
391        }
392    
393    }