From 1585bd7cd07c29c8a4f399ae0ba44f0da28a9aa0 Mon Sep 17 00:00:00 2001 From: Robin Bygrave Date: Fri, 7 Aug 2015 12:46:17 +1200 Subject: [PATCH] #374 - ChangeSetType ... baseline, CreateHistoryTable whenCreatedColumn --- .../dbmigration/migration/ChangeSetType.java | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/main/java/com/avaje/ebean/dbmigration/migration/ChangeSetType.java diff --git a/src/main/java/com/avaje/ebean/dbmigration/migration/ChangeSetType.java b/src/main/java/com/avaje/ebean/dbmigration/migration/ChangeSetType.java new file mode 100644 index 000000000..c60bd97ab --- /dev/null +++ b/src/main/java/com/avaje/ebean/dbmigration/migration/ChangeSetType.java @@ -0,0 +1,54 @@ + +package com.avaje.ebean.dbmigration.migration; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for changeSetType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="changeSetType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="apply"/>
+ *     <enumeration value="drop"/>
+ *     <enumeration value="baseline"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "changeSetType") +@XmlEnum +public enum ChangeSetType { + + @XmlEnumValue("apply") + APPLY("apply"), + @XmlEnumValue("drop") + DROP("drop"), + @XmlEnumValue("baseline") + BASELINE("baseline"); + private final String value; + + ChangeSetType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ChangeSetType fromValue(String v) { + for (ChangeSetType c: ChangeSetType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +}