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.XmlElement;
007import javax.xml.bind.annotation.XmlRootElement;
008import javax.xml.bind.annotation.XmlSchemaType;
009import javax.xml.bind.annotation.XmlType;
010import java.math.BigInteger;
011import java.util.ArrayList;
012import java.util.List;
013
014
015/**
016 * <p>Java class for anonymous complex type.
017 *
018 * <p>The following schema fragment specifies the expected content contained within this class.
019 *
020 * <pre>
021 * &lt;complexType>
022 *   &lt;complexContent>
023 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
024 *       &lt;sequence>
025 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}column" maxOccurs="unbounded"/>
026 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}uniqueConstraint" maxOccurs="unbounded" minOccurs="0"/>
027 *         &lt;element ref="{http://ebean-orm.github.io/xml/ns/dbmigration}foreignKey" maxOccurs="unbounded" minOccurs="0"/>
028 *       &lt;/sequence>
029 *       &lt;attGroup ref="{http://ebean-orm.github.io/xml/ns/dbmigration}tablespaceAttributes"/>
030 *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
031 *       &lt;attribute name="partitionMode" type="{http://www.w3.org/2001/XMLSchema}string" />
032 *       &lt;attribute name="partitionColumn" type="{http://www.w3.org/2001/XMLSchema}string" />
033 *       &lt;attribute name="withHistory" type="{http://www.w3.org/2001/XMLSchema}boolean" />
034 *       &lt;attribute name="draft" type="{http://www.w3.org/2001/XMLSchema}boolean" />
035 *       &lt;attribute name="identityType" type="{http://ebean-orm.github.io/xml/ns/dbmigration}identityType" />
036 *       &lt;attribute name="identityStart" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
037 *       &lt;attribute name="identityIncrement" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
038 *       &lt;attribute name="identityCache" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
039 *       &lt;attribute name="identityGenerated" type="{http://www.w3.org/2001/XMLSchema}string" />
040 *       &lt;attribute name="sequenceName" type="{http://www.w3.org/2001/XMLSchema}string" />
041 *       &lt;attribute name="sequenceInitial" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
042 *       &lt;attribute name="sequenceAllocate" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
043 *       &lt;attribute name="pkName" type="{http://www.w3.org/2001/XMLSchema}string" />
044 *       &lt;attribute name="storageEngine" type="{http://www.w3.org/2001/XMLSchema}string" />
045 *     &lt;/restriction>
046 *   &lt;/complexContent>
047 * &lt;/complexType>
048 * </pre>
049 */
050@XmlAccessorType(XmlAccessType.FIELD)
051@XmlType(name = "", propOrder = {
052  "column",
053  "uniqueConstraint",
054  "foreignKey"
055})
056@XmlRootElement(name = "createTable")
057public class CreateTable {
058
059  @XmlElement(required = true)
060  protected List<Column> column;
061  protected List<UniqueConstraint> uniqueConstraint;
062  protected List<ForeignKey> foreignKey;
063  @XmlAttribute(name = "name", required = true)
064  protected String name;
065  @XmlAttribute(name = "partitionMode")
066  protected String partitionMode;
067  @XmlAttribute(name = "partitionColumn")
068  protected String partitionColumn;
069  @XmlAttribute(name = "withHistory")
070  protected Boolean withHistory;
071  @XmlAttribute(name = "draft")
072  protected Boolean draft;
073  @XmlAttribute(name = "identityType")
074  protected IdentityType identityType;
075  @XmlAttribute(name = "identityStart")
076  @XmlSchemaType(name = "positiveInteger")
077  protected BigInteger identityStart;
078  @XmlAttribute(name = "identityIncrement")
079  @XmlSchemaType(name = "positiveInteger")
080  protected BigInteger identityIncrement;
081  @XmlAttribute(name = "identityCache")
082  @XmlSchemaType(name = "positiveInteger")
083  protected BigInteger identityCache;
084  @XmlAttribute(name = "identityGenerated")
085  protected String identityGenerated;
086  @XmlAttribute(name = "sequenceName")
087  protected String sequenceName;
088  @XmlAttribute(name = "sequenceInitial")
089  @XmlSchemaType(name = "positiveInteger")
090  protected BigInteger sequenceInitial;
091  @XmlAttribute(name = "sequenceAllocate")
092  @XmlSchemaType(name = "positiveInteger")
093  protected BigInteger sequenceAllocate;
094  @XmlAttribute(name = "pkName")
095  protected String pkName;
096  @XmlAttribute(name = "storageEngine")
097  protected String storageEngine;
098  @XmlAttribute(name = "tablespace")
099  protected String tablespace;
100  @XmlAttribute(name = "indexTablespace")
101  protected String indexTablespace;
102  @XmlAttribute(name = "comment")
103  protected String comment;
104
105  /**
106   * Gets the value of the column property.
107   *
108   * <p>
109   * This accessor method returns a reference to the live list,
110   * not a snapshot. Therefore any modification you make to the
111   * returned list will be present inside the JAXB object.
112   * This is why there is not a <CODE>set</CODE> method for the column property.
113   *
114   * <p>
115   * For example, to add a new item, do as follows:
116   * <pre>
117   *    getColumn().add(newItem);
118   * </pre>
119   *
120   *
121   * <p>
122   * Objects of the following type(s) are allowed in the list
123   * {@link Column }
124   */
125  public List<Column> getColumn() {
126    if (column == null) {
127      column = new ArrayList<>();
128    }
129    return this.column;
130  }
131
132  /**
133   * Gets the value of the uniqueConstraint property.
134   *
135   * <p>
136   * This accessor method returns a reference to the live list,
137   * not a snapshot. Therefore any modification you make to the
138   * returned list will be present inside the JAXB object.
139   * This is why there is not a <CODE>set</CODE> method for the uniqueConstraint property.
140   *
141   * <p>
142   * For example, to add a new item, do as follows:
143   * <pre>
144   *    getUniqueConstraint().add(newItem);
145   * </pre>
146   *
147   *
148   * <p>
149   * Objects of the following type(s) are allowed in the list
150   * {@link UniqueConstraint }
151   */
152  public List<UniqueConstraint> getUniqueConstraint() {
153    if (uniqueConstraint == null) {
154      uniqueConstraint = new ArrayList<>();
155    }
156    return this.uniqueConstraint;
157  }
158
159  /**
160   * Gets the value of the foreignKey property.
161   *
162   * <p>
163   * This accessor method returns a reference to the live list,
164   * not a snapshot. Therefore any modification you make to the
165   * returned list will be present inside the JAXB object.
166   * This is why there is not a <CODE>set</CODE> method for the foreignKey property.
167   *
168   * <p>
169   * For example, to add a new item, do as follows:
170   * <pre>
171   *    getForeignKey().add(newItem);
172   * </pre>
173   *
174   *
175   * <p>
176   * Objects of the following type(s) are allowed in the list
177   * {@link ForeignKey }
178   */
179  public List<ForeignKey> getForeignKey() {
180    if (foreignKey == null) {
181      foreignKey = new ArrayList<>();
182    }
183    return this.foreignKey;
184  }
185
186  /**
187   * Gets the value of the name property.
188   *
189   * @return possible object is
190   * {@link String }
191   */
192  public String getName() {
193    return name;
194  }
195
196  /**
197   * Sets the value of the name property.
198   *
199   * @param value allowed object is
200   *              {@link String }
201   */
202  public void setName(String value) {
203    this.name = value;
204  }
205
206  /**
207   * Gets the value of the partitionMode property.
208   *
209   * @return possible object is
210   * {@link String }
211   */
212  public String getPartitionMode() {
213    return partitionMode;
214  }
215
216  /**
217   * Sets the value of the partitionMode property.
218   *
219   * @param value allowed object is
220   *              {@link String }
221   */
222  public void setPartitionMode(String value) {
223    this.partitionMode = value;
224  }
225
226  /**
227   * Gets the value of the partitionColumn property.
228   *
229   * @return possible object is
230   * {@link String }
231   */
232  public String getPartitionColumn() {
233    return partitionColumn;
234  }
235
236  /**
237   * Sets the value of the partitionColumn property.
238   *
239   * @param value allowed object is
240   *              {@link String }
241   */
242  public void setPartitionColumn(String value) {
243    this.partitionColumn = value;
244  }
245
246  /**
247   * Gets the value of the withHistory property.
248   *
249   * @return possible object is
250   * {@link Boolean }
251   */
252  public Boolean isWithHistory() {
253    return withHistory;
254  }
255
256  /**
257   * Sets the value of the withHistory property.
258   *
259   * @param value allowed object is
260   *              {@link Boolean }
261   */
262  public void setWithHistory(Boolean value) {
263    this.withHistory = value;
264  }
265
266  /**
267   * Gets the value of the draft property.
268   *
269   * @return possible object is
270   * {@link Boolean }
271   */
272  public Boolean isDraft() {
273    return draft;
274  }
275
276  /**
277   * Sets the value of the draft property.
278   *
279   * @param value allowed object is
280   *              {@link Boolean }
281   */
282  public void setDraft(Boolean value) {
283    this.draft = value;
284  }
285
286  /**
287   * Gets the value of the identityType property.
288   *
289   * @return possible object is
290   * {@link IdentityType }
291   */
292  public IdentityType getIdentityType() {
293    return identityType;
294  }
295
296  /**
297   * Sets the value of the identityType property.
298   *
299   * @param value allowed object is
300   *              {@link IdentityType }
301   */
302  public void setIdentityType(IdentityType value) {
303    this.identityType = value;
304  }
305
306  /**
307   * Gets the value of the identityStart property.
308   *
309   * @return possible object is
310   * {@link BigInteger }
311   */
312  public BigInteger getIdentityStart() {
313    return identityStart;
314  }
315
316  /**
317   * Sets the value of the identityStart property.
318   *
319   * @param value allowed object is
320   *              {@link BigInteger }
321   */
322  public void setIdentityStart(BigInteger value) {
323    this.identityStart = value;
324  }
325
326  /**
327   * Gets the value of the identityIncrement property.
328   *
329   * @return possible object is
330   * {@link BigInteger }
331   */
332  public BigInteger getIdentityIncrement() {
333    return identityIncrement;
334  }
335
336  /**
337   * Sets the value of the identityIncrement property.
338   *
339   * @param value allowed object is
340   *              {@link BigInteger }
341   */
342  public void setIdentityIncrement(BigInteger value) {
343    this.identityIncrement = value;
344  }
345
346  /**
347   * Gets the value of the identityCache property.
348   *
349   * @return possible object is
350   * {@link BigInteger }
351   */
352  public BigInteger getIdentityCache() {
353    return identityCache;
354  }
355
356  /**
357   * Sets the value of the identityCache property.
358   *
359   * @param value allowed object is
360   *              {@link BigInteger }
361   */
362  public void setIdentityCache(BigInteger value) {
363    this.identityCache = value;
364  }
365
366  /**
367   * Gets the value of the identityGenerated property.
368   *
369   * @return possible object is
370   * {@link String }
371   */
372  public String getIdentityGenerated() {
373    return identityGenerated;
374  }
375
376  /**
377   * Sets the value of the identityGenerated property.
378   *
379   * @param value allowed object is
380   *              {@link String }
381   */
382  public void setIdentityGenerated(String value) {
383    this.identityGenerated = value;
384  }
385
386  /**
387   * Gets the value of the sequenceName property.
388   *
389   * @return possible object is
390   * {@link String }
391   */
392  public String getSequenceName() {
393    return sequenceName;
394  }
395
396  /**
397   * Sets the value of the sequenceName property.
398   *
399   * @param value allowed object is
400   *              {@link String }
401   */
402  public void setSequenceName(String value) {
403    this.sequenceName = value;
404  }
405
406  /**
407   * Gets the value of the sequenceInitial property.
408   *
409   * @return possible object is
410   * {@link BigInteger }
411   */
412  public BigInteger getSequenceInitial() {
413    return sequenceInitial;
414  }
415
416  /**
417   * Sets the value of the sequenceInitial property.
418   *
419   * @param value allowed object is
420   *              {@link BigInteger }
421   */
422  public void setSequenceInitial(BigInteger value) {
423    this.sequenceInitial = value;
424  }
425
426  /**
427   * Gets the value of the sequenceAllocate property.
428   *
429   * @return possible object is
430   * {@link BigInteger }
431   */
432  public BigInteger getSequenceAllocate() {
433    return sequenceAllocate;
434  }
435
436  /**
437   * Sets the value of the sequenceAllocate property.
438   *
439   * @param value allowed object is
440   *              {@link BigInteger }
441   */
442  public void setSequenceAllocate(BigInteger value) {
443    this.sequenceAllocate = value;
444  }
445
446  /**
447   * Gets the value of the pkName property.
448   *
449   * @return possible object is
450   * {@link String }
451   */
452  public String getPkName() {
453    return pkName;
454  }
455
456  /**
457   * Sets the value of the pkName property.
458   *
459   * @param value allowed object is
460   *              {@link String }
461   */
462  public void setPkName(String value) {
463    this.pkName = value;
464  }
465
466  /**
467   * Gets the value of the storageEngine property.
468   *
469   * @return possible object is
470   * {@link String }
471   */
472  public String getStorageEngine() {
473    return storageEngine;
474  }
475
476  /**
477   * Sets the value of the storageEngine property.
478   *
479   * @param value allowed object is
480   *              {@link String }
481   */
482  public void setStorageEngine(String value) {
483    this.storageEngine = value;
484  }
485
486  /**
487   * Gets the value of the tablespace property.
488   *
489   * @return possible object is
490   * {@link String }
491   */
492  public String getTablespace() {
493    return tablespace;
494  }
495
496  /**
497   * Sets the value of the tablespace property.
498   *
499   * @param value allowed object is
500   *              {@link String }
501   */
502  public void setTablespace(String value) {
503    this.tablespace = value;
504  }
505
506  /**
507   * Gets the value of the indexTablespace property.
508   *
509   * @return possible object is
510   * {@link String }
511   */
512  public String getIndexTablespace() {
513    return indexTablespace;
514  }
515
516  /**
517   * Sets the value of the indexTablespace property.
518   *
519   * @param value allowed object is
520   *              {@link String }
521   */
522  public void setIndexTablespace(String value) {
523    this.indexTablespace = value;
524  }
525
526  /**
527   * Gets the value of the comment property.
528   *
529   * @return possible object is
530   * {@link String }
531   */
532  public String getComment() {
533    return comment;
534  }
535
536  /**
537   * Sets the value of the comment property.
538   *
539   * @param value allowed object is
540   *              {@link String }
541   */
542  public void setComment(String value) {
543    this.comment = value;
544  }
545
546}