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
Constructors Constructor Description DatabaseInformationImpl(ServiceRegistry serviceRegistry, JdbcEnvironment jdbcEnvironment, SqlStringGenerationContext context, DdlTransactionIsolator ddlTransactionIsolator, SchemaManagementTool tool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
catalogExists(Identifier catalog)
Check to see if the given catalog already exists.void
cleanup()
SequenceInformation
getSequenceInformation(Identifier catalogName, Identifier schemaName, Identifier sequenceName)
Obtain reference to the named SequenceInformationSequenceInformation
getSequenceInformation(Namespace.Name schemaName, Identifier sequenceName)
Obtain reference to the named SequenceInformationSequenceInformation
getSequenceInformation(QualifiedSequenceName sequenceName)
Obtain reference to the named SequenceInformationTableInformation
getTableInformation(Identifier catalogName, Identifier schemaName, Identifier tableName)
Obtain reference to the named TableInformationTableInformation
getTableInformation(Namespace.Name namespace, Identifier tableName)
Obtain reference to the named TableInformationTableInformation
getTableInformation(QualifiedTableName tableName)
Obtain reference to the named TableInformationNameSpaceTablesInformation
getTablesInformation(Namespace namespace)
Obtain reference to all theTableInformation
for a givenNamespace
SequenceInformation
locateSequenceInformation(QualifiedSequenceName sequenceName)
TableInformation
locateTableInformation(QualifiedTableName tableName)
boolean
schemaExists(Namespace.Name namespace)
Check to see if the given schema already exists.
-
-
-
Constructor Detail
-
DatabaseInformationImpl
public DatabaseInformationImpl(ServiceRegistry serviceRegistry, JdbcEnvironment jdbcEnvironment, SqlStringGenerationContext context, DdlTransactionIsolator ddlTransactionIsolator, SchemaManagementTool tool) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
catalogExists
public boolean catalogExists(Identifier catalog)
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
public boolean schemaExists(Namespace.Name namespace)
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
public TableInformation getTableInformation(Namespace.Name namespace, Identifier tableName)
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
public TableInformation getTableInformation(QualifiedTableName tableName)
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
public NameSpaceTablesInformation getTablesInformation(Namespace namespace)
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
public SequenceInformation getSequenceInformation(QualifiedSequenceName sequenceName)
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
public TableInformation locateTableInformation(QualifiedTableName tableName)
- Specified by:
locateTableInformation
in interfaceExtractionContext.DatabaseObjectAccess
-
locateSequenceInformation
public SequenceInformation locateSequenceInformation(QualifiedSequenceName sequenceName)
- Specified by:
locateSequenceInformation
in interfaceExtractionContext.DatabaseObjectAccess
-
-