Java EE 5 SDK

Annotation Type Enumerated

public @interface Enumerated

Specifies that a persistent property or field should be persisted as a enumerated type. It may be used in conjunction with the Basic annotation.


   public enum EmployeeStatus {FULL_TIME, PART_TIME, CONTRACT}

   public enum SalaryRate {JUNIOR, SENIOR, MANAGER, EXECUTIVE}

   @Entity public class Employee {
       public EmployeeStatus getStatus() {...}
       public SalaryRate getPayScale() {...}

Java Persistence 1.0

Optional Element Summary
 EnumType value
          (Optional) The type used in mapping an enum type.


public abstract EnumType value
(Optional) The type used in mapping an enum type.


Java EE 5 SDK

Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Scripting on this page tracks web page traffic, but does not change the content in any way.