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 TypeMethodDescriptionboolean
catalogExists
(Identifier catalog) Check to see if the given catalog already exists.void
cleanup()
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 theTableInformation
for a givenNamespace
locateSequenceInformation
(QualifiedSequenceName sequenceName) locateTableInformation
(QualifiedTableName tableName) boolean
schemaExists
(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:DatabaseInformation
Check to see if the given catalog already exists.- Specified by:
catalogExists
in interfaceDatabaseInformation
- Parameters:
catalog
- The catalog name- Returns:
true
indicates a catalog with the given name already exists
-
schemaExists
Description copied from interface:DatabaseInformation
Check to see if the given schema already exists.- Specified by:
schemaExists
in interfaceDatabaseInformation
- Parameters:
namespace
- The schema name- Returns:
true
indicates a schema with the given name already exists
-
getTableInformation
public TableInformation getTableInformation(Identifier catalogName, Identifier schemaName, Identifier tableName) Description copied from interface:DatabaseInformation
Obtain reference to the named TableInformation- Specified by:
getTableInformation
in 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
null
if not found.
-
getTableInformation
Description copied from interface:DatabaseInformation
Obtain reference to the named TableInformation- Specified by:
getTableInformation
in interfaceDatabaseInformation
- Parameters:
namespace
- The name of the schema the table belongs totableName
- The table name- Returns:
- The table information. May return
null
if not found.
-
getTableInformation
Description copied from interface:DatabaseInformation
Obtain reference to the named TableInformation- Specified by:
getTableInformation
in interfaceDatabaseInformation
- Parameters:
tableName
- The qualified table name- Returns:
- The table information. May return
null
if not found.
-
getTablesInformation
Description copied from interface:DatabaseInformation
Obtain reference to all theTableInformation
for a givenNamespace
- Specified by:
getTablesInformation
in interfaceDatabaseInformation
- Parameters:
namespace
- TheNamespace
which contains theTableInformation
- Returns:
- a
NameSpaceTablesInformation
-
getSequenceInformation
public SequenceInformation getSequenceInformation(Identifier catalogName, Identifier schemaName, Identifier sequenceName) Description copied from interface:DatabaseInformation
Obtain reference to the named SequenceInformation- Specified by:
getSequenceInformation
in 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
null
if not found.
-
getSequenceInformation
public SequenceInformation getSequenceInformation(Namespace.Name schemaName, Identifier sequenceName) Description copied from interface:DatabaseInformation
Obtain reference to the named SequenceInformation- Specified by:
getSequenceInformation
in interfaceDatabaseInformation
- Parameters:
schemaName
- The name of the schema the table belongs tosequenceName
- The sequence name- Returns:
- The sequence information. May return
null
if not found.
-
getSequenceInformation
Description copied from interface:DatabaseInformation
Obtain reference to the named SequenceInformation- Specified by:
getSequenceInformation
in interfaceDatabaseInformation
- Parameters:
sequenceName
- The qualified sequence name- Returns:
- The sequence information. May return
null
if not found.
-
cleanup
public void cleanup()- Specified by:
cleanup
in interfaceDatabaseInformation
-
locateTableInformation
- Specified by:
locateTableInformation
in interfaceExtractionContext.DatabaseObjectAccess
-
locateSequenceInformation
- Specified by:
locateSequenceInformation
in interfaceExtractionContext.DatabaseObjectAccess
-