This annotation specifies the persistence field or persistence property as the enumeration type.
This annotation can be used along with @Basic. You can specify ORDINAL (numeric type) and STRING (character string type) in the enumeration type.
In the following cases, ORDINAL (numeric type) is specified as the enumeration type:
The applicable targets are method and field.
The following table lists the elements of @Enumerated:
Element name | Optional/Required | Element description |
---|---|---|
value | Optional | This element specifies the type used for mapping the enumeration type. |
The details of attributes that are supported with Cosminexus JPA provider are as follows: