001package io.ebeaninternal.dbmigration.migration;
002
003import javax.xml.bind.annotation.XmlAccessType;
004import javax.xml.bind.annotation.XmlAccessorType;
005import javax.xml.bind.annotation.XmlAttribute;
006import javax.xml.bind.annotation.XmlRootElement;
007import javax.xml.bind.annotation.XmlType;
008import java.util.ArrayList;
009import java.util.List;
010
011
012/**
013 * <p>Java class for anonymous complex type.
014 *
015 * <p>The following schema fragment specifies the expected content contained within this class.
016 *
017 * <pre>
018 * &lt;complexType>
019 *   &lt;complexContent>
020 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
021 *       &lt;sequence>
022 *         &lt;element name="before" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
023 *         &lt;element name="after" type="{http://ebean-orm.github.io/xml/ns/dbmigration}ddl-script" maxOccurs="unbounded" minOccurs="0"/>
024 *       &lt;/sequence>
025 *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
026 *       &lt;attribute name="type" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
027 *       &lt;attribute name="defaultValue" type="{http://www.w3.org/2001/XMLSchema}string" />
028 *       &lt;attribute name="notnull" type="{http://www.w3.org/2001/XMLSchema}boolean" />
029 *       &lt;attribute name="historyExclude" type="{http://www.w3.org/2001/XMLSchema}boolean" />
030 *       &lt;attribute name="primaryKey" type="{http://www.w3.org/2001/XMLSchema}boolean" />
031 *       &lt;attribute name="identity" type="{http://www.w3.org/2001/XMLSchema}boolean" />
032 *       &lt;attribute name="checkConstraint" type="{http://www.w3.org/2001/XMLSchema}string" />
033 *       &lt;attribute name="checkConstraintName" type="{http://www.w3.org/2001/XMLSchema}string" />
034 *       &lt;attribute name="unique" type="{http://www.w3.org/2001/XMLSchema}string" />
035 *       &lt;attribute name="uniqueOneToOne" type="{http://www.w3.org/2001/XMLSchema}string" />
036 *       &lt;attribute name="references" type="{http://www.w3.org/2001/XMLSchema}string" />
037 *       &lt;attribute name="foreignKeyName" type="{http://www.w3.org/2001/XMLSchema}string" />
038 *       &lt;attribute name="foreignKeyIndex" type="{http://www.w3.org/2001/XMLSchema}string" />
039 *       &lt;attribute name="foreignKeyOnDelete" type="{http://www.w3.org/2001/XMLSchema}string" />
040 *       &lt;attribute name="foreignKeyOnUpdate" type="{http://www.w3.org/2001/XMLSchema}string" />
041 *       &lt;attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" />
042 *     &lt;/restriction>
043 *   &lt;/complexContent>
044 * &lt;/complexType>
045 * </pre>
046 */
047@XmlAccessorType(XmlAccessType.FIELD)
048@XmlType(name = "", propOrder = {
049  "before",
050  "after"
051})
052@XmlRootElement(name = "column")
053public class Column {
054
055  protected List<DdlScript> before;
056  protected List<DdlScript> after;
057  @XmlAttribute(name = "name", required = true)
058  protected String name;
059  @XmlAttribute(name = "type", required = true)
060  protected String type;
061  @XmlAttribute(name = "defaultValue")
062  protected String defaultValue;
063  @XmlAttribute(name = "notnull")
064  protected Boolean notnull;
065  @XmlAttribute(name = "historyExclude")
066  protected Boolean historyExclude;
067  @XmlAttribute(name = "primaryKey")
068  protected Boolean primaryKey;
069  @XmlAttribute(name = "identity")
070  protected Boolean identity;
071  @XmlAttribute(name = "checkConstraint")
072  protected String checkConstraint;
073  @XmlAttribute(name = "checkConstraintName")
074  protected String checkConstraintName;
075  @XmlAttribute(name = "unique")
076  protected String unique;
077  @XmlAttribute(name = "uniqueOneToOne")
078  protected String uniqueOneToOne;
079  @XmlAttribute(name = "references")
080  protected String references;
081  @XmlAttribute(name = "foreignKeyName")
082  protected String foreignKeyName;
083  @XmlAttribute(name = "foreignKeyIndex")
084  protected String foreignKeyIndex;
085  @XmlAttribute(name = "foreignKeyOnDelete")
086  protected String foreignKeyOnDelete;
087  @XmlAttribute(name = "foreignKeyOnUpdate")
088  protected String foreignKeyOnUpdate;
089  @XmlAttribute(name = "comment")
090  protected String comment;
091
092  /**
093   * Gets the value of the before property.
094   *
095   * <p>
096   * This accessor method returns a reference to the live list,
097   * not a snapshot. Therefore any modification you make to the
098   * returned list will be present inside the JAXB object.
099   * This is why there is not a <CODE>set</CODE> method for the before property.
100   *
101   * <p>
102   * For example, to add a new item, do as follows:
103   * <pre>
104   *    getBefore().add(newItem);
105   * </pre>
106   *
107   *
108   * <p>
109   * Objects of the following type(s) are allowed in the list
110   * {@link DdlScript }
111   */
112  public List<DdlScript> getBefore() {
113    if (before == null) {
114      before = new ArrayList<>();
115    }
116    return this.before;
117  }
118
119  /**
120   * Gets the value of the after 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 after property.
127   *
128   * <p>
129   * For example, to add a new item, do as follows:
130   * <pre>
131   *    getAfter().add(newItem);
132   * </pre>
133   *
134   *
135   * <p>
136   * Objects of the following type(s) are allowed in the list
137   * {@link DdlScript }
138   */
139  public List<DdlScript> getAfter() {
140    if (after == null) {
141      after = new ArrayList<>();
142    }
143    return this.after;
144  }
145
146  /**
147   * Gets the value of the name property.
148   *
149   * @return possible object is
150   * {@link String }
151   */
152  public String getName() {
153    return name;
154  }
155
156  /**
157   * Sets the value of the name property.
158   *
159   * @param value allowed object is
160   *              {@link String }
161   */
162  public void setName(String value) {
163    this.name = value;
164  }
165
166  /**
167   * Gets the value of the type property.
168   *
169   * @return possible object is
170   * {@link String }
171   */
172  public String getType() {
173    return type;
174  }
175
176  /**
177   * Sets the value of the type property.
178   *
179   * @param value allowed object is
180   *              {@link String }
181   */
182  public void setType(String value) {
183    this.type = value;
184  }
185
186  /**
187   * Gets the value of the defaultValue property.
188   *
189   * @return possible object is
190   * {@link String }
191   */
192  public String getDefaultValue() {
193    return defaultValue;
194  }
195
196  /**
197   * Sets the value of the defaultValue property.
198   *
199   * @param value allowed object is
200   *              {@link String }
201   */
202  public void setDefaultValue(String value) {
203    this.defaultValue = value;
204  }
205
206  /**
207   * Gets the value of the notnull property.
208   *
209   * @return possible object is
210   * {@link Boolean }
211   */
212  public Boolean isNotnull() {
213    return notnull;
214  }
215
216  /**
217   * Sets the value of the notnull property.
218   *
219   * @param value allowed object is
220   *              {@link Boolean }
221   */
222  public void setNotnull(Boolean value) {
223    this.notnull = value;
224  }
225
226  /**
227   * Gets the value of the historyExclude property.
228   *
229   * @return possible object is
230   * {@link Boolean }
231   */
232  public Boolean isHistoryExclude() {
233    return historyExclude;
234  }
235
236  /**
237   * Sets the value of the historyExclude property.
238   *
239   * @param value allowed object is
240   *              {@link Boolean }
241   */
242  public void setHistoryExclude(Boolean value) {
243    this.historyExclude = value;
244  }
245
246  /**
247   * Gets the value of the primaryKey property.
248   *
249   * @return possible object is
250   * {@link Boolean }
251   */
252  public Boolean isPrimaryKey() {
253    return primaryKey;
254  }
255
256  /**
257   * Sets the value of the primaryKey property.
258   *
259   * @param value allowed object is
260   *              {@link Boolean }
261   */
262  public void setPrimaryKey(Boolean value) {
263    this.primaryKey = value;
264  }
265
266  /**
267   * Gets the value of the identity property.
268   *
269   * @return possible object is
270   * {@link Boolean }
271   */
272  public Boolean isIdentity() {
273    return identity;
274  }
275
276  /**
277   * Sets the value of the identity property.
278   *
279   * @param value allowed object is
280   *              {@link Boolean }
281   */
282  public void setIdentity(Boolean value) {
283    this.identity = value;
284  }
285
286  /**
287   * Gets the value of the checkConstraint property.
288   *
289   * @return possible object is
290   * {@link String }
291   */
292  public String getCheckConstraint() {
293    return checkConstraint;
294  }
295
296  /**
297   * Sets the value of the checkConstraint property.
298   *
299   * @param value allowed object is
300   *              {@link String }
301   */
302  public void setCheckConstraint(String value) {
303    this.checkConstraint = value;
304  }
305
306  /**
307   * Gets the value of the checkConstraintName property.
308   *
309   * @return possible object is
310   * {@link String }
311   */
312  public String getCheckConstraintName() {
313    return checkConstraintName;
314  }
315
316  /**
317   * Sets the value of the checkConstraintName property.
318   *
319   * @param value allowed object is
320   *              {@link String }
321   */
322  public void setCheckConstraintName(String value) {
323    this.checkConstraintName = value;
324  }
325
326  /**
327   * Gets the value of the unique property.
328   *
329   * @return possible object is
330   * {@link String }
331   */
332  public String getUnique() {
333    return unique;
334  }
335
336  /**
337   * Sets the value of the unique property.
338   *
339   * @param value allowed object is
340   *              {@link String }
341   */
342  public void setUnique(String value) {
343    this.unique = value;
344  }
345
346  /**
347   * Gets the value of the uniqueOneToOne property.
348   *
349   * @return possible object is
350   * {@link String }
351   */
352  public String getUniqueOneToOne() {
353    return uniqueOneToOne;
354  }
355
356  /**
357   * Sets the value of the uniqueOneToOne property.
358   *
359   * @param value allowed object is
360   *              {@link String }
361   */
362  public void setUniqueOneToOne(String value) {
363    this.uniqueOneToOne = value;
364  }
365
366  /**
367   * Gets the value of the references property.
368   *
369   * @return possible object is
370   * {@link String }
371   */
372  public String getReferences() {
373    return references;
374  }
375
376  /**
377   * Sets the value of the references property.
378   *
379   * @param value allowed object is
380   *              {@link String }
381   */
382  public void setReferences(String value) {
383    this.references = value;
384  }
385
386  /**
387   * Gets the value of the foreignKeyName property.
388   *
389   * @return possible object is
390   * {@link String }
391   */
392  public String getForeignKeyName() {
393    return foreignKeyName;
394  }
395
396  /**
397   * Sets the value of the foreignKeyName property.
398   *
399   * @param value allowed object is
400   *              {@link String }
401   */
402  public void setForeignKeyName(String value) {
403    this.foreignKeyName = value;
404  }
405
406  /**
407   * Gets the value of the foreignKeyIndex property.
408   *
409   * @return possible object is
410   * {@link String }
411   */
412  public String getForeignKeyIndex() {
413    return foreignKeyIndex;
414  }
415
416  /**
417   * Sets the value of the foreignKeyIndex property.
418   *
419   * @param value allowed object is
420   *              {@link String }
421   */
422  public void setForeignKeyIndex(String value) {
423    this.foreignKeyIndex = value;
424  }
425
426  /**
427   * Gets the value of the foreignKeyOnDelete property.
428   *
429   * @return possible object is
430   * {@link String }
431   */
432  public String getForeignKeyOnDelete() {
433    return foreignKeyOnDelete;
434  }
435
436  /**
437   * Sets the value of the foreignKeyOnDelete property.
438   *
439   * @param value allowed object is
440   *              {@link String }
441   */
442  public void setForeignKeyOnDelete(String value) {
443    this.foreignKeyOnDelete = value;
444  }
445
446  /**
447   * Gets the value of the foreignKeyOnUpdate property.
448   *
449   * @return possible object is
450   * {@link String }
451   */
452  public String getForeignKeyOnUpdate() {
453    return foreignKeyOnUpdate;
454  }
455
456  /**
457   * Sets the value of the foreignKeyOnUpdate property.
458   *
459   * @param value allowed object is
460   *              {@link String }
461   */
462  public void setForeignKeyOnUpdate(String value) {
463    this.foreignKeyOnUpdate = value;
464  }
465
466  /**
467   * Gets the value of the comment property.
468   *
469   * @return possible object is
470   * {@link String }
471   */
472  public String getComment() {
473    return comment;
474  }
475
476  /**
477   * Sets the value of the comment property.
478   *
479   * @param value allowed object is
480   *              {@link String }
481   */
482  public void setComment(String value) {
483    this.comment = value;
484  }
485
486}