Interface SchemaManager

All Superinterfaces:
SchemaManager

@Incubating public interface SchemaManager extends SchemaManager
Allows programmatic schema export, schema validation, data cleanup, and schema cleanup as a convenience for writing tests.
Since:
6.2
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    create(boolean createSchemas)
     
    default void
    drop(boolean dropSchemas)
     
    void
    dropMappedObjects(boolean dropSchemas)
    Drop database objects mapped by Hibernate entities, undoing the previous export.
    void
    exportMappedObjects(boolean createSchemas)
    Export database objects mapped by Hibernate entities.
    void
    Truncate the database tables mapped by Hibernate entities, and then re-import initial data from any configured load script.
    void
    Validate that the database objects mapped by Hibernate entities have the expected definitions.

    Methods inherited from interface jakarta.persistence.SchemaManager

    truncate, validate
  • Method Details

    • exportMappedObjects

      void exportMappedObjects(boolean createSchemas)
      Export database objects mapped by Hibernate entities.

      Programmatic way to run SchemaCreator.

      Parameters:
      createSchemas - if true, attempt to create schemas, otherwise, assume the schemas already exist
    • dropMappedObjects

      void dropMappedObjects(boolean dropSchemas)
      Drop database objects mapped by Hibernate entities, undoing the previous export.

      Programmatic way to run SchemaDropper.

      Parameters:
      dropSchemas - if true, 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 configured load script.

      Programmatic way to run SchemaTruncator.

    • create

      default void create(boolean createSchemas)
      Specified by:
      create in interface SchemaManager
    • drop

      default void drop(boolean dropSchemas)
      Specified by:
      drop in interface SchemaManager