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