Interface TemporaryTableStrategy

All Known Implementing Classes:
PersistentTemporaryTableStrategy, StandardGlobalTemporaryTableStrategy, StandardLocalTemporaryTableStrategy

@SPI({USE,IMPLEMENT,SUPPLY}) public interface TemporaryTableStrategy

Defines how Hibernate interacts with one kind of temporary table.

A provider may implement this contract directly, compose one of the standard family strategies, or supply a stock strategy from a Dialect. Instances may be reused for the Dialect lifetime and must not hold operation-specific or session-specific state. The selected before/after-use actions must agree with the table kind and with the DDL commands returned by this strategy.

Since:
8.0
See Also:
  • Method Details

    • adjustTemporaryTableName

      String adjustTemporaryTableName(String desiredTableName)
      Adjust a logical table name to the database's temporary-table naming rules. The result must be a valid unqualified identifier fragment.
    • getTemporaryTableKind

      TemporaryTableKind getTemporaryTableKind()
      The kind of temporary table described by this strategy.
    • getTemporaryTableCreateOptions

      @Nullable String getTemporaryTableCreateOptions()
      An arbitrary SQL fragment appended to the create-table statement, or null when there are no options to specify.
    • getTemporaryTableCreateCommand

      String getTemporaryTableCreateCommand()
      The command prefix used to create the temporary table, without the table name or column list.
    • getTemporaryTableDropCommand

      String getTemporaryTableDropCommand()
      The command prefix used to drop the temporary table, without the table name.
    • getTemporaryTableTruncateCommand

      String getTemporaryTableTruncateCommand()
      The command prefix used to truncate or otherwise clean the temporary table, without the table name or session restriction.
    • getCreateTemporaryTableColumnAnnotation

      String getCreateTemporaryTableColumnAnnotation(int sqlTypeCode)
      The SQL fragment appended to a temporary-table column declaration for the given SqlTypes code, or an empty string when none is required.
    • getTemporaryTableAfterUseAction

      AfterUseAction getTemporaryTableAfterUseAction()
      The lifecycle action Hibernate performs after finishing use of the table.
    • getTemporaryTableBeforeUseAction

      BeforeUseAction getTemporaryTableBeforeUseAction()
      The lifecycle action Hibernate performs before beginning use of the table.
    • supportsTemporaryTablePrimaryKey

      default boolean supportsTemporaryTablePrimaryKey()
      Whether this strategy supports a primary key on its temporary table.
    • supportsTemporaryTableNullConstraint

      default boolean supportsTemporaryTableNullConstraint()
      Whether this strategy supports nullability constraints on temporary-table columns.