liquibase.database.core
Class OracleDatabase

java.lang.Object
  extended by liquibase.database.AbstractDatabase
      extended by liquibase.database.core.OracleDatabase
All Implemented Interfaces:
Database, DatabaseObject, PrioritizedService

public class OracleDatabase
extends AbstractDatabase

Encapsulates Oracle database support.


Field Summary
static java.lang.String PRODUCT_NAME
           
 
Fields inherited from class liquibase.database.AbstractDatabase
currentDateTimeFunction, databaseFunctions
 
Fields inherited from interface liquibase.servicelocator.PrioritizedService
PRIORITY_DATABASE, PRIORITY_DEFAULT
 
Constructor Summary
OracleDatabase()
           
 
Method Summary
 java.lang.String escapeDatabaseObject(java.lang.String objectName)
           
 java.lang.String escapeIndexName(java.lang.String schemaName, java.lang.String indexName)
           
 java.lang.String getCurrentDateTimeFunction()
          Returns database-specific function for generating the current date/time.
 java.lang.String getDateLiteral(java.lang.String isoDate)
          Return an Oracle date literal with the same value as a string formatted using ISO 8601.
protected  java.lang.String getDefaultDatabaseSchemaName()
           
 java.lang.String getDefaultDriver(java.lang.String url)
          If this database understands the given url, return the default driver class name.
 int getPriority()
           
 java.lang.String getTypeName()
          Returns an all-lower-case short name of the product.
 boolean isCorrectDatabaseImplementation(DatabaseConnection conn)
          Is this AbstractDatabase subclass the correct one to use for the given connection.
 boolean isReservedWord(java.lang.String objectName)
           
 boolean isSystemTable(java.lang.String catalogName, java.lang.String schemaName, java.lang.String tableName)
           
 void setConnection(DatabaseConnection conn)
           
 boolean shouldQuoteValue(java.lang.String value)
           
 boolean supportsAutoIncrement()
           
 boolean supportsInitiallyDeferrableColumns()
          Returns whether this database support initially deferrable columns.
 boolean supportsRestrictForeignKeys()
           
 boolean supportsSequences()
          Does the database type support sequence.
 boolean supportsTablespaces()
           
 
Methods inherited from class liquibase.database.AbstractDatabase
canCreateChangeLogTable, checkDatabaseChangeLogLockTable, checkDatabaseChangeLogTable, close, commit, convertRequestedSchemaToCatalog, convertRequestedSchemaToSchema, disableForeignKeyChecks, doesTagExist, dropDatabaseObjects, enableForeignKeyChecks, equals, escapeColumnName, escapeColumnNameList, escapeConstraintName, escapeSequenceName, escapeStringForDatabase, escapeTableName, escapeViewName, execute, executeRollbackStatements, executeStatements, generatePrimaryKeyName, getAutoCommitMode, getAutoIncrementClause, getConcatSql, getConnection, getContainingObjects, getDatabaseChangeLogLockTableName, getDatabaseChangeLogTableName, getDatabaseFunctions, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDateLiteral, getDateLiteral, getDateTimeLiteral, getDefaultCatalogName, getDefaultSchemaName, getLineComment, getLiquibaseSchemaName, getNextChangeSetSequenceValue, getRanChangeSet, getRanChangeSetList, getRanDate, getRunStatus, getSystemTablesAndViews, getTable, getTimeLiteral, getViewDefinition, hasDatabaseChangeLogLockTable, hasDatabaseChangeLogTable, hashCode, isAutoCommit, isDateOnly, isDateTime, isLiquibaseTable, isLocalDatabase, isSystemView, isTimeOnly, markChangeSetExecStatus, parseDate, removeRanStatus, requiresPassword, requiresUsername, reset, rollback, saveRollbackStatement, saveStatements, setAutoCommit, setCanCacheLiquibaseTableInfo, setCurrentDateTimeFunction, setDatabaseChangeLogLockTableName, setDatabaseChangeLogTableName, setDefaultSchemaName, supportsDDLInTransaction, supportsDropTableCascadeConstraints, supportsForeignKeyDisable, supportsSchemas, tag, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
See Also:
Constant Field Values
Constructor Detail

OracleDatabase

public OracleDatabase()
Method Detail

getPriority

public int getPriority()

setConnection

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

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.


supportsInitiallyDeferrableColumns

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


escapeDatabaseObject

public java.lang.String escapeDatabaseObject(java.lang.String objectName)
Specified by:
escapeDatabaseObject in interface Database
Overrides:
escapeDatabaseObject in class AbstractDatabase

isReservedWord

public boolean isReservedWord(java.lang.String objectName)
Specified by:
isReservedWord in interface Database
Overrides:
isReservedWord in class AbstractDatabase

supportsSequences

public boolean supportsSequences()
Description copied from class: AbstractDatabase
Does the database type support sequence.

Specified by:
supportsSequences in interface Database
Overrides:
supportsSequences in class AbstractDatabase

isCorrectDatabaseImplementation

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

Throws:
DatabaseException

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.


getCurrentDateTimeFunction

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


getDefaultDatabaseSchemaName

protected java.lang.String getDefaultDatabaseSchemaName()
                                                 throws DatabaseException
Overrides:
getDefaultDatabaseSchemaName in class AbstractDatabase
Throws:
DatabaseException

escapeIndexName

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

getDateLiteral

public java.lang.String getDateLiteral(java.lang.String isoDate)
Return an Oracle date literal with the same value as a string formatted using ISO 8601.

Convert an ISO8601 date string to one of the following results: to_date('1995-05-23', 'YYYY-MM-DD') to_date('1995-05-23 09:23:59', 'YYYY-MM-DD HH24:MI:SS')

Implementation restriction: Currently, only the following subsets of ISO8601 are supported: YYYY-MM-DD YYYY-MM-DDThh:mm:ss

Specified by:
getDateLiteral in interface Database
Overrides:
getDateLiteral in class AbstractDatabase

isSystemTable

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

shouldQuoteValue

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

supportsTablespaces

public boolean supportsTablespaces()

supportsAutoIncrement

public boolean supportsAutoIncrement()
Specified by:
supportsAutoIncrement in interface Database
Overrides:
supportsAutoIncrement in class AbstractDatabase

supportsRestrictForeignKeys

public boolean supportsRestrictForeignKeys()
Specified by:
supportsRestrictForeignKeys in interface Database
Overrides:
supportsRestrictForeignKeys in class AbstractDatabase


Copyright © 2010 Liquibase.org. All Rights Reserved.