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