Top Description Inners Fields Constructors Methods
org.hibernate.tool.schema.internal

public Class SchemaDropperImpl

extends Object
implements SchemaDropper
Class Inheritance
All Implemented Interfaces
org.hibernate.tool.schema.spi.SchemaDropper
Imports
java.io.Serializable, java.util.ArrayList, .Collection, .Collections, .HashSet, .List, .Map, .Set, org.hibernate.Internal, org.hibernate.boot.Metadata, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, .Exportable, .Namespace, .Sequence, .SqlStringGenerationContext, org.hibernate.boot.spi.MetadataImplementor, org.hibernate.dialect.Dialect, org.hibernate.engine.config.spi.ConfigurationService, org.hibernate.engine.jdbc.connections.spi.JdbcConnectionAccess, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment, org.hibernate.engine.jdbc.internal.FormatStyle, .Formatter, org.hibernate.engine.jdbc.spi.JdbcServices, .SqlExceptionHelper, .SqlStatementLogger, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.mapping.ForeignKey, .Table, .UserDefinedType, org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder, org.hibernate.service.ServiceRegistry, org.hibernate.service.spi.ServiceRegistryImplementor, org.hibernate.tool.schema.SourceType, org.hibernate.tool.schema.internal.exec.GenerationTarget, .GenerationTargetToDatabase, .JdbcContext, org.hibernate.tool.schema.spi.CommandAcceptanceException, .ContributableMatcher, .DelayedDropAction, .ExceptionHandler, .ExecutionOptions, .SchemaDropper, .SchemaFilter, .SchemaManagementException, .SchemaManagementTool, .ScriptSourceInput, .SourceDescriptor, .SqlScriptCommandExtractor, .TargetDescriptor, org.jboss.logging.Logger

Basic implementation of SchemaDropper.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private static final Logger
private final SchemaFilter
private final HibernateSchemaManagementTool

Constructor Summary

AccessConstructor and Description
public
public
public
public
SchemaDropperImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter)

Method Summary

