Class DatabaseInformationImpl
java.lang.Object
org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl
- All Implemented Interfaces:
DatabaseInformation,ExtractionContext.DatabaseObjectAccess
public class DatabaseInformationImpl
extends Object
implements DatabaseInformation, ExtractionContext.DatabaseObjectAccess
-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseInformationImpl(ServiceRegistry serviceRegistry, JdbcEnvironment jdbcEnvironment, SqlStringGenerationContext context, DdlTransactionIsolator ddlTransactionIsolator, SchemaManagementTool tool) -
Method Summary
Modifier and TypeMethodDescriptionbooleancatalogExists(Identifier catalog) Check to see if the given catalog already exists.voidcleanup()getSequenceInformation(Identifier catalogName, Identifier schemaName, Identifier sequenceName) Obtain reference to the named SequenceInformationgetSequenceInformation(Namespace.Name schemaName, Identifier sequenceName) Obtain reference to the named SequenceInformationgetSequenceInformation(QualifiedSequenceName sequenceName) Obtain reference to the named SequenceInformationgetTableInformation(Identifier catalogName, Identifier schemaName, Identifier tableName) Obtain reference to the named TableInformationgetTableInformation(Namespace.Name namespace, Identifier tableName) Obtain reference to the named TableInformationgetTableInformation(QualifiedTableName tableName) Obtain reference to the named TableInformationgetTablesInformation(Namespace namespace) Obtain reference to all theTableInformationfor a givenNamespacelocateSequenceInformation(QualifiedSequenceName sequenceName) locateTableInformation(QualifiedTableName tableName) booleanschemaExists(Namespace.Name namespace) Check to see if the given schema already exists.
-
Constructor Details
-
DatabaseInformationImpl
public DatabaseInformationImpl(ServiceRegistry serviceRegistry, JdbcEnvironment jdbcEnvironment, SqlStringGenerationContext context, DdlTransactionIsolator ddlTransactionIsolator, SchemaManagementTool tool) throws SQLException - Throws:
SQLException
-
-
Method Details
-
catalogExists
Description copied from interface:DatabaseInformationCheck to see if the given catalog already exists.- Specified by:
catalogExistsin interfaceDatabaseInformation- Parameters:
catalog- The catalog name- Returns:
trueindicates a catalog with the given name already exists
-
schemaExists
Description copied from interface:DatabaseInformationCheck to see if the given schema already exists.- Specified by:
schemaExistsin interfaceDatabaseInformation- Parameters:
namespace- The schema name- Returns:
trueindicates a schema with the given name already exists
-
getTableInformation
public TableInformation getTableInformation(Identifier catalogName, Identifier schemaName, Identifier tableName) Description copied from interface:DatabaseInformationObtain reference to the named TableInformation- Specified by:
getTableInformationin interfaceDatabaseInformation- Parameters:
catalogName- The name of the catalog which contains the schema which the table belongs toschemaName- The name of the schema the table belongs totableName- The table name- Returns:
- The table information. May return
nullif not found.
-
getTableInformation
Description copied from interface:DatabaseInformationObtain reference to the named TableInformation- Specified by:
getTableInformationin interfaceDatabaseInformation- Parameters:
namespace- The name of the schema the table belongs totableName- The table name- Returns:
- The table information. May return
nullif not found.
-
getTableInformation
Description copied from interface:DatabaseInformationObtain reference to the named TableInformation- Specified by:
getTableInformationin interfaceDatabaseInformation- Parameters:
tableName- The qualified table name- Returns:
- The table information. May return
nullif not found.
-
getTablesInformation
Description copied from interface:DatabaseInformationObtain reference to all theTableInformationfor a givenNamespace- Specified by:
getTablesInformationin interfaceDatabaseInformation- Parameters:
namespace- TheNamespacewhich contains theTableInformation- Returns:
- a
NameSpaceTablesInformation
-
getSequenceInformation
public SequenceInformation getSequenceInformation(Identifier catalogName, Identifier schemaName, Identifier sequenceName) Description copied from interface:DatabaseInformationObtain reference to the named SequenceInformation- Specified by:
getSequenceInformationin interfaceDatabaseInformation- Parameters:
catalogName- The name of the catalog which contains the schema which the sequence belongs toschemaName- The name of the schema the sequence belongs tosequenceName- The sequence name- Returns:
- The sequence information. May return
nullif not found.
-
getSequenceInformation
public SequenceInformation getSequenceInformation(Namespace.Name schemaName, Identifier sequenceName) Description copied from interface:DatabaseInformationObtain reference to the named SequenceInformation- Specified by:
getSequenceInformationin interfaceDatabaseInformation- Parameters:
schemaName- The name of the schema the table belongs tosequenceName- The sequence name- Returns:
- The sequence information. May return
nullif not found.
-
getSequenceInformation
Description copied from interface:DatabaseInformationObtain reference to the named SequenceInformation- Specified by:
getSequenceInformationin interfaceDatabaseInformation- Parameters:
sequenceName- The qualified sequence name- Returns:
- The sequence information. May return
nullif not found.
-
cleanup
public void cleanup()- Specified by:
cleanupin interfaceDatabaseInformation
-
locateTableInformation
- Specified by:
locateTableInformationin interfaceExtractionContext.DatabaseObjectAccess
-
locateSequenceInformation
- Specified by:
locateSequenceInformationin interfaceExtractionContext.DatabaseObjectAccess
-