Class StandardTableExporter

java.lang.Object
org.hibernate.tool.schema.spi.StandardTableExporter
All Implemented Interfaces:
Exporter<Table>

@SPI({USE,IMPLEMENT,SUPPLY}) public class StandardTableExporter extends Object implements Exporter<Table>

Standard exporter for relational Table definitions.

Extend this class only when the database needs to suppress an aggregate column check or reposition a primary-key constraint name. Override the complete getSqlCreateStrings(Table, Metadata, SqlStringGenerationContext) or getSqlDropStrings(Table, Metadata, SqlStringGenerationContext) operation when the database uses a different table-DDL algorithm.

Retain the supplied Dialect for the lifetime of this exporter and supply the exporter from Dialect.getTableExporter().

Since:
8.0
See Also:
  • Constructor Details

    • StandardTableExporter

      @SPI(IMPLEMENT) public StandardTableExporter(Dialect dialect)
      Create a standard table exporter owned by dialect.
      Since:
      8.0
  • Method Details

    • dialect

      protected final Dialect dialect()
      Return the Dialect which owns this exporter.
    • getSqlCreateStrings

      public String[] getSqlCreateStrings(Table table, Metadata metadata, SqlStringGenerationContext context)
      Description copied from interface: Exporter
      Return the commands needed to create exportable, in execution order.
      Specified by:
      getSqlCreateStrings in interface Exporter<Table>
    • applyAggregateColumnCheck

      protected void applyAggregateColumnCheck(StringBuilder buf, AggregateColumn aggregateColumn)

      Append the standard aggregate-column check constraint.

      Override without calling super to suppress this check for an aggregate representation unsupported by the database.

    • primaryKeyString

      protected String primaryKeyString(PrimaryKey key)

      Render the table's primary-key clause.

      Override to change placement of an explicitly named ordering constraint.

    • getSqlDropStrings

      public String[] getSqlDropStrings(Table table, Metadata metadata, SqlStringGenerationContext context)
      Description copied from interface: Exporter
      Return the commands needed to drop exportable, in execution order.
      Specified by:
      getSqlDropStrings in interface Exporter<Table>