javax.persistence
Annotation Type MapKeyEnumerated


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface MapKeyEnumerated

The MapKeyEnumerated annotation is used to specify the enum type for a map key whose basic type is an enumerated type. The MapKeyEnumerated annotation can be applied to an element collection or relationship of type java.util.Map, in conjunction with the ElementCollection, OneToMany, or ManyToMany annotation. If the map is specified using Java generics, the MapKeyClass annotation and associated type need not be specified; otherwise they must be specified. If the enumerated type is not specified or the MapKeyEnumerated annotation is not used, the enu- merated type is assumed to be ORDINAL.

Since:
JPA 2.0 version.
Author:
Florent Benoit
See Also:
JPA 2.0 specification

Optional Element Summary
 EnumType value
          (Optional) The type used in mapping a map key enum type.
 

value

public abstract EnumType value
(Optional) The type used in mapping a map key enum type.

Default:
javax.persistence.EnumType.ORDINAL


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.