Top Description Methods
org.hibernate.relational

public Interface SchemaManager

Known Direct Implementers
org.hibernate.relational.internal.SchemaManagerImpl
Annotations
@Incubating
Imports
org.hibernate.Incubating

Allows programmatic schema export, schema validation, data cleanup, and schema cleanup as a convenience for writing tests.
Author
Gavin King
Since
6.2
See Also
org.hibernate.SessionFactory#getSchemaManager()

Method Summary

Modifier and TypeMethod and Description
public void
dropMappedObjects(boolean
if true, drop schemas, otherwise, leave them be
dropSchemas
)

Drop database objects mapped by Hibernate entities, undoing the previous export.

public void
exportMappedObjects(boolean
if true, attempt to create schemas, otherwise, assume the schemas already exist
createSchemas
)

Export database objects mapped by Hibernate entities.

public void
truncateMappedObjects()

Truncate the database tables mapped by Hibernate entities, and then re-import initial data from any configured load script.

public void
validateMappedObjects()

Validate that the database objects mapped by Hibernate entities have the expected definitions.

Method Detail

dropMappedObjectsback to summary
public void dropMappedObjects(boolean dropSchemas)

Drop database objects mapped by Hibernate entities, undoing the previous export.

Programmatic way to run org.hibernate.tool.schema.spi.SchemaDropper.

Parameters
dropSchemas:boolean

if true, drop schemas, otherwise, leave them be

exportMappedObjectsback to summary
public void exportMappedObjects(boolean createSchemas)

Export database objects mapped by Hibernate entities.

Programmatic way to run org.hibernate.tool.schema.spi.SchemaCreator.

Parameters
createSchemas:boolean

if true, attempt to create schemas, otherwise, assume the schemas already exist

truncateMappedObjectsback to summary
public void truncateMappedObjects()

Truncate the database tables mapped by Hibernate entities, and then re-import initial data from any configured load script.

Programmatic way to run org.hibernate.tool.schema.spi.SchemaTruncator.

validateMappedObjectsback to summary
public void validateMappedObjects()

Validate that the database objects mapped by Hibernate entities have the expected definitions.

Programmatic way to run org.hibernate.tool.schema.spi.SchemaValidator.