Enum Class GenerationType

java.lang.Object
java.lang.Enum<GenerationType>
org.seasar.doma.GenerationType
All Implemented Interfaces:
Serializable, Comparable<GenerationType>, Constable

public enum GenerationType extends Enum<GenerationType>
Defines strategies to generate identifiers for entity primary keys.

This enum is used with the GeneratedValue annotation to specify how database identifiers should be automatically generated.

See Also:
  • Enum Constant Details

    • IDENTITY

      public static final GenerationType IDENTITY
      Uses a database IDENTITY column for ID generation. The database automatically assigns a unique value when a row is inserted.
    • SEQUENCE

      public static final GenerationType SEQUENCE
      Uses a database sequence for ID generation. Requires additional configuration via SequenceGenerator.
    • TABLE

      public static final GenerationType TABLE
      Uses a database table for ID generation. Requires additional configuration via TableGenerator.
  • Method Details

    • values

      public static GenerationType[] 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 GenerationType 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