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 booleancatalogExists(Identifier catalog)Check to see if the given catalog already exists.voidcleanup()SequenceInformationgetSequenceInformation(Identifier catalogName, Identifier schemaName, Identifier sequenceName)Obtain reference to the named SequenceInformationSequenceInformationgetSequenceInformation(Namespace.Name schemaName, Identifier sequenceName)Obtain reference to the named SequenceInformationSequenceInformationgetSequenceInformation(QualifiedSequenceName sequenceName)Obtain reference to the named SequenceInformationTableInformationgetTableInformation(Identifier catalogName, Identifier schemaName, Identifier tableName)Obtain reference to the named TableInformationTableInformationgetTableInformation(Namespace.Name namespace, Identifier tableName)Obtain reference to the named TableInformationTableInformationgetTableInformation(QualifiedTableName tableName)Obtain reference to the named TableInformationNameSpaceTablesInformationgetTablesInformation(Namespace namespace)Obtain reference to all theTableInformationfor a givenNamespaceSequenceInformationlocateSequenceInformation(QualifiedSequenceName sequenceName)TableInformationlocateTableInformation(QualifiedTableName tableName)booleanschemaExists(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: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
public boolean schemaExists(Namespace.Name namespace)
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
public TableInformation getTableInformation(Namespace.Name namespace, Identifier tableName)
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
public TableInformation getTableInformation(QualifiedTableName tableName)
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
public NameSpaceTablesInformation getTablesInformation(Namespace namespace)
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
public SequenceInformation getSequenceInformation(QualifiedSequenceName sequenceName)
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
public TableInformation locateTableInformation(QualifiedTableName tableName)
- Specified by:
locateTableInformationin interfaceExtractionContext.DatabaseObjectAccess
-
locateSequenceInformation
public SequenceInformation locateSequenceInformation(QualifiedSequenceName sequenceName)
- Specified by:
locateSequenceInformationin interfaceExtractionContext.DatabaseObjectAccess
-
-