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, METHOD, FIELD}) @Retention(RUNTIME)
026     *         public @interface TableGenerator {
027     *           String name();
028     *           String table() default "";
029     *           String catalog() default "";
030     *           String schema() default "";
031     *           String pkColumnName() default "";
032     *           String valueColumnName() default "";
033     *           String pkColumnValue() default "";
034     *           int initialValue() default 0;
035     *           int allocationSize() default 50;
036     *           UniqueConstraint[] uniqueConstraints() default {};
037     *         }
038     * 
039     *       
040     * 
041     * <p>Java class for table-generator complex type.
042     * 
043     * <p>The following schema fragment specifies the expected content contained within this class.
044     * 
045     * <pre>
046     * &lt;complexType name="table-generator">
047     *   &lt;complexContent>
048     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
049     *       &lt;sequence>
050     *         &lt;element name="unique-constraint" type="{http://java.sun.com/xml/ns/persistence/orm}unique-constraint" maxOccurs="unbounded" minOccurs="0"/>
051     *       &lt;/sequence>
052     *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
053     *       &lt;attribute name="table" type="{http://www.w3.org/2001/XMLSchema}string" />
054     *       &lt;attribute name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" />
055     *       &lt;attribute name="schema" type="{http://www.w3.org/2001/XMLSchema}string" />
056     *       &lt;attribute name="pk-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
057     *       &lt;attribute name="value-column-name" type="{http://www.w3.org/2001/XMLSchema}string" />
058     *       &lt;attribute name="pk-column-value" type="{http://www.w3.org/2001/XMLSchema}string" />
059     *       &lt;attribute name="initial-value" type="{http://www.w3.org/2001/XMLSchema}int" />
060     *       &lt;attribute name="allocation-size" type="{http://www.w3.org/2001/XMLSchema}int" />
061     *     &lt;/restriction>
062     *   &lt;/complexContent>
063     * &lt;/complexType>
064     * </pre>
065     * 
066     * 
067     */
068    @XmlAccessorType(XmlAccessType.FIELD)
069    @XmlType(name = "table-generator", propOrder = {
070        "uniqueConstraint"
071    })
072    @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
073    public class TableGenerator implements Cloneable
074    {
075    
076        @XmlElement(name = "unique-constraint")
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 List<UniqueConstraint> uniqueConstraint;
079        @XmlAttribute(required = true)
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 name;
082        @XmlAttribute
083        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
084        protected String table;
085        @XmlAttribute
086        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
087        protected String catalog;
088        @XmlAttribute
089        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
090        protected String schema;
091        @XmlAttribute(name = "pk-column-name")
092        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
093        protected String pkColumnName;
094        @XmlAttribute(name = "value-column-name")
095        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
096        protected String valueColumnName;
097        @XmlAttribute(name = "pk-column-value")
098        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
099        protected String pkColumnValue;
100        @XmlAttribute(name = "initial-value")
101        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
102        protected Integer initialValue;
103        @XmlAttribute(name = "allocation-size")
104        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
105        protected Integer allocationSize;
106    
107        /**
108         * Creates a new {@code TableGenerator} instance.
109         * 
110         */
111        public TableGenerator() {
112            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
113            super();
114        }
115    
116        /**
117         * Creates a new {@code TableGenerator} instance by deeply copying a given {@code TableGenerator} instance.
118         * 
119         * 
120         * @param o
121         *     The instance to copy.
122         * @throws NullPointerException
123         *     if {@code o} is {@code null}.
124         */
125        public TableGenerator(final TableGenerator o) {
126            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
127            super();
128            if (o == null) {
129                throw new NullPointerException("Cannot create a copy of 'TableGenerator' from 'null'.");
130            }
131            // 'UniqueConstraint' collection.
132            copyUniqueConstraint(o.getUniqueConstraint(), getUniqueConstraint());
133            // CBuiltinLeafInfo: java.lang.String
134            this.name = o.getName();
135            // CBuiltinLeafInfo: java.lang.String
136            this.table = o.getTable();
137            // CBuiltinLeafInfo: java.lang.String
138            this.catalog = o.getCatalog();
139            // CBuiltinLeafInfo: java.lang.String
140            this.schema = o.getSchema();
141            // CBuiltinLeafInfo: java.lang.String
142            this.pkColumnName = o.getPkColumnName();
143            // CBuiltinLeafInfo: java.lang.String
144            this.valueColumnName = o.getValueColumnName();
145            // CBuiltinLeafInfo: java.lang.String
146            this.pkColumnValue = o.getPkColumnValue();
147            // CBuiltinLeafInfo: java.lang.Integer
148            this.initialValue = o.getInitialValue();
149            // CBuiltinLeafInfo: java.lang.Integer
150            this.allocationSize = o.getAllocationSize();
151        }
152    
153        /**
154         * Gets the value of the uniqueConstraint property.
155         * 
156         * <p>
157         * This accessor method returns a reference to the live list,
158         * not a snapshot. Therefore any modification you make to the
159         * returned list will be present inside the JAXB object.
160         * This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
161         * 
162         * <p>
163         * For example, to add a new item, do as follows:
164         * <pre>
165         *    getUniqueConstraint().add(newItem);
166         * </pre>
167         * 
168         * 
169         * <p>
170         * Objects of the following type(s) are allowed in the list
171         * {@link UniqueConstraint }
172         * 
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 List<UniqueConstraint> getUniqueConstraint() {
177            if (uniqueConstraint == null) {
178                uniqueConstraint = new ArrayList<UniqueConstraint>();
179            }
180            return this.uniqueConstraint;
181        }
182    
183        /**
184         * Gets the value of the name property.
185         * 
186         * @return
187         *     possible object is
188         *     {@link String }
189         *     
190         */
191        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
192        public String getName() {
193            return name;
194        }
195    
196        /**
197         * Sets the value of the name property.
198         * 
199         * @param value
200         *     allowed object is
201         *     {@link String }
202         *     
203         */
204        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
205        public void setName(String value) {
206            this.name = value;
207        }
208    
209        /**
210         * Gets the value of the table property.
211         * 
212         * @return
213         *     possible object is
214         *     {@link String }
215         *     
216         */
217        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
218        public String getTable() {
219            return table;
220        }
221    
222        /**
223         * Sets the value of the table property.
224         * 
225         * @param value
226         *     allowed object is
227         *     {@link String }
228         *     
229         */
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        public void setTable(String value) {
232            this.table = value;
233        }
234    
235        /**
236         * Gets the value of the catalog property.
237         * 
238         * @return
239         *     possible object is
240         *     {@link String }
241         *     
242         */
243        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
244        public String getCatalog() {
245            return catalog;
246        }
247    
248        /**
249         * Sets the value of the catalog property.
250         * 
251         * @param value
252         *     allowed object is
253         *     {@link String }
254         *     
255         */
256        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
257        public void setCatalog(String value) {
258            this.catalog = value;
259        }
260    
261        /**
262         * Gets the value of the schema property.
263         * 
264         * @return
265         *     possible object is
266         *     {@link String }
267         *     
268         */
269        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
270        public String getSchema() {
271            return schema;
272        }
273    
274        /**
275         * Sets the value of the schema property.
276         * 
277         * @param value
278         *     allowed object is
279         *     {@link String }
280         *     
281         */
282        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
283        public void setSchema(String value) {
284            this.schema = value;
285        }
286    
287        /**
288         * Gets the value of the pkColumnName property.
289         * 
290         * @return
291         *     possible object is
292         *     {@link String }
293         *     
294         */
295        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
296        public String getPkColumnName() {
297            return pkColumnName;
298        }
299    
300        /**
301         * Sets the value of the pkColumnName property.
302         * 
303         * @param value
304         *     allowed object is
305         *     {@link String }
306         *     
307         */
308        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
309        public void setPkColumnName(String value) {
310            this.pkColumnName = value;
311        }
312    
313        /**
314         * Gets the value of the valueColumnName property.
315         * 
316         * @return
317         *     possible object is
318         *     {@link String }
319         *     
320         */
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 String getValueColumnName() {
323            return valueColumnName;
324        }
325    
326        /**
327         * Sets the value of the valueColumnName property.
328         * 
329         * @param value
330         *     allowed object is
331         *     {@link String }
332         *     
333         */
334        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
335        public void setValueColumnName(String value) {
336            this.valueColumnName = value;
337        }
338    
339        /**
340         * Gets the value of the pkColumnValue property.
341         * 
342         * @return
343         *     possible object is
344         *     {@link String }
345         *     
346         */
347        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
348        public String getPkColumnValue() {
349            return pkColumnValue;
350        }
351    
352        /**
353         * Sets the value of the pkColumnValue property.
354         * 
355         * @param value
356         *     allowed object is
357         *     {@link String }
358         *     
359         */
360        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
361        public void setPkColumnValue(String value) {
362            this.pkColumnValue = value;
363        }
364    
365        /**
366         * Gets the value of the initialValue property.
367         * 
368         * @return
369         *     possible object is
370         *     {@link Integer }
371         *     
372         */
373        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
374        public Integer getInitialValue() {
375            return initialValue;
376        }
377    
378        /**
379         * Sets the value of the initialValue property.
380         * 
381         * @param value
382         *     allowed object is
383         *     {@link Integer }
384         *     
385         */
386        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
387        public void setInitialValue(Integer value) {
388            this.initialValue = value;
389        }
390    
391        /**
392         * Gets the value of the allocationSize property.
393         * 
394         * @return
395         *     possible object is
396         *     {@link Integer }
397         *     
398         */
399        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
400        public Integer getAllocationSize() {
401            return allocationSize;
402        }
403    
404        /**
405         * Sets the value of the allocationSize property.
406         * 
407         * @param value
408         *     allowed object is
409         *     {@link Integer }
410         *     
411         */
412        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
413        public void setAllocationSize(Integer value) {
414            this.allocationSize = value;
415        }
416    
417        /**
418         * Copies all values of property {@code UniqueConstraint} deeply.
419         * 
420         * @param target
421         *     The target to copy {@code source} to.
422         * @param source
423         *     The source to copy from.
424         * @throws NullPointerException
425         *     if {@code source} or {@code target} is {@code null}.
426         */
427        @SuppressWarnings("unchecked")
428        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
429        private static void copyUniqueConstraint(final List<UniqueConstraint> source, final List<UniqueConstraint> target) {
430            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
431            if (!source.isEmpty()) {
432                for (Iterator it = source.iterator(); it.hasNext(); ) {
433                    final Object next = it.next();
434                    if (next instanceof UniqueConstraint) {
435                        // CClassInfo: net.sourceforge.jpaxjc.ns.persistence.orm.UniqueConstraint
436                        target.add(((UniqueConstraint) next).clone());
437                        continue;
438                    }
439                    // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/
440                    throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'UniqueConstraint' of class 'net.sourceforge.jpaxjc.ns.persistence.orm.TableGenerator'."));
441                }
442            }
443        }
444    
445        /**
446         * Creates and returns a deep copy of this object.
447         * 
448         * 
449         * @return
450         *     A deep copy of this object.
451         */
452        @Override
453        @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-08-18T10:46:56+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833")
454        public TableGenerator clone() {
455            // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000
456            return new TableGenerator(this);
457        }
458    
459    }