Enum Class TemporaryTableKind

java.lang.Object
java.lang.Enum<TemporaryTableKind>
org.hibernate.dialect.temptable.TemporaryTableKind
All Implemented Interfaces:
Serializable, Comparable<TemporaryTableKind>, Constable

public enum TemporaryTableKind extends Enum<TemporaryTableKind>
Classifies the kinds of temporary table implementations.
Since:
6.0
  • Enum Constant Details

    • PERSISTENT

      public static final TemporaryTableKind PERSISTENT
      Modeled as a regular table with a special TemporaryTableSessionUidColumn, which is explicitly deleted from at the end of a transaction.

      The table is created once on application startup, unless "hibernate.query.mutation_strategy.persistent.create_tables" is disabled and dropped on application startup unless "hibernate.query.mutation_strategy.persistent.create_tables" or "hibernate.query.mutation_strategy.persistent.drop_tables" are disabled.

    • LOCAL

      public static final TemporaryTableKind LOCAL
      Modeled as what the SQL standard calls a local temporary table, which is a table that is defined per connection.

      Usually, the table is created when needed in a transaction and databases usually drop it on transaction commit, though it is possible to control if Hibernate should drop it explicitly through Dialect.getTemporaryTableAfterUseAction() and "hibernate.query.mutation_strategy.local_temporary.drop_tables".

    • GLOBAL

      public static final TemporaryTableKind GLOBAL
      Modeled as what the SQL standard calls a global temporary table, which is a table that is defined once per schema, but its data is scoped to a transaction where data is usually deleted automatically on transaction commit, though it is possible to control whether Hibernate should delete data or not through Dialect.getTemporaryTableAfterUseAction().

      The table is created once on application startup, unless "hibernate.query.mutation_strategy.global_temporary.create_tables" is disabled and dropped on application startup unless "hibernate.query.mutation_strategy.global_temporary.create_tables" or "hibernate.query.mutation_strategy.global_temporary.drop_tables" are disabled.

  • Method Details

    • values

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