public abstract class HibernateDatabase
extends liquibase.database.AbstractJdbcDatabase
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SCHEMA |
protected org.hibernate.dialect.Dialect |
dialect |
protected static liquibase.logging.Logger |
LOG |
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased| Constructor and Description |
|---|
HibernateDatabase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterSetup()
Perform any post-configuration setting logic.
|
protected org.hibernate.boot.Metadata |
buildMetadata()
Called by
setConnection(DatabaseConnection) to create the Metadata stored in this database. |
protected org.hibernate.boot.Metadata |
buildMetadataFromPath()
Called by
buildMetadata() when a CustomMetadataFactory is not configured. |
protected void |
configureImplicitNamingStrategy(String implicitNamingStrategy,
org.hibernate.boot.MetadataBuilder builder) |
protected void |
configureMetadataBuilder(org.hibernate.boot.MetadataBuilder metadataBuilder)
Called by
buildMetadataFromPath() to do final configuration on the MetadataBuilder before MetadataBuilder.build() is called. |
protected void |
configureNewIdentifierGeneratorSupport(String value,
org.hibernate.boot.MetadataBuilder builder) |
protected void |
configurePhysicalNamingStrategy(String physicalNamingStrategy,
org.hibernate.boot.MetadataBuilder builder) |
protected abstract void |
configureSources(org.hibernate.boot.MetadataSources sources)
Adds any implementation-specific sources to the given
MetadataSources |
protected org.hibernate.boot.MetadataSources |
createMetadataSources()
Creates the base
MetadataSources to use for this database. |
boolean |
createsIndexesForForeignKeys() |
protected String |
findDialectName()
Called by
createMetadataSources() to determine the correct dialect name based on url parameters, configuration files, etc. |
protected String |
getConnectionCatalogName() |
protected String |
getConnectionSchemaName() |
String |
getDefaultCatalogName() |
String |
getDefaultDriver(String url) |
Integer |
getDefaultPort() |
String |
getDefaultSchemaName() |
org.hibernate.dialect.Dialect |
getDialect()
Returns the dialect determined during database initialization.
|
protected HibernateConnection |
getHibernateConnection()
Convenience method to return the underlying HibernateConnection in the JdbcConnection returned by
AbstractJdbcDatabase.getConnection() |
org.hibernate.boot.Metadata |
getMetadata()
Return the hibernate
Metadata used by this database. |
int |
getPriority() |
String |
getProperty(String name)
Returns the value of the given property.
|
boolean |
isCaseSensitive() |
boolean |
isSafeToRunUpdate() |
boolean |
requiresPassword() |
boolean |
requiresUsername() |
void |
setConnection(liquibase.database.DatabaseConnection conn) |
boolean |
supportsCatalogs() |
boolean |
supportsInitiallyDeferrableColumns() |
boolean |
supportsSchemas() |
boolean |
supportsTablespaces() |
addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeDataTypeName, escapeIndexName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateAutoIncrementBy, generateAutoIncrementStartWith, generateDatabaseFunctionValue, generatePrimaryKeyName, get, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getConnectionSchemaNameCallStatement, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDataTypeMaxParameters, getDateFunctions, getDateLiteral, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultDatabaseProductName, getDefaultFractionalDigitsForTimestamp, getDefaultScaleForNativeDataType, getDefaultSchema, getFetchSize, getJdbcCatalogName, getJdbcCatalogName, getJdbcSchemaName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getMaxFractionalDigitsForTimestamp, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getQuotingEndCharacter, getQuotingEndReplacement, getQuotingStartCharacter, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSchemaAndCatalogCase, getSchemaFromJdbcInfo, getSystemSchema, getSystemTables, getSystemViews, getTimeLiteral, getViewDefinition, hashCode, isAutoCommit, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isReservedWord, isSystemObject, isSystemView, isTimeOnly, isTimestamp, jdbcCallsCatalogsSchemas, markChangeSetExecStatus, mustQuoteObjectName, parseDate, quoteObject, removeRanStatus, requiresExplicitNullForColumns, resetInternalState, rollback, saveRollbackStatement, saveStatements, set, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, startsWithNumeric, supportsAutoIncrement, supportsBatchUpdates, supportsCatalogInObjectName, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsNotNullConstraintNames, supportsPrimaryKeyNames, supportsRestrictForeignKeys, supportsSequences, tag, toString, unescapeDataTypeName, unescapeDataTypeString, validateprotected static final liquibase.logging.Logger LOG
protected org.hibernate.dialect.Dialect dialect
public static final String DEFAULT_SCHEMA
public boolean requiresPassword()
requiresPassword in interface liquibase.database.DatabaserequiresPassword in class liquibase.database.AbstractJdbcDatabasepublic boolean requiresUsername()
requiresUsername in interface liquibase.database.DatabaserequiresUsername in class liquibase.database.AbstractJdbcDatabasepublic int getPriority()
public void setConnection(liquibase.database.DatabaseConnection conn)
setConnection in interface liquibase.database.DatabasesetConnection in class liquibase.database.AbstractJdbcDatabaseprotected String findDialectName()
createMetadataSources() to determine the correct dialect name based on url parameters, configuration files, etc.public org.hibernate.dialect.Dialect getDialect()
public org.hibernate.boot.Metadata getMetadata()
throws liquibase.exception.DatabaseException
Metadata used by this database.liquibase.exception.DatabaseExceptionprotected HibernateConnection getHibernateConnection()
AbstractJdbcDatabase.getConnection()protected final org.hibernate.boot.Metadata buildMetadata()
throws liquibase.exception.DatabaseException
setConnection(DatabaseConnection) to create the Metadata stored in this database.
If the URL path is configured for a CustomMetadataFactory, create the metadata from that class.
Otherwise, it delegates to buildMetadataFromPath()liquibase.exception.DatabaseExceptionprotected org.hibernate.boot.Metadata buildMetadataFromPath()
throws liquibase.exception.DatabaseException
buildMetadata() when a CustomMetadataFactory is not configured.
Default implementation passes the results of createMetadataSources() to configureSources(MetadataSources) and then calls configureMetadataBuilder(MetadataBuilder)
but this method can be overridden with any provider-specific implementations needed.liquibase.exception.DatabaseExceptionprotected org.hibernate.boot.MetadataSources createMetadataSources()
throws liquibase.exception.DatabaseException
MetadataSources to use for this database.
Normally, the result of this method is passed through configureSources(MetadataSources).liquibase.exception.DatabaseExceptionprotected abstract void configureSources(org.hibernate.boot.MetadataSources sources)
throws liquibase.exception.DatabaseException
MetadataSourcesliquibase.exception.DatabaseExceptionprotected void configureNewIdentifierGeneratorSupport(String value, org.hibernate.boot.MetadataBuilder builder) throws liquibase.exception.DatabaseException
liquibase.exception.DatabaseExceptionprotected void configurePhysicalNamingStrategy(String physicalNamingStrategy, org.hibernate.boot.MetadataBuilder builder) throws liquibase.exception.DatabaseException
liquibase.exception.DatabaseExceptionprotected void configureImplicitNamingStrategy(String implicitNamingStrategy, org.hibernate.boot.MetadataBuilder builder) throws liquibase.exception.DatabaseException
liquibase.exception.DatabaseExceptionprotected void afterSetup()
protected void configureMetadataBuilder(org.hibernate.boot.MetadataBuilder metadataBuilder)
throws liquibase.exception.DatabaseException
buildMetadataFromPath() to do final configuration on the MetadataBuilder before MetadataBuilder.build() is called.liquibase.exception.DatabaseExceptionpublic String getProperty(String name)
public boolean createsIndexesForForeignKeys()
createsIndexesForForeignKeys in interface liquibase.database.DatabasecreatesIndexesForForeignKeys in class liquibase.database.AbstractJdbcDatabasepublic Integer getDefaultPort()
public boolean supportsInitiallyDeferrableColumns()
public boolean supportsTablespaces()
protected String getConnectionCatalogName() throws liquibase.exception.DatabaseException
getConnectionCatalogName in class liquibase.database.AbstractJdbcDatabaseliquibase.exception.DatabaseExceptionprotected String getConnectionSchemaName()
getConnectionSchemaName in class liquibase.database.AbstractJdbcDatabasepublic String getDefaultSchemaName()
getDefaultSchemaName in interface liquibase.database.DatabasegetDefaultSchemaName in class liquibase.database.AbstractJdbcDatabasepublic String getDefaultCatalogName()
getDefaultCatalogName in interface liquibase.database.DatabasegetDefaultCatalogName in class liquibase.database.AbstractJdbcDatabasepublic boolean isSafeToRunUpdate()
throws liquibase.exception.DatabaseException
isSafeToRunUpdate in interface liquibase.database.DatabaseisSafeToRunUpdate in class liquibase.database.AbstractJdbcDatabaseliquibase.exception.DatabaseExceptionpublic boolean isCaseSensitive()
isCaseSensitive in interface liquibase.database.DatabaseisCaseSensitive in class liquibase.database.AbstractJdbcDatabasepublic boolean supportsSchemas()
supportsSchemas in interface liquibase.database.DatabasesupportsSchemas in class liquibase.database.AbstractJdbcDatabasepublic boolean supportsCatalogs()
supportsCatalogs in interface liquibase.database.DatabasesupportsCatalogs in class liquibase.database.AbstractJdbcDatabaseCopyright © 2020 Liquibase.org. All rights reserved.