Package org.hibernate.relational
Interface SchemaManager
- All Known Implementing Classes:
SchemaManagerImpl
@Incubatingpublic interfaceSchemaManager
Allows programmaticschema export,schema validation,data cleanup, andschema cleanup as a convenience for writing tests.- Since:
- 6.2
- See Also:
SessionFactory.getSchemaManager()
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddropMappedObjects(boolean dropSchemas)Drop database objects mapped by Hibernate entities, undoing theprevious export.voidexportMappedObjects(boolean createSchemas)Export database objects mapped by Hibernate entities.voidtruncateMappedObjects()Truncate the database tables mapped by Hibernate entities, and then re-import initial data from any configuredload script.voidvalidateMappedObjects()Validate that the database objects mapped by Hibernate entities have the expected definitions.
Method Detail
exportMappedObjects
void exportMappedObjects(boolean createSchemas)
Export database objects mapped by Hibernate entities.Programmatic way to run
SchemaCreator.- Parameters:
createSchemas- iftrue, attempt to create schemas, otherwise, assume the schemas already exist
dropMappedObjects
void dropMappedObjects(boolean dropSchemas)
Drop database objects mapped by Hibernate entities, undoing theprevious export.Programmatic way to run
SchemaDropper.- Parameters:
dropSchemas- iftrue, drop schemas, otherwise, leave them be
validateMappedObjects
void validateMappedObjects()
Validate that the database objects mapped by Hibernate entities have the expected definitions.Programmatic way to run
SchemaValidator.
truncateMappedObjects
void truncateMappedObjects()
Truncate the database tables mapped by Hibernate entities, and then re-import initial data from any configuredload script.Programmatic way to run
SchemaTruncator.