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     * 
023     * 
024     *         @Target({TYPE}) @Retention(RUNTIME)
025     *         public @interface EntityListeners {
026     *           Class[] value();
027     *         }
028     * 
029     *       
030     * 
031     * <p>Java class for entity-listeners complex type.
032     * 
033     * <p>The following schema fragment specifies the expected content contained within this class.
034     * 
035     * <pre>
036     * &lt;complexType name="entity-listeners">
037     *   &lt;complexContent>
038     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
039     *       &lt;sequence>
040     *         &lt;element name="entity-listener" type="{http://java.sun.com/xml/ns/persistence/orm}entity-listener" maxOccurs="unbounded" minOccurs="0"/>
041     *       &lt;/sequence>
042     *     &lt;/restriction>
043     *   &lt;/complexContent>
044     * &lt;/complexType>
045     * </pre>
046     * 
047     * 
048     */
049    @XmlAccessorType(XmlAccessType.FIELD)
050    @XmlType(name = "entity-listeners", propOrder = {
051        "entityListener"
052    })
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    public class EntityListeners implements Cloneable
055    {
056    
057        @XmlElement(name = "entity-listener")
058        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
059        protected List<EntityListener> entityListener;
060    
061        /**
062         * Creates a new {@code EntityListeners} instance.
063         * 
064         */
065        public EntityListeners() {
066            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
067            super();
068        }
069    
070        /**
071         * Creates a new {@code EntityListeners} instance by deeply copying a given {@code EntityListeners} instance.
072         * 
073         * 
074         * @param o
075         *     The instance to copy.
076         * @throws NullPointerException
077         *     if {@code o} is {@code null}.
078         */
079        public EntityListeners(final EntityListeners o) {
080            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
081            super();
082            if (o == null) {
083                throw new NullPointerException("Cannot create a copy of 'EntityListeners' from 'null'.");
084            }
085            // 'EntityListener' collection.
086            copyEntityListener(o.getEntityListener(), getEntityListener());
087        }
088    
089        /**
090         * Gets the value of the entityListener property.
091         * 
092         * <p>
093         * This accessor method returns a reference to the live list,
094         * not a snapshot. Therefore any modification you make to the
095         * returned list will be present inside the JAXB object.
096         * This is why there is not a <CODE>set</CODE> method for the entityListener property.
097         * 
098         * <p>
099         * For example, to add a new item, do as follows:
100         * <pre>
101         *    getEntityListener().add(newItem);
102         * </pre>
103         * 
104         * 
105         * <p>
106         * Objects of the following type(s) are allowed in the list
107         * {@link EntityListener }
108         * 
109         * 
110         */
111        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
112        public List<EntityListener> getEntityListener() {
113            if (entityListener == null) {
114                entityListener = new ArrayList<EntityListener>();
115            }
116            return this.entityListener;
117        }
118    
119        /**
120         * Copies all values of property {@code EntityListener} deeply.
121         * 
122         * @param target
123         *     The target to copy {@code source} to.
124         * @param source
125         *     The source to copy from.
126         * @throws NullPointerException
127         *     if {@code source} or {@code target} is {@code null}.
128         */
129        @SuppressWarnings("unchecked")
130        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
131        private static void copyEntityListener(final List<EntityListener> source, final List<EntityListener> target) {
132            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
133            if (!source.isEmpty()) {
134                for (Iterator it = source.iterator(); it.hasNext(); ) {
135                    final Object next = it.next();
136                    if (next instanceof EntityListener) {
137                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.EntityListener
138                        target.add(((EntityListener) next).clone());
139                        continue;
140                    }
141                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
142                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'EntityListener' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.EntityListeners'."));
143                }
144            }
145        }
146    
147        /**
148         * Creates and returns a deep copy of this object.
149         * 
150         * 
151         * @return
152         *     A deep copy of this object.
153         */
154        @Override
155        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
156        public EntityListeners clone() {
157            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
158            return new EntityListeners(this);
159        }
160    
161    }