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