.
*
*
* Example:
*
* public enum EmployeeStatus {FULL_TIME, PART_TIME, CONTRACT}
*
* public enum SalaryRate {JUNIOR, SENIOR, MANAGER, EXECUTIVE}
*
* @Entity public class Employee {
* public EmployeeStatus getStatus() {...}
* ...
* @Enumerated(STRING)
* public SalaryRate getPayScale() {...}
* ...
* }
*
*
* @see Basic
* @see ElementCollection
*
* @since Java Persistence 1.0
*/
@Target({METHOD, FIELD})
@Retention(RUNTIME)
public @interface Enumerated {
/** (Optional) The type used in mapping an enum type. */
EnumType value() default ORDINAL;
}