Class StandardTableCleaner
- java.lang.Object
-
- org.hibernate.tool.schema.internal.StandardTableCleaner
-
- All Implemented Interfaces:
Cleaner
@Incubating public class StandardTableCleaner extends Object implements Cleaner
The basic implementation ofCleaner.
-
-
Constructor Summary
Constructors Constructor Description StandardTableCleaner(Dialect dialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetSqlAfterString()A statement to run after ending the process of truncating tables.StringgetSqlBeforeString()A statement to run before beginning the process of truncating tables.StringgetSqlDisableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)A statement that disables the given foreign key constraint.StringgetSqlEnableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)A statement that re-enables the given foreign key constraint.String[]getSqlTruncateStrings(Collection<Table> tables, Metadata metadata, SqlStringGenerationContext context)A statement or statements that truncate the given tables.
-
-
-
Field Detail
-
dialect
protected final Dialect dialect
-
-
Constructor Detail
-
StandardTableCleaner
public StandardTableCleaner(Dialect dialect)
-
-
Method Detail
-
getSqlBeforeString
public String getSqlBeforeString()
Description copied from interface:CleanerA statement to run before beginning the process of truncating tables. (Usually to disable foreign key constraint enforcement.)- Specified by:
getSqlBeforeStringin interfaceCleaner
-
getSqlAfterString
public String getSqlAfterString()
Description copied from interface:CleanerA statement to run after ending the process of truncating tables. (Usually to re-enable foreign key constraint enforcement.)- Specified by:
getSqlAfterStringin interfaceCleaner
-
getSqlTruncateStrings
public String[] getSqlTruncateStrings(Collection<Table> tables, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:CleanerA statement or statements that truncate the given tables.- Specified by:
getSqlTruncateStringsin interfaceCleaner
-
getSqlDisableConstraintString
public String getSqlDisableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:CleanerA statement that disables the given foreign key constraint.- Specified by:
getSqlDisableConstraintStringin interfaceCleaner
-
getSqlEnableConstraintString
public String getSqlEnableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:CleanerA statement that re-enables the given foreign key constraint.- Specified by:
getSqlEnableConstraintStringin interfaceCleaner
-
-