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.XmlElements; 008import javax.xml.bind.annotation.XmlRootElement; 009import javax.xml.bind.annotation.XmlType; 010import java.util.ArrayList; 011import java.util.List; 012 013 014/** 015 * <p>Java class for anonymous complex type. 016 * 017 * <p>The following schema fragment specifies the expected content contained within this class. 018 * 019 * <pre> 020 * <complexType> 021 * <complexContent> 022 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 023 * <sequence> 024 * <choice> 025 * <group ref="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetChildren" maxOccurs="unbounded" minOccurs="0"/> 026 * </choice> 027 * </sequence> 028 * <attribute name="type" use="required" type="{http://ebean-orm.github.io/xml/ns/dbmigration}changeSetType" /> 029 * <attribute name="dropsFor" type="{http://www.w3.org/2001/XMLSchema}string" /> 030 * <attribute name="suppressDropsForever" type="{http://www.w3.org/2001/XMLSchema}boolean" /> 031 * <attribute name="generated" type="{http://www.w3.org/2001/XMLSchema}boolean" /> 032 * <attribute name="author" type="{http://www.w3.org/2001/XMLSchema}string" /> 033 * <attribute name="comment" type="{http://www.w3.org/2001/XMLSchema}string" /> 034 * </restriction> 035 * </complexContent> 036 * </complexType> 037 * </pre> 038 */ 039@XmlAccessorType(XmlAccessType.FIELD) 040@XmlType(name = "", propOrder = { 041 "changeSetChildren" 042}) 043@XmlRootElement(name = "changeSet") 044public class ChangeSet { 045 046 @XmlElements({ 047 @XmlElement(name = "configuration", type = Configuration.class), 048 @XmlElement(name = "sql", type = Sql.class), 049 @XmlElement(name = "createTable", type = CreateTable.class), 050 @XmlElement(name = "alterTable", type = AlterTable.class), 051 @XmlElement(name = "dropTable", type = DropTable.class), 052 @XmlElement(name = "renameTable", type = RenameTable.class), 053 @XmlElement(name = "addTableComment", type = AddTableComment.class), 054 @XmlElement(name = "addUniqueConstraint", type = AddUniqueConstraint.class), 055 @XmlElement(name = "addHistoryTable", type = AddHistoryTable.class), 056 @XmlElement(name = "dropHistoryTable", type = DropHistoryTable.class), 057 @XmlElement(name = "alterForeignKey", type = AlterForeignKey.class), 058 @XmlElement(name = "addColumn", type = AddColumn.class), 059 @XmlElement(name = "dropColumn", type = DropColumn.class), 060 @XmlElement(name = "alterColumn", type = AlterColumn.class), 061 @XmlElement(name = "renameColumn", type = RenameColumn.class), 062 @XmlElement(name = "createIndex", type = CreateIndex.class), 063 @XmlElement(name = "dropIndex", type = DropIndex.class) 064 }) 065 protected List<Object> changeSetChildren; 066 @XmlAttribute(name = "type", required = true) 067 protected ChangeSetType type; 068 @XmlAttribute(name = "dropsFor") 069 protected String dropsFor; 070 @XmlAttribute(name = "suppressDropsForever") 071 protected Boolean suppressDropsForever; 072 @XmlAttribute(name = "generated") 073 protected Boolean generated; 074 @XmlAttribute(name = "author") 075 protected String author; 076 @XmlAttribute(name = "comment") 077 protected String comment; 078 079 /** 080 * Gets the value of the changeSetChildren property. 081 * 082 * <p> 083 * This accessor method returns a reference to the live list, 084 * not a snapshot. Therefore any modification you make to the 085 * returned list will be present inside the JAXB object. 086 * This is why there is not a <CODE>set</CODE> method for the changeSetChildren property. 087 * 088 * <p> 089 * For example, to add a new item, do as follows: 090 * <pre> 091 * getChangeSetChildren().add(newItem); 092 * </pre> 093 * 094 * 095 * <p> 096 * Objects of the following type(s) are allowed in the list 097 * {@link Configuration } 098 * {@link Sql } 099 * {@link CreateTable } 100 * {@link DropTable } 101 * {@link RenameTable } 102 * {@link AddTableComment } 103 * {@link AddUniqueConstraint } 104 * {@link AddHistoryTable } 105 * {@link DropHistoryTable } 106 * {@link AlterForeignKey } 107 * {@link AddColumn } 108 * {@link DropColumn } 109 * {@link AlterColumn } 110 * {@link RenameColumn } 111 * {@link CreateIndex } 112 * {@link DropIndex } 113 */ 114 public List<Object> getChangeSetChildren() { 115 if (changeSetChildren == null) { 116 changeSetChildren = new ArrayList<>(); 117 } 118 return this.changeSetChildren; 119 } 120 121 /** 122 * Gets the value of the type property. 123 * 124 * @return possible object is 125 * {@link ChangeSetType } 126 */ 127 public ChangeSetType getType() { 128 return type; 129 } 130 131 /** 132 * Sets the value of the type property. 133 * 134 * @param value allowed object is 135 * {@link ChangeSetType } 136 */ 137 public void setType(ChangeSetType value) { 138 this.type = value; 139 } 140 141 /** 142 * Gets the value of the dropsFor property. 143 * 144 * @return possible object is 145 * {@link String } 146 */ 147 public String getDropsFor() { 148 return dropsFor; 149 } 150 151 /** 152 * Sets the value of the dropsFor property. 153 * 154 * @param value allowed object is 155 * {@link String } 156 */ 157 public void setDropsFor(String value) { 158 this.dropsFor = value; 159 } 160 161 /** 162 * Gets the value of the suppressDropsForever property. 163 * 164 * @return possible object is 165 * {@link Boolean } 166 */ 167 public Boolean isSuppressDropsForever() { 168 return suppressDropsForever; 169 } 170 171 /** 172 * Sets the value of the suppressDropsForever property. 173 * 174 * @param value allowed object is 175 * {@link Boolean } 176 */ 177 public void setSuppressDropsForever(Boolean value) { 178 this.suppressDropsForever = value; 179 } 180 181 /** 182 * Gets the value of the generated property. 183 * 184 * @return possible object is 185 * {@link Boolean } 186 */ 187 public Boolean isGenerated() { 188 return generated; 189 } 190 191 /** 192 * Sets the value of the generated property. 193 * 194 * @param value allowed object is 195 * {@link Boolean } 196 */ 197 public void setGenerated(Boolean value) { 198 this.generated = value; 199 } 200 201 /** 202 * Gets the value of the author property. 203 * 204 * @return possible object is 205 * {@link String } 206 */ 207 public String getAuthor() { 208 return author; 209 } 210 211 /** 212 * Sets the value of the author property. 213 * 214 * @param value allowed object is 215 * {@link String } 216 */ 217 public void setAuthor(String value) { 218 this.author = value; 219 } 220 221 /** 222 * Gets the value of the comment property. 223 * 224 * @return possible object is 225 * {@link String } 226 */ 227 public String getComment() { 228 return comment; 229 } 230 231 /** 232 * Sets the value of the comment property. 233 * 234 * @param value allowed object is 235 * {@link String } 236 */ 237 public void setComment(String value) { 238 this.comment = value; 239 } 240 241}