@Target(value=FIELD) @Retention(value=RUNTIME) public @interface EnumValue
public enum Status {
@EnumValue("N")
NEW,
@EnumValue("A")
ACTIVE,
@EnumValue("I")
INACTIVE,
}
This is an alternative to using the JPA standard approach or Ebean's
EnumMapping annotation.
Note that if all the EnumValue values are parsable as Integers then Ebean will persist and fetch them as integers - otherwise they will be persisted and fetched as strings.
public abstract String value
If all the values are parsable as Integers then Ebean will persist and fetch them as integers rather than strings.
Copyright © 2014. All Rights Reserved.