Enum Class EntityIdentifierNature

java.lang.Object
java.lang.Enum<EntityIdentifierNature>
org.hibernate.id.EntityIdentifierNature
All Implemented Interfaces:
Serializable, Comparable<EntityIdentifierNature>, Constable

public enum EntityIdentifierNature extends Enum<EntityIdentifierNature>
Describes the possible natures of an entity-defined identifier.
  • Enum Constant Details

    • 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
    • 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 specified name 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:
    • 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 the name XML-attribute
      • an @EmbeddedId annotation
      See Also:
  • Method Details

    • values

      public static EntityIdentifierNature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EntityIdentifierNature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null