Enum EntityIdentifierNature

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EntityIdentifierNature>

    public enum EntityIdentifierNature
    extends java.lang.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​(java.lang.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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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
      • 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. Specifically a composite identifier where there is no single attribute representing the composite value. Equivalent of:
        • a <composite-id/> mapping without a specified name XML-attribute (which would name the single identifier attribute
        • multiple @Id annotations
        NOTE : May or may not have a related "lookup identifier class" as indicated by a @IdClass annotation.
        See Also:
        IdClass
      • 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:
        EmbeddedId
    • 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​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null