Search in sources :

Example 11 with ExecutionOptions

use of org.hibernate.tool.schema.spi.ExecutionOptions in project hibernate-orm by hibernate.

the class SchemaValidator method validate.

@SuppressWarnings("unchecked")
public void validate(Metadata metadata, ServiceRegistry serviceRegistry) {
    LOG.runningSchemaValidator();
    Map config = new HashMap();
    config.putAll(serviceRegistry.getService(ConfigurationService.class).getSettings());
    final SchemaManagementTool tool = serviceRegistry.getService(SchemaManagementTool.class);
    final ExecutionOptions executionOptions = SchemaManagementToolCoordinator.buildExecutionOptions(config, ExceptionHandlerHaltImpl.INSTANCE);
    tool.getSchemaValidator(config).doValidation(metadata, executionOptions);
}
Also used : SchemaManagementTool(org.hibernate.tool.schema.spi.SchemaManagementTool) ExecutionOptions(org.hibernate.tool.schema.spi.ExecutionOptions) HashMap(java.util.HashMap) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

ExecutionOptions (org.hibernate.tool.schema.spi.ExecutionOptions)11 Map (java.util.Map)9 ExceptionHandler (org.hibernate.tool.schema.spi.ExceptionHandler)5 SchemaManagementTool (org.hibernate.tool.schema.spi.SchemaManagementTool)5 HashMap (java.util.HashMap)4 MetadataSources (org.hibernate.boot.MetadataSources)4 SourceDescriptor (org.hibernate.tool.schema.spi.SourceDescriptor)4 ConfigurationService (org.hibernate.engine.config.spi.ConfigurationService)3 SourceType (org.hibernate.tool.schema.SourceType)3 ScriptSourceInput (org.hibernate.tool.schema.spi.ScriptSourceInput)3 Test (org.junit.Test)3 Database (org.hibernate.boot.model.relational.Database)2 StandardServiceRegistryBuilder (org.hibernate.boot.registry.StandardServiceRegistryBuilder)2 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)2 Dialect (org.hibernate.dialect.Dialect)2 JdbcEnvironment (org.hibernate.engine.jdbc.env.spi.JdbcEnvironment)2 ServiceRegistry (org.hibernate.service.ServiceRegistry)2 TestForIssue (org.hibernate.testing.TestForIssue)2 ExceptionHandlerCollectingImpl (org.hibernate.tool.schema.internal.ExceptionHandlerCollectingImpl)2 HibernateSchemaManagementTool (org.hibernate.tool.schema.internal.HibernateSchemaManagementTool)2