liquibase.ext.hibernate.database
Class HibernateClassicDatabase

java.lang.Object
  extended by liquibase.database.AbstractJdbcDatabase
      extended by liquibase.ext.hibernate.database.HibernateDatabase
          extended by liquibase.ext.hibernate.database.HibernateClassicDatabase
All Implemented Interfaces:
liquibase.database.Database, liquibase.servicelocator.PrioritizedService

public class HibernateClassicDatabase
extends HibernateDatabase

Database implementation for "classic" hibernate configurations. This supports passing a hibernate xml configuration file or a CustomClassicConfigurationFactory implementation


Field Summary
 
Fields inherited from class liquibase.ext.hibernate.database.HibernateDatabase
DEFAULT_SCHEMA, LOG
 
Fields inherited from class liquibase.database.AbstractJdbcDatabase
caseSensitive, currentDateTimeFunction, dateFunctions, defaultAutoIncrementBy, defaultAutoIncrementStartWith, defaultCatalogName, defaultSchemaName, quotingEndCharacter, quotingStartCharacter, quotingStrategy, sequenceCurrentValueFunction, sequenceNextValueFunction, unmodifiableDataTypes, unquotedObjectsAreUppercased
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
HibernateClassicDatabase()
           
 
Method Summary
protected  org.hibernate.cfg.Configuration buildConfiguration(HibernateConnection connection)
          Concrete implementations use this method to create the hibernate Configuration object based on the passed URL
protected  org.hibernate.cfg.Configuration buildConfigurationFromFactory(HibernateConnection connection)
          Build a Configuration object assuming the connection path is a CustomClassicConfigurationFactory class name
protected  org.hibernate.cfg.Configuration buildConfigurationfromFile(HibernateConnection connection)
          Build a Configuration object assuming the connection path is a hibernate XML configuration file.
protected  String getDefaultDatabaseProductName()
           
 String getShortName()
           
 boolean isCorrectDatabaseImplementation(liquibase.database.DatabaseConnection conn)
           
protected  boolean isCustomFactoryClass(String path)
          Returns true if the given path is a factory class
 
Methods inherited from class liquibase.ext.hibernate.database.HibernateDatabase
afterSetup, configureDialect, configureNamingStrategy, createsIndexesForForeignKeys, getConfiguration, getConnectionCatalogName, getConnectionSchemaName, getDefaultCatalogName, getDefaultDriver, getDefaultPort, getDefaultSchemaName, getDialect, getPriority, isCaseSensitive, isSafeToRunUpdate, requiresPassword, requiresUsername, setConnection, supportsCatalogs, supportsInitiallyDeferrableColumns, supportsSchemas, supportsTablespaces
 
Methods inherited from class liquibase.database.AbstractJdbcDatabase
addReservedWords, canCreateChangeLogTable, close, commit, correctObjectName, correctSchema, correctSchema, dataTypeIsNotModifiable, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeIndexName, escapeObjectName, escapeObjectName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeRollbackStatements, executeStatements, filterRollbackVisitors, generateAutoIncrementBy, generateAutoIncrementStartWith, generateDatabaseFunctionValue, generatePrimaryKeyName, getAutoCommitMode, getAutoIncrementByClause, getAutoIncrementClause, getAutoIncrementClause, getAutoIncrementClosing, getAutoIncrementOpening, getAutoIncrementStartWithClause, getConcatSql, getConnection, getContainingObjects, getCurrentDateTimeFunction, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDataTypeMaxParameters, getDateFunctions, getDateLiteral, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultSchema, getJdbcCatalogName, getJdbcCatalogName, getJdbcSchemaName, getJdbcSchemaName, getLineComment, getLiquibaseCatalogName, getLiquibaseSchemaName, getLiquibaseTablespaceName, getName, getObjectQuotingStrategy, getOutputDefaultCatalog, getOutputDefaultSchema, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSchemaFromJdbcInfo, getSystemSchema, getSystemTables, getSystemViews, getTimeLiteral, getViewDefinition, hashCode, isAutoCommit, isDateOnly, isDateTime, isDefaultCatalog, isDefaultSchema, isFunction, isLiquibaseObject, isReservedWord, isSystemObject, isSystemView, isTimeOnly, jdbcCallsCatalogsSchemas, markChangeSetExecStatus, mustQuoteObjectName, parseDate, quoteObject, removeRanStatus, resetInternalState, rollback, saveRollbackStatement, saveStatements, setAutoCommit, setCanCacheLiquibaseTableInfo, setCaseSensitive, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultCatalogName, setDefaultSchemaName, setLiquibaseCatalogName, setLiquibaseSchemaName, setLiquibaseTablespaceName, setObjectQuotingStrategy, setOutputDefaultCatalog, setOutputDefaultSchema, startsWithNumeric, supportsAutoIncrement, supportsCatalogInObjectName, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsPrimaryKeyNames, supportsRestrictForeignKeys, supportsSequences, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HibernateClassicDatabase

public HibernateClassicDatabase()
Method Detail

isCorrectDatabaseImplementation

public boolean isCorrectDatabaseImplementation(liquibase.database.DatabaseConnection conn)
                                        throws liquibase.exception.DatabaseException
Throws:
liquibase.exception.DatabaseException

buildConfiguration

protected org.hibernate.cfg.Configuration buildConfiguration(HibernateConnection connection)
                                                      throws liquibase.exception.DatabaseException
Description copied from class: HibernateDatabase
Concrete implementations use this method to create the hibernate Configuration object based on the passed URL

Specified by:
buildConfiguration in class HibernateDatabase
Throws:
liquibase.exception.DatabaseException

buildConfigurationFromFactory

protected org.hibernate.cfg.Configuration buildConfigurationFromFactory(HibernateConnection connection)
                                                                 throws liquibase.exception.DatabaseException
Build a Configuration object assuming the connection path is a CustomClassicConfigurationFactory class name

Throws:
liquibase.exception.DatabaseException

buildConfigurationfromFile

protected org.hibernate.cfg.Configuration buildConfigurationfromFile(HibernateConnection connection)
Build a Configuration object assuming the connection path is a hibernate XML configuration file.


isCustomFactoryClass

protected boolean isCustomFactoryClass(String path)
Returns true if the given path is a factory class


getShortName

public String getShortName()

getDefaultDatabaseProductName

protected String getDefaultDatabaseProductName()
Specified by:
getDefaultDatabaseProductName in class liquibase.database.AbstractJdbcDatabase


Copyright © 2015 Liquibase.org. All rights reserved.