Modifier and TypeMethod and Description
private void
applyConstraintDropping(Namespace namespace, Metadata metadata, Formatter formatter, ExecutionOptions options, SqlStringGenerationContext context, ContributableMatcher inclusionFilter, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
public DelayedDropAction
buildDelayedAction(Metadata
The metadata to drop
metadata
,
ExecutionOptions
The drop options
options
,
ContributableMatcher
Filter for Contributable instances to use
inclusionFilter
,
SourceDescriptor sourceDescriptor)

Implements org.hibernate.tool.schema.spi.SchemaDropper.buildDelayedAction.

Deprecated as a consequence of Metadata being deprecated.
Build a delayed Runnable for performing schema dropping.
private static void
checkExportIdentifier(Exportable exportable, Set<String> exportIdentifiers)

public void
doDrop(Metadata
Represents the schema to be dropped.
metadata
,
ExecutionOptions
Options for executing the drop
options
,
ContributableMatcher
Filter for Contributable instances to use
inclusionFilter
,
SourceDescriptor
description of the source(s) of drop commands
sourceDescriptor
,
TargetDescriptor
description of the target(s) for the drop commands
targetDescriptor
)

Implements org.hibernate.tool.schema.spi.SchemaDropper.doDrop.

Deprecated as a consequence of Metadata being deprecated.
Perform a schema drop from the indicated source(s) to the indicated target(s).
public void
doDrop(Metadata metadata, ExecutionOptions options, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
For use from testing
public void
doDrop(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
For use from testing
public void
doDrop(Metadata metadata, boolean manageNamespaces, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
For tests
public void
doDrop(Metadata metadata, final ServiceRegistry serviceRegistry, final Map<String, Object> settings, final boolean manageNamespaces, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
For tests
private static void
dropAuxiliaryObjectsAfterTables(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private static void
dropAuxiliaryObjectsBeforeTables(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private void
dropConstraintsTablesSequences(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private void
dropFromMetadata(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
private static void
dropSchemasAndCatalogs(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private static void
dropSequences(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, Set<String> exportIdentifiers, SqlStringGenerationContext context, Namespace namespace, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private static void
dropTables(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, Set<String> exportIdentifiers, SqlStringGenerationContext context, Namespace namespace, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private static void
dropUserDefinedTypes(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated as a consequence of Metadata being deprecated.
private SqlScriptCommandExtractor
private void
performDrop(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated as a consequence of Metadata being deprecated.
private static Collection<AuxiliaryDatabaseObject>
reverse(Collection<AuxiliaryDatabaseObject> auxiliaryDatabaseObjects)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log
schemaFilterback to summary
private final SchemaFilter schemaFilter
toolback to summary
private final HibernateSchemaManagementTool tool

Constructor Detail

SchemaDropperImplback to summary
public SchemaDropperImpl(HibernateSchemaManagementTool tool)
SchemaDropperImplback to summary
public SchemaDropperImpl(HibernateSchemaManagementTool tool, SchemaFilter schemaFilter)
SchemaDropperImplback to summary
public SchemaDropperImpl(ServiceRegistry serviceRegistry)
SchemaDropperImplback to summary
public SchemaDropperImpl(ServiceRegistry serviceRegistry, SchemaFilter schemaFilter)

Method Detail

applyConstraintDroppingback to summary
private void applyConstraintDropping(Namespace namespace, Metadata metadata, Formatter formatter, ExecutionOptions options, SqlStringGenerationContext context, ContributableMatcher inclusionFilter, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

buildDelayedActionback to summary
public DelayedDropAction buildDelayedAction(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, SourceDescriptor sourceDescriptor)

Implements org.hibernate.tool.schema.spi.SchemaDropper.buildDelayedAction.

Doc from org.hibernate.tool.schema.spi.SchemaDropper.buildDelayedAction.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Build a delayed Runnable for performing schema dropping. This implicitly targets the underlying data-store.

Parameters
metadata:Metadata

The metadata to drop

options:ExecutionOptions

The drop options

inclusionFilter:ContributableMatcher

Filter for Contributable instances to use

sourceDescriptor:SourceDescriptor

For access to the SourceDescriptor#getScriptSourceInput()

Returns:DelayedDropAction

The Runnable

Annotations
@Override
checkExportIdentifierback to summary
private static void checkExportIdentifier(Exportable exportable, Set<String> exportIdentifiers)
doDropback to summary
public void doDrop(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, SourceDescriptor sourceDescriptor, TargetDescriptor targetDescriptor)

Implements org.hibernate.tool.schema.spi.SchemaDropper.doDrop.

Doc from org.hibernate.tool.schema.spi.SchemaDropper.doDrop.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Perform a schema drop from the indicated source(s) to the indicated target(s).

Parameters
metadata:Metadata

Represents the schema to be dropped.

options:ExecutionOptions

Options for executing the drop

inclusionFilter:ContributableMatcher

Filter for Contributable instances to use

sourceDescriptor:SourceDescriptor

description of the source(s) of drop commands

targetDescriptor:TargetDescriptor

description of the target(s) for the drop commands

Annotations
@Override
doDropback to summary
public void doDrop(Metadata metadata, ExecutionOptions options, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

For use from testing

Annotations
@Internal
doDropback to summary
public void doDrop(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

For use from testing

Annotations
@Internal
doDropback to summary
public void doDrop(Metadata metadata, boolean manageNamespaces, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

For tests

doDropback to summary
public void doDrop(Metadata metadata, final ServiceRegistry serviceRegistry, final Map<String, Object> settings, final boolean manageNamespaces, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

For tests

dropAuxiliaryObjectsAfterTablesback to summary
private static void dropAuxiliaryObjectsAfterTables(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropAuxiliaryObjectsBeforeTablesback to summary
private static void dropAuxiliaryObjectsBeforeTables(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropConstraintsTablesSequencesback to summary
private void dropConstraintsTablesSequences(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropFromMetadataback to summary
private void dropFromMetadata(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropSchemasAndCatalogsback to summary
private static void dropSchemasAndCatalogs(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropSequencesback to summary
private static void dropSequences(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, Set<String> exportIdentifiers, SqlStringGenerationContext context, Namespace namespace, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropTablesback to summary
private static void dropTables(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, Formatter formatter, Set<String> exportIdentifiers, SqlStringGenerationContext context, Namespace namespace, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

dropUserDefinedTypesback to summary
private static void dropUserDefinedTypes(Metadata metadata, ExecutionOptions options, Dialect dialect, Formatter formatter, SqlStringGenerationContext context, GenerationTarget[] targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

getCommandExtractorback to summary
private SqlScriptCommandExtractor getCommandExtractor()
performDropback to summary
private void performDrop(Metadata metadata, ExecutionOptions options, ContributableMatcher inclusionFilter, Dialect dialect, SourceDescriptor sourceDescriptor, GenerationTarget... targets)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

reverseback to summary
private static Collection<AuxiliaryDatabaseObject> reverse(Collection<AuxiliaryDatabaseObject> auxiliaryDatabaseObjects)
org.hibernate.tool.schema.internal back to summary

private Class SchemaDropperImpl.DelayedDropActionImpl

extends Object
implements DelayedDropAction, Serializable
Class Inheritance
  • java.lang.Object
  • org.hibernate.tool.schema.internal.SchemaDropperImpl.DelayedDropActionImpl
All Implemented Interfaces
java.io.Serializable, org.hibernate.tool.schema.spi.DelayedDropAction

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ArrayList<String>
private static final CoreMessageLogger
private GenerationTarget

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
perform(ServiceRegistry
Access to the ServiceRegistry
serviceRegistry
)

Implements org.hibernate.tool.schema.spi.DelayedDropAction.perform.

Perform the delayed schema drop.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commandsback to summary
private final ArrayList<String> commands
logback to summary
private static final CoreMessageLogger log
targetback to summary
private GenerationTarget target

Constructor Detail

DelayedDropActionImplback to summary
public DelayedDropActionImpl(ArrayList<String> commands, GenerationTarget target)

Method Detail

performback to summary
public void perform(ServiceRegistry serviceRegistry)

Implements org.hibernate.tool.schema.spi.DelayedDropAction.perform.

Doc from org.hibernate.tool.schema.spi.DelayedDropAction.perform.

Perform the delayed schema drop.

Parameters
serviceRegistry:ServiceRegistry

Access to the ServiceRegistry

Annotations
@Override
org.hibernate.tool.schema.internal back to summary

private Class SchemaDropperImpl.DelayedDropActionImpl.JdbcContextDelayedDropImpl

extends Object
implements JdbcContext
Class Inheritance
  • java.lang.Object
  • org.hibernate.tool.schema.internal.SchemaDropperImpl.DelayedDropActionImpl.JdbcContextDelayedDropImpl
All Implemented Interfaces
org.hibernate.tool.schema.internal.exec.JdbcContext

Field Summary

Modifier and TypeField and Description
private final JdbcConnectionAccess
private final JdbcServices
private final ServiceRegistry

Constructor Summary

AccessConstructor and Description
public

Field Detail

jdbcConnectionAccessback to summary
private final JdbcConnectionAccess jdbcConnectionAccess
jdbcServicesback to summary
private final JdbcServices jdbcServices
serviceRegistryback to summary
private final ServiceRegistry serviceRegistry

Constructor Detail

JdbcContextDelayedDropImplback to summary
public JdbcContextDelayedDropImpl(ServiceRegistry serviceRegistry)

Method Detail

getDialectback to summary
public Dialect getDialect()

Implements org.hibernate.tool.schema.internal.exec.JdbcContext.getDialect.

Annotations
@Override
getJdbcConnectionAccessback to summary
public JdbcConnectionAccess getJdbcConnectionAccess()

Implements org.hibernate.tool.schema.internal.exec.JdbcContext.getJdbcConnectionAccess.

Annotations
@Override
getServiceRegistryback to summary
public ServiceRegistry getServiceRegistry()

Implements org.hibernate.tool.schema.internal.exec.JdbcContext.getServiceRegistry.

Annotations
@Override
getSqlExceptionHelperback to summary
public SqlExceptionHelper getSqlExceptionHelper()

Implements org.hibernate.tool.schema.internal.exec.JdbcContext.getSqlExceptionHelper.

Annotations
@Override
getSqlStatementLoggerback to summary
public SqlStatementLogger getSqlStatementLogger()

Implements org.hibernate.tool.schema.internal.exec.JdbcContext.getSqlStatementLogger.

Annotations
@Override
org.hibernate.tool.schema.internal back to summary

private Class SchemaDropperImpl.JournalingGenerationTarget

extends Object
implements GenerationTarget
Class Inheritance
  • java.lang.Object
  • org.hibernate.tool.schema.internal.SchemaDropperImpl.JournalingGenerationTarget
All Implemented Interfaces
org.hibernate.tool.schema.internal.exec.GenerationTarget

Field Summary

Modifier and TypeField and Description
private final ArrayList<String>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
accept(String
The command
command
)

Implements org.hibernate.tool.schema.internal.exec.GenerationTarget.accept.

Accept a command
public void
public void
release()

Implements org.hibernate.tool.schema.internal.exec.GenerationTarget.release.

Release this target, giving it a change to release its resources.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commandsback to summary
private final ArrayList<String> commands

Constructor Detail

JournalingGenerationTargetback to summary
private JournalingGenerationTarget()

Method Detail

acceptback to summary
public void accept(String command)

Implements org.hibernate.tool.schema.internal.exec.GenerationTarget.accept.

Doc from org.hibernate.tool.schema.internal.exec.GenerationTarget.accept.

Accept a command

Parameters
command:String

The command

Annotations
@Override
prepareback to summary
public void prepare()

Implements org.hibernate.tool.schema.internal.exec.GenerationTarget.prepare.

Doc from org.hibernate.tool.schema.internal.exec.GenerationTarget.prepare.

Prepare for accepting actions

Annotations
@Override
releaseback to summary
public void release()

Implements org.hibernate.tool.schema.internal.exec.GenerationTarget.release.

Doc from org.hibernate.tool.schema.internal.exec.GenerationTarget.release.

Release this target, giving it a change to release its resources.

Annotations
@Override