Enum Class TemporaryTableKind

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

@SPI public enum TemporaryTableKind extends Enum<TemporaryTableKind>
Classifies the kinds of temporary table implementations.
Since:
6.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    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 the selected strategy controls whether Hibernate should delete data.
    Modeled as what the SQL standard calls a local temporary table, which is a table that is defined per connection.
    Modeled as a regular table with a special session-identifier column, which is explicitly deleted from at the end of a transaction.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PERSISTENT

      public static final TemporaryTableKind PERSISTENT
      Modeled as a regular table with a special session-identifier column, 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 the selected strategy controls whether Hibernate should drop it explicitly 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 the selected strategy controls whether Hibernate should delete data.

      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