Enum TemporaryTableKind
- java.lang.Object
-
- java.lang.Enum<TemporaryTableKind>
-
- org.hibernate.dialect.temptable.TemporaryTableKind
-
- All Implemented Interfaces:
Serializable
,Comparable<TemporaryTableKind>
public enum TemporaryTableKind extends Enum<TemporaryTableKind>
Classifies the kinds of temporary table implementations.- Since:
- 6.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description 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 throughDialect.getTemporaryTableAfterUseAction()
.LOCAL
Modeled as what the SQL standard calls a local temporary table, which is a table that is defined per connection.PERSISTENT
Modeled as a regular table with a specialTemporaryTableSessionUidColumn
, which is explicitly deleted from at the end of a transaction.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TemporaryTableKind
valueOf(String name)
Returns the enum constant of this type with the specified name.static TemporaryTableKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PERSISTENT
public static final TemporaryTableKind PERSISTENT
Modeled as a regular table with a specialTemporaryTableSessionUidColumn
, 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 throughDialect.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 Detail
-
values
public static TemporaryTableKind[] 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 (TemporaryTableKind c : TemporaryTableKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TemporaryTableKind valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-