public abstract class AbstractSchemaMigrator extends Object implements SchemaMigrator
Modifier and Type | Field and Description |
---|---|
protected SchemaFilter |
schemaFilter |
protected HibernateSchemaManagementTool |
tool |
Constructor and Description |
---|
AbstractSchemaMigrator(HibernateSchemaManagementTool tool,
SchemaFilter schemaFilter) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyForeignKeys(Table table,
TableInformation tableInformation,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
protected void |
applyIndexes(Table table,
TableInformation tableInformation,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
protected static void |
applySqlStrings(boolean quiet,
String[] sqlStrings,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
protected void |
applyUniqueKeys(Table table,
TableInformation tableInfo,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
protected void |
checkExportIdentifier(Exportable exportable,
Set<String> exportIdentifiers) |
protected void |
createSchemaAndCatalog(DatabaseInformation existingDatabase,
ExecutionOptions options,
Dialect dialect,
Formatter formatter,
boolean tryToCreateCatalogs,
boolean tryToCreateSchemas,
Set<Identifier> exportedCatalogs,
Namespace namespace,
GenerationTarget[] targets) |
protected void |
createTable(Table table,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
void |
doMigration(Metadata metadata,
ExecutionOptions options,
TargetDescriptor targetDescriptor)
Perform a schema migration (alteration) from the indicated source(s) to the indicated target(s).
|
protected void |
migrateTable(Table table,
TableInformation tableInformation,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) |
protected abstract NameSpaceTablesInformation |
performTablesMigration(Metadata metadata,
DatabaseInformation existingDatabase,
ExecutionOptions options,
Dialect dialect,
Formatter formatter,
Set<String> exportIdentifiers,
boolean tryToCreateCatalogs,
boolean tryToCreateSchemas,
Set<Identifier> exportedCatalogs,
Namespace namespace,
GenerationTarget[] targets) |
void |
setUniqueConstraintStrategy(UniqueConstraintSchemaUpdateStrategy uniqueConstraintStrategy)
For testing...
|
protected HibernateSchemaManagementTool tool
protected SchemaFilter schemaFilter
public AbstractSchemaMigrator(HibernateSchemaManagementTool tool, SchemaFilter schemaFilter)
public void setUniqueConstraintStrategy(UniqueConstraintSchemaUpdateStrategy uniqueConstraintStrategy)
public void doMigration(Metadata metadata, ExecutionOptions options, TargetDescriptor targetDescriptor)
SchemaMigrator
doMigration
in interface SchemaMigrator
metadata
- Represents the schema to be altered.options
- Options for executing the alterationtargetDescriptor
- description of the target(s) for the alteration commandsprotected abstract NameSpaceTablesInformation performTablesMigration(Metadata metadata, DatabaseInformation existingDatabase, ExecutionOptions options, Dialect dialect, Formatter formatter, Set<String> exportIdentifiers, boolean tryToCreateCatalogs, boolean tryToCreateSchemas, Set<Identifier> exportedCatalogs, Namespace namespace, GenerationTarget[] targets)
protected void createTable(Table table, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void migrateTable(Table table, TableInformation tableInformation, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void applyIndexes(Table table, TableInformation tableInformation, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void applyUniqueKeys(Table table, TableInformation tableInfo, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void applyForeignKeys(Table table, TableInformation tableInformation, Dialect dialect, Metadata metadata, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void checkExportIdentifier(Exportable exportable, Set<String> exportIdentifiers)
protected static void applySqlStrings(boolean quiet, String[] sqlStrings, Formatter formatter, ExecutionOptions options, GenerationTarget... targets)
protected void createSchemaAndCatalog(DatabaseInformation existingDatabase, ExecutionOptions options, Dialect dialect, Formatter formatter, boolean tryToCreateCatalogs, boolean tryToCreateSchemas, Set<Identifier> exportedCatalogs, Namespace namespace, GenerationTarget[] targets)
Copyright © 2017 JBoss by Red Hat. All rights reserved.