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