Package com.exedio.cope
Annotation Type CopeSchemaValue
-
@Target(FIELD) @Retention(RUNTIME) public @interface CopeSchemaValue
Specifies the schema value (an integer) of an enum facet stored in the column of anEnumField
. This may be useful to maintain schema compatibility to former versions of the application or to a legacy application.Schema values of enum facets are assigned by the following rules:
- An annotated facet (by
CopeSchemaValue
) gets the schema value specified by the annotation. - A non-annotated facet, that is the first facet of its Enum, gets a schema value of 10.
- Otherwise, a non-annotated facet gets the schema value
of the previous facet, plus one, rounded to full multiples of 10 towards
Integer.MAX_VALUE
. This holds regardless whether the previous facet is annotated or not.
EnumField.create
throws anIllegalArgumentException
. This means you can't change theorder
of enums with this annotation. - An annotated facet (by
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description int
value
-