liquibase.database
Class HibernateDatabase

java.lang.Object
  extended by liquibase.database.HibernateDatabase
All Implemented Interfaces:
Database, DatabaseObject

public class HibernateDatabase
extends java.lang.Object
implements Database


Constructor Summary
HibernateDatabase(java.lang.String configFile)
           
 
Method Summary
 void checkDatabaseChangeLogLockTable()
           
 void checkDatabaseChangeLogTable()
           
 void close()
           
 void commit()
           
 java.lang.Object convertDatabaseValueToJavaObject(java.lang.Object defaultValue, int dataType, int columnSize, int decimalDigits)
           
 java.lang.String convertJavaObjectToString(java.lang.Object value)
           
 java.lang.String convertRequestedSchemaToCatalog(java.lang.String requestedSchema)
           
 java.lang.String convertRequestedSchemaToSchema(java.lang.String requestedSchema)
           
 org.hibernate.cfg.Configuration createConfiguration()
           
 DatabaseSnapshot createDatabaseSnapshot(java.lang.String schema, java.util.Set<DiffStatusListener> statusListeners)
           
 SqlStatement createFindSequencesSQL(java.lang.String schema)
           
 boolean doesChangeLogLockTableExist()
           
 boolean doesChangeLogTableExist()
           
 boolean doesTagExist(java.lang.String tag)
           
 void dropDatabaseObjects(java.lang.String schema)
           
 java.lang.String escapeColumnName(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
          Escapes a single column name in a database-dependent manner so reserved words can be used as a column name (i.e.
 java.lang.String escapeColumnNameList(java.lang.String columnNames)
          Escapes a list of column names in a database-dependent manner so reserved words can be used as a column name (i.e.
 java.lang.String escapeConstraintName(java.lang.String constraintName)
           
 java.lang.String escapeIndexName(java.lang.String schemaName, java.lang.String indexName)
           
 java.lang.String escapeSequenceName(java.lang.String schemaName, java.lang.String sequenceName)
           
 java.lang.String escapeStringForDatabase(java.lang.String string)
           
 java.lang.String escapeTableName(java.lang.String schemaName, java.lang.String tableName)
          Escapes the table name in a database-dependent manner so reserved words can be used as a table name (i.e.
 java.lang.String escapeViewName(java.lang.String schemaName, java.lang.String viewName)
           
 java.lang.String generatePrimaryKeyName(java.lang.String tableName)
           
 boolean getAutoCommitMode()
          Auto-commit mode to run in
 java.lang.String getAutoIncrementClause()
           
 java.lang.String getBigIntType()
           
 java.lang.String getBlobType()
          Returns the actual database-specific data type to use a "BLOB" column.
 java.lang.String getBooleanType()
          Returns the actual database-specific data type to use a "boolean" column.
 java.lang.String getCharType()
          Returns the actual database-specific data type to use for a "char" column.
 java.lang.String getClobType()
          Returns the actual database-specific data type to use a "CLOB" column.
 java.lang.String getColumnType(java.lang.String columnType, java.lang.Boolean autoIncrement)
           
 java.lang.String getConcatSql(java.lang.String... values)
          Returns SQL to concat the passed values.
 java.lang.String getConfigFile()
           
 DatabaseConnection getConnection()
           
 java.lang.String getConnectionURL()
           
 java.lang.String getConnectionUsername()
           
 java.lang.String getCurrencyType()
          Returns the actual database-specific data type to use a "currency" column.
 java.lang.String getCurrentDateTimeFunction()
          Returns database-specific function for generating the current date/time.
 java.lang.String getDatabaseChangeLogLockTableName()
           
 java.lang.String getDatabaseChangeLogTableName()
           
 int getDatabaseMajorVersion()
           
 int getDatabaseMinorVersion()
           
 java.lang.String getDatabaseProductName()
           
 java.lang.String getDatabaseProductName(java.sql.Connection conn)
           
 java.lang.String getDatabaseProductVersion()
           
 int getDatabaseType(int type)
           
 java.lang.String getDateLiteral(java.sql.Date date)
           
 java.lang.String getDateLiteral(java.util.Date defaultDateValue)
           
 java.lang.String getDateLiteral(java.lang.String isoDate)
           
 java.lang.String getDateLiteral(java.sql.Time time)
           
 java.lang.String getDateLiteral(java.sql.Timestamp timeStamp)
           
 java.lang.String getDateTimeType()
          Returns the actual database-specific data type to use a "datetime" column.
 java.lang.String getDateType()
           
 java.lang.String getDefaultCatalogName()
           
 java.lang.String getDefaultDriver(java.lang.String url)
          If this database understands the given url, return the default driver class name.
 java.lang.String getDefaultSchemaName()
           
 java.lang.String getDoubleType()
          Returns the actual database-specific data type to use for a "double" column.
 java.lang.String getDriverName()
           
 java.lang.String getFalseBooleanValue()
           
 java.lang.String getFloatType()
          Returns the actual database-specific data type to use for a "float" column.
 java.lang.String getIntType()
          Returns the actual database-specific data type to use for a "int" column.
 JdbcTemplate getJdbcTemplate()
           
 java.lang.String getLineComment()
           
 java.lang.String getProductName()
          Returns the full database product name.
 RanChangeSet getRanChangeSet(ChangeSet changeSet)
           
 java.util.List<RanChangeSet> getRanChangeSetList()
           
 java.util.Date getRanDate(ChangeSet changeSet)
           
 ChangeSet.RunStatus getRunStatus(ChangeSet changeSet)
           
 SqlStatement getSelectChangeLogLockSQL()
           
 java.lang.String getTimeType()
           
 java.lang.String getTinyIntType()
          Returns the actual database-specific data type to use for a "tinyint" column.
 java.lang.String getTrueBooleanValue()
           
 java.lang.String getTypeName()
          Returns an all-lower-case short name of the product.
 java.lang.String getUUIDType()
          Returns the actual database-specific data type to use a "UUID" column.
 java.lang.String getVarcharType()
          Returns the actual database-specific data type to use for a "varchar" column.
 java.lang.String getViewDefinition(java.lang.String schemaName, java.lang.String name)
           
 boolean isAutoCommit()
           
 boolean isColumnAutoIncrement(java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
           
 boolean isCorrectDatabaseImplementation(java.sql.Connection conn)
          Is this AbstractDatabase subclass the correct one to use for the given connection.
 boolean isLiquibaseTable(java.lang.String tableName)
           
 boolean isLocalDatabase()
          As the connectionURL for Hibernate refers to a config file, just return false
 boolean isSystemTable(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)
           
 boolean isSystemView(java.lang.String catalogName, java.lang.String schemaName, java.lang.String name)
           
 void markChangeSetAsRan(ChangeSet changeSet)
           
 void markChangeSetAsReRan(ChangeSet changeSet)
           
 void removeRanStatus(ChangeSet changeSet)
           
 void rollback()
           
 void setAutoCommit(boolean b)
           
 void setConnection(java.sql.Connection conn)
           
 void setConnection(DatabaseConnection conn)
           
 void setCurrentDateTimeFunction(java.lang.String function)
           
 void setDatabaseChangeLogLockTableName(java.lang.String tableName)
          Does nothing because this is a hibernate database
 void setDatabaseChangeLogTableName(java.lang.String tableName)
          Does nothing because this is a hibernate database
 void setDefaultSchemaName(java.lang.String schemaName)
           
 void setJdbcTemplate(JdbcTemplate template)
           
 boolean shouldQuoteValue(java.lang.String value)
           
 boolean supportsAutoIncrement()
           
 boolean supportsDDLInTransaction()
          Determines if the database supports DDL within a transaction or not.
 boolean supportsInitiallyDeferrableColumns()
          Returns whether this database support initially deferrable columns.
 boolean supportsRestrictForeignKeys()
           
 boolean supportsSchemas()
           
 boolean supportsSequences()
           
 boolean supportsTablespaces()
           
 void tag(java.lang.String tagString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateDatabase

public HibernateDatabase(java.lang.String configFile)
Method Detail

createDatabaseSnapshot

public DatabaseSnapshot createDatabaseSnapshot(java.lang.String schema,
                                               java.util.Set<DiffStatusListener> statusListeners)
                                        throws JDBCException
Specified by:
createDatabaseSnapshot in interface Database
Throws:
JDBCException

getConfigFile

public java.lang.String getConfigFile()

isCorrectDatabaseImplementation

public boolean isCorrectDatabaseImplementation(java.sql.Connection conn)
                                        throws JDBCException
Description copied from interface: Database
Is this AbstractDatabase subclass the correct one to use for the given connection.

Specified by:
isCorrectDatabaseImplementation in interface Database
Throws:
JDBCException

getDefaultDriver

public java.lang.String getDefaultDriver(java.lang.String url)
Description copied from interface: Database
If this database understands the given url, return the default driver class name. Otherwise return null.

Specified by:
getDefaultDriver in interface Database

getConnection

public DatabaseConnection getConnection()
Specified by:
getConnection in interface Database

setConnection

public void setConnection(java.sql.Connection conn)
Specified by:
setConnection in interface Database

setConnection

public void setConnection(DatabaseConnection conn)
Specified by:
setConnection in interface Database

getAutoCommitMode

public boolean getAutoCommitMode()
Description copied from interface: Database
Auto-commit mode to run in

Specified by:
getAutoCommitMode in interface Database

isAutoCommit

public boolean isAutoCommit()
                     throws JDBCException
Specified by:
isAutoCommit in interface Database
Throws:
JDBCException

setAutoCommit

public void setAutoCommit(boolean b)
                   throws JDBCException
Specified by:
setAutoCommit in interface Database
Throws:
JDBCException

supportsDDLInTransaction

public boolean supportsDDLInTransaction()
Description copied from interface: Database
Determines if the database supports DDL within a transaction or not.

Specified by:
supportsDDLInTransaction in interface Database
Returns:
True if the database supports DDL within a transaction, otherwise false.

getDatabaseProductName

public java.lang.String getDatabaseProductName()
Specified by:
getDatabaseProductName in interface Database

getDatabaseProductVersion

public java.lang.String getDatabaseProductVersion()
                                           throws JDBCException
Specified by:
getDatabaseProductVersion in interface Database
Throws:
JDBCException

getDatabaseMajorVersion

public int getDatabaseMajorVersion()
                            throws JDBCException
Specified by:
getDatabaseMajorVersion in interface Database
Throws:
JDBCException

getDatabaseMinorVersion

public int getDatabaseMinorVersion()
                            throws JDBCException
Specified by:
getDatabaseMinorVersion in interface Database
Throws:
JDBCException

getProductName

public java.lang.String getProductName()
Description copied from interface: Database
Returns the full database product name. May be different than what the JDBC connection reports (getDatabaseProductName())

Specified by:
getProductName in interface Database

getTypeName

public java.lang.String getTypeName()
Description copied from interface: Database
Returns an all-lower-case short name of the product. Used for end-user selecting of database type such as the DBMS precondition.

Specified by:
getTypeName in interface Database

getDriverName

public java.lang.String getDriverName()
                               throws JDBCException
Specified by:
getDriverName in interface Database
Throws:
JDBCException

getConnectionURL

public java.lang.String getConnectionURL()
                                  throws JDBCException
Specified by:
getConnectionURL in interface Database
Throws:
JDBCException

getConnectionUsername

public java.lang.String getConnectionUsername()
                                       throws JDBCException
Specified by:
getConnectionUsername in interface Database
Throws:
JDBCException

getDefaultCatalogName

public java.lang.String getDefaultCatalogName()
                                       throws JDBCException
Specified by:
getDefaultCatalogName in interface Database
Throws:
JDBCException

getDefaultSchemaName

public java.lang.String getDefaultSchemaName()
Specified by:
getDefaultSchemaName in interface Database

setDefaultSchemaName

public void setDefaultSchemaName(java.lang.String schemaName)
                          throws JDBCException
Specified by:
setDefaultSchemaName in interface Database
Throws:
JDBCException

supportsInitiallyDeferrableColumns

public boolean supportsInitiallyDeferrableColumns()
Description copied from interface: Database
Returns whether this database support initially deferrable columns.

Specified by:
supportsInitiallyDeferrableColumns in interface Database

supportsSequences

public boolean supportsSequences()
Specified by:
supportsSequences in interface Database

supportsAutoIncrement

public boolean supportsAutoIncrement()
Specified by:
supportsAutoIncrement in interface Database

getColumnType

public java.lang.String getColumnType(java.lang.String columnType,
                                      java.lang.Boolean autoIncrement)
Specified by:
getColumnType in interface Database

getFalseBooleanValue

public java.lang.String getFalseBooleanValue()
Specified by:
getFalseBooleanValue in interface Database

getTrueBooleanValue

public java.lang.String getTrueBooleanValue()
Specified by:
getTrueBooleanValue in interface Database

getDateLiteral

public java.lang.String getDateLiteral(java.lang.String isoDate)
Specified by:
getDateLiteral in interface Database

getCurrentDateTimeFunction

public java.lang.String getCurrentDateTimeFunction()
Description copied from interface: Database
Returns database-specific function for generating the current date/time.

Specified by:
getCurrentDateTimeFunction in interface Database

setCurrentDateTimeFunction

public void setCurrentDateTimeFunction(java.lang.String function)
Specified by:
setCurrentDateTimeFunction in interface Database

getLineComment

public java.lang.String getLineComment()
Specified by:
getLineComment in interface Database

getAutoIncrementClause

public java.lang.String getAutoIncrementClause()
Specified by:
getAutoIncrementClause in interface Database

getDatabaseChangeLogTableName

public java.lang.String getDatabaseChangeLogTableName()
Specified by:
getDatabaseChangeLogTableName in interface Database

getDatabaseChangeLogLockTableName

public java.lang.String getDatabaseChangeLogLockTableName()
Specified by:
getDatabaseChangeLogLockTableName in interface Database

setDatabaseChangeLogLockTableName

public void setDatabaseChangeLogLockTableName(java.lang.String tableName)
Does nothing because this is a hibernate database

Specified by:
setDatabaseChangeLogLockTableName in interface Database
See Also:
Database.setDatabaseChangeLogLockTableName(java.lang.String)

setDatabaseChangeLogTableName

public void setDatabaseChangeLogTableName(java.lang.String tableName)
Does nothing because this is a hibernate database

Specified by:
setDatabaseChangeLogTableName in interface Database
See Also:
Database.setDatabaseChangeLogTableName(java.lang.String)

getConcatSql

public java.lang.String getConcatSql(java.lang.String... values)
Description copied from interface: Database
Returns SQL to concat the passed values.

Specified by:
getConcatSql in interface Database

doesChangeLogTableExist

public boolean doesChangeLogTableExist()
Specified by:
doesChangeLogTableExist in interface Database

doesChangeLogLockTableExist

public boolean doesChangeLogLockTableExist()
Specified by:
doesChangeLogLockTableExist in interface Database

checkDatabaseChangeLogTable

public void checkDatabaseChangeLogTable()
                                 throws JDBCException
Specified by:
checkDatabaseChangeLogTable in interface Database
Throws:
JDBCException

checkDatabaseChangeLogLockTable

public void checkDatabaseChangeLogLockTable()
                                     throws JDBCException
Specified by:
checkDatabaseChangeLogLockTable in interface Database
Throws:
JDBCException

dropDatabaseObjects

public void dropDatabaseObjects(java.lang.String schema)
                         throws JDBCException
Specified by:
dropDatabaseObjects in interface Database
Throws:
JDBCException

tag

public void tag(java.lang.String tagString)
         throws JDBCException
Specified by:
tag in interface Database
Throws:
JDBCException

doesTagExist

public boolean doesTagExist(java.lang.String tag)
                     throws JDBCException
Specified by:
doesTagExist in interface Database
Throws:
JDBCException

isSystemTable

public boolean isSystemTable(java.lang.String catalogName,
                             java.lang.String schemaName,
                             java.lang.String tableName)
Specified by:
isSystemTable in interface Database

isLiquibaseTable

public boolean isLiquibaseTable(java.lang.String tableName)
Specified by:
isLiquibaseTable in interface Database

createFindSequencesSQL

public SqlStatement createFindSequencesSQL(java.lang.String schema)
                                    throws JDBCException
Specified by:
createFindSequencesSQL in interface Database
Throws:
JDBCException

shouldQuoteValue

public boolean shouldQuoteValue(java.lang.String value)
Specified by:
shouldQuoteValue in interface Database

supportsTablespaces

public boolean supportsTablespaces()
Specified by:
supportsTablespaces in interface Database

getViewDefinition

public java.lang.String getViewDefinition(java.lang.String schemaName,
                                          java.lang.String name)
                                   throws JDBCException
Specified by:
getViewDefinition in interface Database
Throws:
JDBCException

getDatabaseType

public int getDatabaseType(int type)
Specified by:
getDatabaseType in interface Database

getDatabaseProductName

public java.lang.String getDatabaseProductName(java.sql.Connection conn)
                                        throws JDBCException
Specified by:
getDatabaseProductName in interface Database
Throws:
JDBCException

getBooleanType

public java.lang.String getBooleanType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "boolean" column.

Specified by:
getBooleanType in interface Database

getCurrencyType

public java.lang.String getCurrencyType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "currency" column.

Specified by:
getCurrencyType in interface Database

getUUIDType

public java.lang.String getUUIDType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "UUID" column.

Specified by:
getUUIDType in interface Database

getCharType

public java.lang.String getCharType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "char" column.

Specified by:
getCharType in interface Database

getVarcharType

public java.lang.String getVarcharType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "varchar" column.

Specified by:
getVarcharType in interface Database

getClobType

public java.lang.String getClobType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "CLOB" column.

Specified by:
getClobType in interface Database

getBlobType

public java.lang.String getBlobType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "BLOB" column.

Specified by:
getBlobType in interface Database

getDateType

public java.lang.String getDateType()
Specified by:
getDateType in interface Database

getDateTimeType

public java.lang.String getDateTimeType()
Description copied from interface: Database
Returns the actual database-specific data type to use a "datetime" column.

Specified by:
getDateTimeType in interface Database

getTimeType

public java.lang.String getTimeType()
Specified by:
getTimeType in interface Database

getBigIntType

public java.lang.String getBigIntType()
Specified by:
getBigIntType in interface Database

getFloatType

public java.lang.String getFloatType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "float" column.

Specified by:
getFloatType in interface Database
Returns:
database-specific type for float

getDoubleType

public java.lang.String getDoubleType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "double" column.

Specified by:
getDoubleType in interface Database
Returns:
database-specific type for double

getIntType

public java.lang.String getIntType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "int" column.

Specified by:
getIntType in interface Database
Returns:
database-specific type for int

getTinyIntType

public java.lang.String getTinyIntType()
Description copied from interface: Database
Returns the actual database-specific data type to use for a "tinyint" column.

Specified by:
getTinyIntType in interface Database
Returns:
database-specific type for tinyint

convertDatabaseValueToJavaObject

public java.lang.Object convertDatabaseValueToJavaObject(java.lang.Object defaultValue,
                                                         int dataType,
                                                         int columnSize,
                                                         int decimalDigits)
                                                  throws java.text.ParseException
Specified by:
convertDatabaseValueToJavaObject in interface Database
Throws:
java.text.ParseException

convertJavaObjectToString

public java.lang.String convertJavaObjectToString(java.lang.Object value)
Specified by:
convertJavaObjectToString in interface Database

isSystemView

public boolean isSystemView(java.lang.String catalogName,
                            java.lang.String schemaName,
                            java.lang.String name)
Specified by:
isSystemView in interface Database

getDateLiteral

public java.lang.String getDateLiteral(java.sql.Date date)
Specified by:
getDateLiteral in interface Database

getDateLiteral

public java.lang.String getDateLiteral(java.sql.Time time)
Specified by:
getDateLiteral in interface Database

getDateLiteral

public java.lang.String getDateLiteral(java.sql.Timestamp timeStamp)
Specified by:
getDateLiteral in interface Database

getDateLiteral

public java.lang.String getDateLiteral(java.util.Date defaultDateValue)
Specified by:
getDateLiteral in interface Database

escapeTableName

public java.lang.String escapeTableName(java.lang.String schemaName,
                                        java.lang.String tableName)
Description copied from interface: Database
Escapes the table name in a database-dependent manner so reserved words can be used as a table name (i.e. "order"). Currently only escapes MS-SQL because other DBMSs store table names case-sensitively when escaping is used which could confuse end-users. Pass null to schemaName to use the default schema

Specified by:
escapeTableName in interface Database

escapeIndexName

public java.lang.String escapeIndexName(java.lang.String schemaName,
                                        java.lang.String indexName)
Specified by:
escapeIndexName in interface Database

escapeColumnName

public java.lang.String escapeColumnName(java.lang.String schemaName,
                                         java.lang.String tableName,
                                         java.lang.String columnName)
Description copied from interface: Database
Escapes a single column name in a database-dependent manner so reserved words can be used as a column name (i.e. "return").

Specified by:
escapeColumnName in interface Database
columnName - column name
Returns:
escaped column name

escapeColumnNameList

public java.lang.String escapeColumnNameList(java.lang.String columnNames)
Description copied from interface: Database
Escapes a list of column names in a database-dependent manner so reserved words can be used as a column name (i.e. "return").

Specified by:
escapeColumnNameList in interface Database
Parameters:
columnNames - list of column names
Returns:
escaped column name list

convertRequestedSchemaToSchema

public java.lang.String convertRequestedSchemaToSchema(java.lang.String requestedSchema)
                                                throws JDBCException
Specified by:
convertRequestedSchemaToSchema in interface Database
Throws:
JDBCException

convertRequestedSchemaToCatalog

public java.lang.String convertRequestedSchemaToCatalog(java.lang.String requestedSchema)
                                                 throws JDBCException
Specified by:
convertRequestedSchemaToCatalog in interface Database
Throws:
JDBCException

supportsSchemas

public boolean supportsSchemas()
Specified by:
supportsSchemas in interface Database

generatePrimaryKeyName

public java.lang.String generatePrimaryKeyName(java.lang.String tableName)
Specified by:
generatePrimaryKeyName in interface Database

escapeSequenceName

public java.lang.String escapeSequenceName(java.lang.String schemaName,
                                           java.lang.String sequenceName)
Specified by:
escapeSequenceName in interface Database

escapeViewName

public java.lang.String escapeViewName(java.lang.String schemaName,
                                       java.lang.String viewName)
Specified by:
escapeViewName in interface Database

isColumnAutoIncrement

public boolean isColumnAutoIncrement(java.lang.String schemaName,
                                     java.lang.String tableName,
                                     java.lang.String columnName)
                              throws java.sql.SQLException,
                                     JDBCException
Specified by:
isColumnAutoIncrement in interface Database
Throws:
java.sql.SQLException
JDBCException

getRunStatus

public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet)
                                 throws JDBCException,
                                        DatabaseHistoryException
Specified by:
getRunStatus in interface Database
Throws:
JDBCException
DatabaseHistoryException

getRanChangeSet

public RanChangeSet getRanChangeSet(ChangeSet changeSet)
                             throws JDBCException,
                                    DatabaseHistoryException
Specified by:
getRanChangeSet in interface Database
Throws:
JDBCException
DatabaseHistoryException

markChangeSetAsRan

public void markChangeSetAsRan(ChangeSet changeSet)
                        throws JDBCException
Specified by:
markChangeSetAsRan in interface Database
Throws:
JDBCException

markChangeSetAsReRan

public void markChangeSetAsReRan(ChangeSet changeSet)
                          throws JDBCException
Specified by:
markChangeSetAsReRan in interface Database
Throws:
JDBCException

getRanChangeSetList

public java.util.List<RanChangeSet> getRanChangeSetList()
                                                 throws JDBCException
Specified by:
getRanChangeSetList in interface Database
Throws:
JDBCException

getRanDate

public java.util.Date getRanDate(ChangeSet changeSet)
                          throws JDBCException,
                                 DatabaseHistoryException
Specified by:
getRanDate in interface Database
Throws:
JDBCException
DatabaseHistoryException

removeRanStatus

public void removeRanStatus(ChangeSet changeSet)
                     throws JDBCException
Specified by:
removeRanStatus in interface Database
Throws:
JDBCException

commit

public void commit()
            throws JDBCException
Specified by:
commit in interface Database
Throws:
JDBCException

rollback

public void rollback()
              throws JDBCException
Specified by:
rollback in interface Database
Throws:
JDBCException

getSelectChangeLogLockSQL

public SqlStatement getSelectChangeLogLockSQL()
                                       throws JDBCException
Specified by:
getSelectChangeLogLockSQL in interface Database
Throws:
JDBCException

getJdbcTemplate

public JdbcTemplate getJdbcTemplate()
Specified by:
getJdbcTemplate in interface Database

setJdbcTemplate

public void setJdbcTemplate(JdbcTemplate template)
Specified by:
setJdbcTemplate in interface Database

escapeStringForDatabase

public java.lang.String escapeStringForDatabase(java.lang.String string)
Specified by:
escapeStringForDatabase in interface Database

close

public void close()
           throws JDBCException
Specified by:
close in interface Database
Throws:
JDBCException

createConfiguration

public org.hibernate.cfg.Configuration createConfiguration()

supportsRestrictForeignKeys

public boolean supportsRestrictForeignKeys()
Specified by:
supportsRestrictForeignKeys in interface Database

escapeConstraintName

public java.lang.String escapeConstraintName(java.lang.String constraintName)
Specified by:
escapeConstraintName in interface Database

isLocalDatabase

public boolean isLocalDatabase()
                        throws JDBCException
As the connectionURL for Hibernate refers to a config file, just return false

Specified by:
isLocalDatabase in interface Database
Throws:
JDBCException