Package org.hibernate.id
Enum EntityIdentifierNature
- java.lang.Object
-
- java.lang.Enum<EntityIdentifierNature>
-
- org.hibernate.id.EntityIdentifierNature
-
- All Implemented Interfaces:
Serializable
,Comparable<EntityIdentifierNature>
public enum EntityIdentifierNature extends Enum<EntityIdentifierNature>
Describes the possible natures of an entity-defined identifier.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AGGREGATED_COMPOSITE
Composite identifier mapped to a single entity attribute by means of an actual component class used to aggregate the tuple values.NON_AGGREGATED_COMPOSITE
What Hibernate used to term an "embedded composite identifier", which is not to be confused with the JPA term "embedded".SIMPLE
A simple identifier.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EntityIdentifierNature
valueOf(String name)
Returns the enum constant of this type with the specified name.static EntityIdentifierNature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIMPLE
public static final EntityIdentifierNature SIMPLE
A simple identifier. Resolved as a basic type and mapped to a singular, basic attribute. Equivalent of:- an
<id/>
mapping - a single
@Id
annotation
- an
-
NON_AGGREGATED_COMPOSITE
public static final EntityIdentifierNature NON_AGGREGATED_COMPOSITE
What Hibernate used to term an "embedded composite identifier", which is not to be confused with the JPA term "embedded". Resolved as a tuple of basic type values and mapped over multiple singular attributes. More precisely, a composite identifier where there is no single attribute representing the composite value.Equivalent to:
-
a
<composite-id/>
mapping without a specifiedname
XML-attribute (which would name the single identifier attribute, if it were specified), or -
multiple
@Id
annotations.
May or may not have a related "lookup identifier class" as indicated by an
@IdClass
annotation.- See Also:
IdClass
-
a
-
AGGREGATED_COMPOSITE
public static final EntityIdentifierNature AGGREGATED_COMPOSITE
Composite identifier mapped to a single entity attribute by means of an actual component class used to aggregate the tuple values. Equivalent of:-
a
<composite-id/>
mapping naming a single identifier attribute via thename
XML-attribute -
an
@EmbeddedId
annotation
- See Also:
EmbeddedId
-
a
-
-
Method Detail
-
values
public static EntityIdentifierNature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EntityIdentifierNature c : EntityIdentifierNature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityIdentifierNature valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-