mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-25 07:57:39 +00:00
#374 - IdentityType lowered
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package com.avaje.ebean.dbmigration.migration;
|
||||
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlEnumValue;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
@@ -13,11 +14,11 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <pre>
|
||||
* <simpleType name="identityType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="IDENTITY"/>
|
||||
* <enumeration value="SEQUENCE"/>
|
||||
* <enumeration value="GENERATOR"/>
|
||||
* <enumeration value="EXTERNAL"/>
|
||||
* <enumeration value="DEFAULT"/>
|
||||
* <enumeration value="identity"/>
|
||||
* <enumeration value="sequence"/>
|
||||
* <enumeration value="generator"/>
|
||||
* <enumeration value="external"/>
|
||||
* <enumeration value="default"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
@@ -27,18 +28,33 @@ import javax.xml.bind.annotation.XmlType;
|
||||
@XmlEnum
|
||||
public enum IdentityType {
|
||||
|
||||
IDENTITY,
|
||||
SEQUENCE,
|
||||
GENERATOR,
|
||||
EXTERNAL,
|
||||
DEFAULT;
|
||||
@XmlEnumValue("identity")
|
||||
IDENTITY("identity"),
|
||||
@XmlEnumValue("sequence")
|
||||
SEQUENCE("sequence"),
|
||||
@XmlEnumValue("generator")
|
||||
GENERATOR("generator"),
|
||||
@XmlEnumValue("external")
|
||||
EXTERNAL("external"),
|
||||
@XmlEnumValue("default")
|
||||
DEFAULT("default");
|
||||
private final String value;
|
||||
|
||||
IdentityType(String v) {
|
||||
value = v;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
return value;
|
||||
}
|
||||
|
||||
public static IdentityType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
for (IdentityType c: IdentityType.values()) {
|
||||
if (c.value.equals(v)) {
|
||||
return c;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException(v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user