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 = "dropTable", type = DropTable.class), 051 @XmlElement(name = "renameTable", type = RenameTable.class), 052 @XmlElement(name = "addTableComment", type = AddTableComment.class), 053 @XmlElement(name = "addUniqueConstraint", type = AddUniqueConstraint.class), 054 @XmlElement(name = "addHistoryTable", type = AddHistoryTable.class), 055 @XmlElement(name = "dropHistoryTable", type = DropHistoryTable.class), 056 @XmlElement(name = "alterForeignKey", type = AlterForeignKey.class), 057 @XmlElement(name = "addColumn", type = AddColumn.class), 058 @XmlElement(name = "dropColumn", type = DropColumn.class), 059 @XmlElement(name = "alterColumn", type = AlterColumn.class), 060 @XmlElement(name = "renameColumn", type = RenameColumn.class), 061 @XmlElement(name = "createIndex", type = CreateIndex.class), 062 @XmlElement(name = "dropIndex", type = DropIndex.class) 063 }) 064 protected List<Object> changeSetChildren; 065 @XmlAttribute(name = "type", required = true) 066 protected ChangeSetType type; 067 @XmlAttribute(name = "dropsFor") 068 protected String dropsFor; 069 @XmlAttribute(name = "suppressDropsForever") 070 protected Boolean suppressDropsForever; 071 @XmlAttribute(name = "generated") 072 protected Boolean generated; 073 @XmlAttribute(name = "author") 074 protected String author; 075 @XmlAttribute(name = "comment") 076 protected String comment; 077 078 /** 079 * Gets the value of the changeSetChildren property. 080 * 081 * <p> 082 * This accessor method returns a reference to the live list, 083 * not a snapshot. Therefore any modification you make to the 084 * returned list will be present inside the JAXB object. 085 * This is why there is not a <CODE>set</CODE> method for the changeSetChildren property. 086 * 087 * <p> 088 * For example, to add a new item, do as follows: 089 * <pre> 090 * getChangeSetChildren().add(newItem); 091 * </pre> 092 * 093 * 094 * <p> 095 * Objects of the following type(s) are allowed in the list 096 * {@link Configuration } 097 * {@link Sql } 098 * {@link CreateTable } 099 * {@link DropTable } 100 * {@link RenameTable } 101 * {@link AddTableComment } 102 * {@link AddUniqueConstraint } 103 * {@link AddHistoryTable } 104 * {@link DropHistoryTable } 105 * {@link AlterForeignKey } 106 * {@link AddColumn } 107 * {@link DropColumn } 108 * {@link AlterColumn } 109 * {@link RenameColumn } 110 * {@link CreateIndex } 111 * {@link DropIndex } 112 */ 113 public List<Object> getChangeSetChildren() { 114 if (changeSetChildren == null) { 115 changeSetChildren = new ArrayList<>(); 116 } 117 return this.changeSetChildren; 118 } 119 120 /** 121 * Gets the value of the type property. 122 * 123 * @return possible object is 124 * {@link ChangeSetType } 125 */ 126 public ChangeSetType getType() { 127 return type; 128 } 129 130 /** 131 * Sets the value of the type property. 132 * 133 * @param value allowed object is 134 * {@link ChangeSetType } 135 */ 136 public void setType(ChangeSetType value) { 137 this.type = value; 138 } 139 140 /** 141 * Gets the value of the dropsFor property. 142 * 143 * @return possible object is 144 * {@link String } 145 */ 146 public String getDropsFor() { 147 return dropsFor; 148 } 149 150 /** 151 * Sets the value of the dropsFor property. 152 * 153 * @param value allowed object is 154 * {@link String } 155 */ 156 public void setDropsFor(String value) { 157 this.dropsFor = value; 158 } 159 160 /** 161 * Gets the value of the suppressDropsForever property. 162 * 163 * @return possible object is 164 * {@link Boolean } 165 */ 166 public Boolean isSuppressDropsForever() { 167 return suppressDropsForever; 168 } 169 170 /** 171 * Sets the value of the suppressDropsForever property. 172 * 173 * @param value allowed object is 174 * {@link Boolean } 175 */ 176 public void setSuppressDropsForever(Boolean value) { 177 this.suppressDropsForever = value; 178 } 179 180 /** 181 * Gets the value of the generated property. 182 * 183 * @return possible object is 184 * {@link Boolean } 185 */ 186 public Boolean isGenerated() { 187 return generated; 188 } 189 190 /** 191 * Sets the value of the generated property. 192 * 193 * @param value allowed object is 194 * {@link Boolean } 195 */ 196 public void setGenerated(Boolean value) { 197 this.generated = value; 198 } 199 200 /** 201 * Gets the value of the author property. 202 * 203 * @return possible object is 204 * {@link String } 205 */ 206 public String getAuthor() { 207 return author; 208 } 209 210 /** 211 * Sets the value of the author property. 212 * 213 * @param value allowed object is 214 * {@link String } 215 */ 216 public void setAuthor(String value) { 217 this.author = value; 218 } 219 220 /** 221 * Gets the value of the comment property. 222 * 223 * @return possible object is 224 * {@link String } 225 */ 226 public String getComment() { 227 return comment; 228 } 229 230 /** 231 * Sets the value of the comment property. 232 * 233 * @param value allowed object is 234 * {@link String } 235 */ 236 public void setComment(String value) { 237 this.comment = value; 238 } 239 240}