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.XmlElement;
018    import javax.xml.bind.annotation.XmlType;
019    
020    
021    /**
022     * <p>Java class for embeddable-attributes complex type.
023     * 
024     * <p>The following schema fragment specifies the expected content contained within this class.
025     * 
026     * <pre>
027     * &lt;complexType name="embeddable-attributes">
028     *   &lt;complexContent>
029     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
030     *       &lt;sequence>
031     *         &lt;element name="basic" type="{http://java.sun.com/xml/ns/persistence/orm}basic" maxOccurs="unbounded" minOccurs="0"/>
032     *         &lt;element name="transient" type="{http://java.sun.com/xml/ns/persistence/orm}transient" maxOccurs="unbounded" minOccurs="0"/>
033     *       &lt;/sequence>
034     *     &lt;/restriction>
035     *   &lt;/complexContent>
036     * &lt;/complexType>
037     * </pre>
038     * 
039     * 
040     */
041    @XmlAccessorType(XmlAccessType.FIELD)
042    @XmlType(name = "embeddable-attributes", propOrder = {
043        "basic",
044        "_transient"
045    })
046    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
047    public class EmbeddableAttributes implements Cloneable
048    {
049    
050        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
051        protected List<Basic> basic;
052        @XmlElement(name = "transient")
053        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
054        protected List<Transient> _transient;
055    
056        /**
057         * Creates a new {@code EmbeddableAttributes} instance.
058         * 
059         */
060        public EmbeddableAttributes() {
061            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
062            super();
063        }
064    
065        /**
066         * Creates a new {@code EmbeddableAttributes} instance by deeply copying a given {@code EmbeddableAttributes} instance.
067         * 
068         * 
069         * @param o
070         *     The instance to copy.
071         * @throws NullPointerException
072         *     if {@code o} is {@code null}.
073         */
074        public EmbeddableAttributes(final EmbeddableAttributes o) {
075            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
076            super();
077            if (o == null) {
078                throw new NullPointerException("Cannot create a copy of 'EmbeddableAttributes' from 'null'.");
079            }
080            // 'Basic' collection.
081            copyBasic(o.getBasic(), getBasic());
082            // 'Transient' collection.
083            copyTransient(o.getTransient(), getTransient());
084        }
085    
086        /**
087         * Gets the value of the basic 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 basic property.
094         * 
095         * <p>
096         * For example, to add a new item, do as follows:
097         * <pre>
098         *    getBasic().add(newItem);
099         * </pre>
100         * 
101         * 
102         * <p>
103         * Objects of the following type(s) are allowed in the list
104         * {@link Basic }
105         * 
106         * 
107         */
108        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
109        public List<Basic> getBasic() {
110            if (basic == null) {
111                basic = new ArrayList<Basic>();
112            }
113            return this.basic;
114        }
115    
116        /**
117         * Gets the value of the transient property.
118         * 
119         * <p>
120         * This accessor method returns a reference to the live list,
121         * not a snapshot. Therefore any modification you make to the
122         * returned list will be present inside the JAXB object.
123         * This is why there is not a <CODE>set</CODE> method for the transient property.
124         * 
125         * <p>
126         * For example, to add a new item, do as follows:
127         * <pre>
128         *    getTransient().add(newItem);
129         * </pre>
130         * 
131         * 
132         * <p>
133         * Objects of the following type(s) are allowed in the list
134         * {@link Transient }
135         * 
136         * 
137         */
138        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
139        public List<Transient> getTransient() {
140            if (_transient == null) {
141                _transient = new ArrayList<Transient>();
142            }
143            return this._transient;
144        }
145    
146        /**
147         * Copies all values of property {@code Basic} deeply.
148         * 
149         * @param target
150         *     The target to copy {@code source} to.
151         * @param source
152         *     The source to copy from.
153         * @throws NullPointerException
154         *     if {@code source} or {@code target} is {@code null}.
155         */
156        @SuppressWarnings("unchecked")
157        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
158        private static void copyBasic(final List<Basic> source, final List<Basic> target) {
159            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
160            if (!source.isEmpty()) {
161                for (Iterator it = source.iterator(); it.hasNext(); ) {
162                    final Object next = it.next();
163                    if (next instanceof Basic) {
164                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.Basic
165                        target.add(((Basic) next).clone());
166                        continue;
167                    }
168                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
169                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Basic' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.EmbeddableAttributes'."));
170                }
171            }
172        }
173    
174        /**
175         * Copies all values of property {@code Transient} deeply.
176         * 
177         * @param target
178         *     The target to copy {@code source} to.
179         * @param source
180         *     The source to copy from.
181         * @throws NullPointerException
182         *     if {@code source} or {@code target} is {@code null}.
183         */
184        @SuppressWarnings("unchecked")
185        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
186        private static void copyTransient(final List<Transient> source, final List<Transient> target) {
187            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
188            if (!source.isEmpty()) {
189                for (Iterator it = source.iterator(); it.hasNext(); ) {
190                    final Object next = it.next();
191                    if (next instanceof Transient) {
192                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.Transient
193                        target.add(((Transient) next).clone());
194                        continue;
195                    }
196                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
197                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Transient' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.EmbeddableAttributes'."));
198                }
199            }
200        }
201    
202        /**
203         * Creates and returns a deep copy of this object.
204         * 
205         * 
206         * @return
207         *     A deep copy of this object.
208         */
209        @Override
210        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
211        public EmbeddableAttributes clone() {
212            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
213            return new EmbeddableAttributes(this);
214        }
215    
216    }