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({TYPE}) @Retention(RUNTIME)
026 * public @interface SecondaryTable {
027 * String name();
028 * String catalog() default "";
029 * String schema() default "";
030 * PrimaryKeyJoinColumn[] pkJoinColumns() default {};
031 * UniqueConstraint[] uniqueConstraints() default {};
032 * }
033 *
034 *
035 *
036 * <p>Java class for secondary-table complex type.
037 *
038 * <p>The following schema fragment specifies the expected content contained within this class.
039 *
040 * <pre>
041 * <complexType name="secondary-table">
042 * <complexContent>
043 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
044 * <sequence>
045 * <element name="primary-key-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}primary-key-join-column" maxOccurs="unbounded" minOccurs="0"/>
046 * <element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
047 * </sequence>
048 * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
049 * <attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
050 * <attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
051 * </restriction>
052 * </complexContent>
053 * </complexType>
054 * </pre>
055 *
056 *
057 */
058 @XmlAccessorType(XmlAccessType.FIELD)
059 @XmlType(name = "secondary-table", propOrder = {
060 "primaryKeyJoinColumn",
061 "uniqueConstraint"
062 })
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 public class SecondaryTable implements Cloneable
065 {
066
067 @XmlElement(name = "primary-key-join-column")
068 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
069 protected List<PrimaryKeyJoinColumn> primaryKeyJoinColumn;
070 @XmlElement(name = "unique-constraint")
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<UniqueConstraint> uniqueConstraint;
073 @XmlAttribute(required = true)
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 String name;
076 @XmlAttribute
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 String catalog;
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 schema;
082
083 /**
084 * Creates a new {@code SecondaryTable} instance.
085 *
086 */
087 public SecondaryTable() {
088 // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
089 super();
090 }
091
092 /**
093 * Creates a new {@code SecondaryTable} instance by deeply copying a given {@code SecondaryTable} instance.
094 *
095 *
096 * @param o
097 * The instance to copy.
098 * @throws NullPointerException
099 * if {@code o} is {@code null}.
100 */
101 public SecondaryTable(final SecondaryTable o) {
102 // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
103 super();
104 if (o == null) {
105 throw new NullPointerException("Cannot create a copy of 'SecondaryTable' from 'null'.");
106 }
107 // 'PrimaryKeyJoinColumn' collection.
108 copyPrimaryKeyJoinColumn(o.getPrimaryKeyJoinColumn(), getPrimaryKeyJoinColumn());
109 // 'UniqueConstraint' collection.
110 copyUniqueConstraint(o.getUniqueConstraint(), getUniqueConstraint());
111 // CBuiltinLeafInfo: java.lang.String
112 this.name = o.getName();
113 // CBuiltinLeafInfo: java.lang.String
114 this.catalog = o.getCatalog();
115 // CBuiltinLeafInfo: java.lang.String
116 this.schema = o.getSchema();
117 }
118
119 /**
120 * Gets the value of the primaryKeyJoinColumn property.
121 *
122 * <p>
123 * This accessor method returns a reference to the live list,
124 * not a snapshot. Therefore any modification you make to the
125 * returned list will be present inside the JAXB object.
126 * This is why there is not a <CODE>set</CODE> method for the primaryKeyJoinColumn property.
127 *
128 * <p>
129 * For example, to add a new item, do as follows:
130 * <pre>
131 * getPrimaryKeyJoinColumn().add(newItem);
132 * </pre>
133 *
134 *
135 * <p>
136 * Objects of the following type(s) are allowed in the list
137 * {@link PrimaryKeyJoinColumn }
138 *
139 *
140 */
141 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
142 public List<PrimaryKeyJoinColumn> getPrimaryKeyJoinColumn() {
143 if (primaryKeyJoinColumn == null) {
144 primaryKeyJoinColumn = new ArrayList<PrimaryKeyJoinColumn>();
145 }
146 return this.primaryKeyJoinColumn;
147 }
148
149 /**
150 * Gets the value of the uniqueConstraint property.
151 *
152 * <p>
153 * This accessor method returns a reference to the live list,
154 * not a snapshot. Therefore any modification you make to the
155 * returned list will be present inside the JAXB object.
156 * This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
157 *
158 * <p>
159 * For example, to add a new item, do as follows:
160 * <pre>
161 * getUniqueConstraint().add(newItem);
162 * </pre>
163 *
164 *
165 * <p>
166 * Objects of the following type(s) are allowed in the list
167 * {@link UniqueConstraint }
168 *
169 *
170 */
171 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
172 public List<UniqueConstraint> getUniqueConstraint() {
173 if (uniqueConstraint == null) {
174 uniqueConstraint = new ArrayList<UniqueConstraint>();
175 }
176 return this.uniqueConstraint;
177 }
178
179 /**
180 * Gets the value of the name property.
181 *
182 * @return
183 * possible object is
184 * {@link String }
185 *
186 */
187 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
188 public String getName() {
189 return name;
190 }
191
192 /**
193 * Sets the value of the name property.
194 *
195 * @param value
196 * allowed object is
197 * {@link String }
198 *
199 */
200 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
201 public void setName(String value) {
202 this.name = value;
203 }
204
205 /**
206 * Gets the value of the catalog property.
207 *
208 * @return
209 * possible object is
210 * {@link String }
211 *
212 */
213 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
214 public String getCatalog() {
215 return catalog;
216 }
217
218 /**
219 * Sets the value of the catalog property.
220 *
221 * @param value
222 * allowed object is
223 * {@link String }
224 *
225 */
226 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
227 public void setCatalog(String value) {
228 this.catalog = value;
229 }
230
231 /**
232 * Gets the value of the schema property.
233 *
234 * @return
235 * possible object is
236 * {@link String }
237 *
238 */
239 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
240 public String getSchema() {
241 return schema;
242 }
243
244 /**
245 * Sets the value of the schema property.
246 *
247 * @param value
248 * allowed object is
249 * {@link String }
250 *
251 */
252 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
253 public void setSchema(String value) {
254 this.schema = value;
255 }
256
257 /**
258 * Copies all values of property {@code PrimaryKeyJoinColumn} deeply.
259 *
260 * @param target
261 * The target to copy {@code source} to.
262 * @param source
263 * The source to copy from.
264 * @throws NullPointerException
265 * if {@code source} or {@code target} is {@code null}.
266 */
267 @SuppressWarnings("unchecked")
268 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
269 private static void copyPrimaryKeyJoinColumn(final List<PrimaryKeyJoinColumn> source, final List<PrimaryKeyJoinColumn> target) {
270 // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
271 if (!source.isEmpty()) {
272 for (Iterator it = source.iterator(); it.hasNext(); ) {
273 final Object next = it.next();
274 if (next instanceof PrimaryKeyJoinColumn) {
275 // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.PrimaryKeyJoinColumn
276 target.add(((PrimaryKeyJoinColumn) next).clone());
277 continue;
278 }
279 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
280 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'PrimaryKeyJoinColumn' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.SecondaryTable'."));
281 }
282 }
283 }
284
285 /**
286 * Copies all values of property {@code UniqueConstraint} deeply.
287 *
288 * @param target
289 * The target to copy {@code source} to.
290 * @param source
291 * The source to copy from.
292 * @throws NullPointerException
293 * if {@code source} or {@code target} is {@code null}.
294 */
295 @SuppressWarnings("unchecked")
296 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
297 private static void copyUniqueConstraint(final List<UniqueConstraint> source, final List<UniqueConstraint> target) {
298 // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
299 if (!source.isEmpty()) {
300 for (Iterator it = source.iterator(); it.hasNext(); ) {
301 final Object next = it.next();
302 if (next instanceof UniqueConstraint) {
303 // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.UniqueConstraint
304 target.add(((UniqueConstraint) next).clone());
305 continue;
306 }
307 // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
308 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'UniqueConstraint' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.SecondaryTable'."));
309 }
310 }
311 }
312
313 /**
314 * Creates and returns a deep copy of this object.
315 *
316 *
317 * @return
318 * A deep copy of this object.
319 */
320 @Override
321 @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
322 public SecondaryTable clone() {
323 // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
324 return new SecondaryTable(this);
325 }
326
327 }