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 String
getSqlAfterString()
A statement to run after ending the process of truncating tables.String
getSqlBeforeString()
A statement to run before beginning the process of truncating tables.String
getSqlDisableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)
A statement that disables the given foreign key constraint.String
getSqlEnableConstraintString(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:Cleaner
A statement to run before beginning the process of truncating tables. (Usually to disable foreign key constraint enforcement.)- Specified by:
getSqlBeforeString
in interfaceCleaner
-
getSqlAfterString
public String getSqlAfterString()
Description copied from interface:Cleaner
A statement to run after ending the process of truncating tables. (Usually to re-enable foreign key constraint enforcement.)- Specified by:
getSqlAfterString
in interfaceCleaner
-
getSqlTruncateStrings
public String[] getSqlTruncateStrings(Collection<Table> tables, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:Cleaner
A statement or statements that truncate the given tables.- Specified by:
getSqlTruncateStrings
in interfaceCleaner
-
getSqlDisableConstraintString
public String getSqlDisableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:Cleaner
A statement that disables the given foreign key constraint.- Specified by:
getSqlDisableConstraintString
in interfaceCleaner
-
getSqlEnableConstraintString
public String getSqlEnableConstraintString(ForeignKey foreignKey, Metadata metadata, SqlStringGenerationContext context)
Description copied from interface:Cleaner
A statement that re-enables the given foreign key constraint.- Specified by:
getSqlEnableConstraintString
in interfaceCleaner
-
-