public abstract class HibernateDatabase extends AbstractJdbcDatabase
Base class for all Hibernate Databases. This extension interacts with Hibernate by creating standard liquibase.database.Database implementations that bridge what Liquibase expects and the Hibernate APIs.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
DEFAULT_SCHEMA |
|
static java.lang.String |
HIBERNATE_TEMP_USE_JDBC_METADATA_DEFAULTS |
|
protected Dialect |
dialect |
| Constructor and description |
|---|
HibernateDatabase() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
afterSetup()Perform any post-configuration setting logic. |
|
protected final Metadata |
buildMetadata()Called by setConnection(DatabaseConnection) to create the Metadata stored in this database. |
|
protected Metadata |
buildMetadataFromPath()Called by buildMetadata() when a CustomMetadataFactory is not configured. |
|
protected void |
configureImplicitNamingStrategy(java.lang.String implicitNamingStrategy, MetadataBuilder builder) |
|
protected void |
configureMetadataBuilder(MetadataBuilder metadataBuilder)Called by buildMetadataFromPath() to do final configuration on the MetadataBuilder before MetadataBuilder#build()#build() is called. |
|
protected void |
configurePhysicalNamingStrategy(java.lang.String physicalNamingStrategy, MetadataBuilder builder) |
|
protected abstract void |
configureSources(MetadataSources sources)Adds any implementation-specific sources to the given MetadataSources |
|
protected MetadataSources |
createMetadataSources()Creates the base MetadataSources to use for this database. |
|
public boolean |
createsIndexesForForeignKeys() |
|
protected java.lang.String |
findDialectName()Called by createMetadataSources() to determine the correct dialect name based on url parameters, configuration files, etc. |
|
protected java.lang.String |
getConnectionCatalogName() |
|
protected java.lang.String |
getConnectionSchemaName() |
|
public java.lang.String |
getDefaultCatalogName() |
|
public java.lang.String |
getDefaultDriver(java.lang.String url) |
|
public java.lang.Integer |
getDefaultPort() |
|
public java.lang.String |
getDefaultSchemaName() |
|
public Dialect |
getDialect()Returns the dialect determined during database initialization. |
|
protected HibernateConnection |
getHibernateConnection()Convenience method to return the underlying HibernateConnection in the JdbcConnection returned by getConnection() |
|
public Metadata |
getMetadata()Return the hibernate Metadata used by this database. |
|
public int |
getPriority() |
|
public java.lang.String |
getProperty(java.lang.String name)Returns the value of the given property. |
|
public boolean |
isCaseSensitive() |
|
public boolean |
isSafeToRunUpdate() |
|
public boolean |
requiresPassword() |
|
public boolean |
requiresUsername() |
|
public void |
setConnection(DatabaseConnection conn) |
|
public boolean |
supportsAutoIncrement()Required for snapshot auto-increment detection of identity/sequence columns managed by Hibernate. |
|
public boolean |
supportsInitiallyDeferrableColumns() |
|
public boolean |
supportsTablespaces() |
Perform any post-configuration setting logic.
Called by 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()
Called by 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.
Called by buildMetadataFromPath() to do final configuration on the MetadataBuilder before MetadataBuilder#build()#build() is called.
Adds any implementation-specific sources to the given MetadataSources
Creates the base MetadataSources to use for this database. Normally, the result of this method is passed through configureSources(MetadataSources).
Called by createMetadataSources() to determine the correct dialect name based on url parameters, configuration files, etc.
Returns the dialect determined during database initialization.
Convenience method to return the underlying HibernateConnection in the JdbcConnection returned by getConnection()
Return the hibernate Metadata used by this database.
Returns the value of the given property. Should return the value given as a connection URL first, then fall back to configuration-specific values.
Required for snapshot auto-increment detection of identity/sequence columns managed by Hibernate.