public class OraclePlatform extends DatabasePlatform
Purpose: Provides Oracle specific behaviour.
Responsibilities:
classTypes, cursorCode, fieldTypes, shouldBindAllParameters, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, supportsAutoCommit, transactionIsolation, usesByteArrayBinding, usesNativeSQL, usesStreamsForBinding, usesStringBindingconversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, platformOperators, sequences, tableQualifier, timestampQuery| Constructor and Description |
|---|
OraclePlatform() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsSizeInProcedureArguments()
INTERNAL:
Used for sp defs.
|
protected void |
appendByteArray(byte[] bytes,
java.io.Writer writer)
INTERNAL:
If using native SQL then print a byte[] literally as a hex string otherwise use ODBC format
as provided in DatabasePlatform.
|
protected void |
appendCalendar(java.util.Calendar calendar,
java.io.Writer writer)
INTERNAL:
Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
|
protected void |
appendDate(java.sql.Date date,
java.io.Writer writer)
INTERNAL:
Appends an Oracle specific date if usesNativeSQL is true otherwise use the ODBC format.
|
protected void |
appendTime(java.sql.Time time,
java.io.Writer writer)
INTERNAL:
Appends an Oracle specific time if usesNativeSQL is true otherwise use the ODBC format.
|
protected void |
appendTimestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
INTERNAL:
Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.
|
ExpressionOperator |
atan2Operator()
INTERNAL:
Build operator.
|
DatabaseCall |
buildCallWithReturning(SQLCall sqlCall,
java.util.Vector returnFields)
INTERNAL
Returns null unless the platform supports call with returning
|
protected java.util.Hashtable |
buildClassTypes()
Return the mapping of class types to database types for the schema framework.
|
protected java.util.Hashtable |
buildFieldTypes()
Return the mapping of class types to database types for the schema framework.
|
ValueReadQuery |
buildSelectQueryForNativeSequence(java.lang.String seqName,
java.lang.Integer size)
INTERNAL:
Produce a DataReadQuery which updates(!) the sequence number in the db
and returns it.
|
boolean |
canBuildCallWithReturning()
INTERNAL
Indicates whether the platform can build call with returning.
|
protected ExpressionOperator |
currentDateOperator() |
protected ExpressionOperator |
currentTimeOperator() |
java.lang.String |
getAssignmentString()
INTERNAL
Used for stored function calls.
|
java.lang.String |
getBatchBeginString()
INTERNAL:
Used for batch writing and sp defs.
|
java.lang.String |
getBatchEndString()
INTERNAL:
Used for batch writing and sp defs.
|
java.lang.String |
getJDBCOuterJoinString()
Returns the JDBC outer join operator for SELECT statements.
|
int |
getMaxFieldNameSize()
INTERNAL:
returns the maximum number of characters that can be used in a field
name on this platform.
|
java.util.Vector |
getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
INTERNAL:
Return the catalog information through using the native SQL catalog selects.
|
java.lang.Object |
getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type)
INTERNAL:
Get a timestamp value from a result set.
|
java.lang.String |
getProcedureArgumentSetter()
INTERNAL:
Used for sp calls.
|
java.lang.String |
getProcedureCallHeader()
INTERNAL:
Used for sp calls.
|
java.lang.String |
getProcedureCallTail()
INTERNAL:
Used for sp calls.
|
protected java.lang.String |
getQualifiedSequenceName(java.lang.String seqName)
INTERNAL:
Prepend sequence name with table qualifier (if any)
|
java.lang.String |
getSelectForUpdateString()
INTERNAL:
|
java.lang.String |
getStoredProcedureParameterPrefix()
INTERNAL:
|
java.lang.String |
getStoredProcedureTerminationToken()
INTERNAL:
|
ValueReadQuery |
getSystemChangeNumberQuery()
INTERNAL:
The query to select the current system change number
from Oracle.
|
ValueReadQuery |
getTimestampQuery()
INTERNAL:
This method returns the query to select the timestamp
from the server for Oracle.
|
protected void |
initializePlatformOperators()
INTERNAL:
Initialize any platform-specific operators
|
boolean |
isOracle() |
protected ExpressionOperator |
logOperator()
INTERNAL:
Create the log operator for this platform
|
java.util.Hashtable |
maximumNumericValues()
INTERNAL:
Builds a table of maximum numeric values keyed on java class.
|
java.util.Hashtable |
minimumNumericValues()
INTERNAL:
Builds a table of minimum numeric values keyed on java class.
|
protected ExpressionOperator |
operatorLocate()
INTERNAL:
Override the default locate operator
|
protected ExpressionOperator |
operatorLocate2()
INTERNAL:
Override the default locate operator
|
protected ExpressionOperator |
operatorOuterJoin()
INTERNAL:
Create the outer join operator for this platform
|
void |
printFieldNullClause(java.io.Writer writer)
INTERNAL:
Append the receiver's field 'NULL' constraint clause to a writer.
|
java.lang.String |
serverTimestampString()
INTERNAL:
Return the current date and time from the server.
|
void |
setPrimitiveParameterValue(java.sql.PreparedStatement statement,
int index,
java.lang.Object parameter)
INTERNAL:
Set a primitive parameter.
|
boolean |
shouldPrintOuterJoinInWhereClause()
INTERNAL:
Some database require outer joins to be given in the where clause, others require it in the from clause.
|
boolean |
shouldUseJDBCOuterJoinSyntax()
INTERNAL:
JDBC defines and outer join syntax, many drivers do not support this.
|
boolean |
supportsNativeSequenceNumbers()
INTERNAL:
Return true if the receiver uses host sequence numbers, generated on the database.
|
boolean |
supportsSelectForUpdateNoWait()
INTERNAL:
Returns true if the database supports SQL syntax not to wait on a SELECT..FOR UPADTE
(i.e.
|
boolean |
supportsStoredFunctions()
INTERNAL:
|
protected ExpressionOperator |
todayOperator()
INTERNAL:
Create the sysdate operator for this platform
|
appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildSelectQueryForNativeSequence, commitTransaction, convertToDatabaseType, copyInto, createPlatformDefaultSequence, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, getBatchDelimiterString, getClassTypes, getConstraintDeletionString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getInOutputProcedureToken, getJDBCType, getJDBCType, getJdbcTypeName, getMaxForeignKeyNameSize, getMaxUniqueKeyNameSize, getOutputProcedureToken, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedSequenceTableName, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getTempTableForTable, getTransactionIsolation, isInformixOuterJoin, isNullAllowedInSelectClause, printFieldIdentityClause, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printValuelist, printValuelist, processResultSet, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTypeNameToRegisterOutputParameter, rollbackTransaction, setClassTypes, setCursorCode, setFieldTypes, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTransactionIsolation, setUsesByteArrayBinding, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAcquireSequenceValueAfterInsert, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldNativeSequenceAcquireValueAfterInsert, shouldNativeSequenceUseTransaction, shouldOptimizeDataConversion, shouldPrintConstraintNameAfter, shouldPrintInOutputTokenBeforeType, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, supportsAutoCommit, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsLocalTempTables, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueKeyConstraints, usesByteArrayBinding, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeLOB, writeParameterMarker, writeUpdateOriginalFromTempTableSqladdOperator, addSequence, clone, convertObject, createSequences, getConversionManager, getCustomModifyValueForCall, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultSequence, getDefaultSequenceToWrite, getOperator, getPlatformOperators, getSequence, getSequences, getSequencesToWrite, getTableQualifier, getTimestampFromServer, hasDefaultSequence, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isHSQL, isInformix, isMySQL, isODBC, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isTimesTen, platformSpecificSequencingInitialization, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setSequences, setTableQualifier, setTimestampQuery, shouldUseCustomModifyForCall, toString, usesPlatformDefaultSequencepublic boolean allowsSizeInProcedureArguments()
allowsSizeInProcedureArguments in class DatabasePlatformprotected void appendByteArray(byte[] bytes,
java.io.Writer writer)
throws java.io.IOException
appendByteArray in class DatabasePlatformjava.io.IOExceptionprotected void appendDate(java.sql.Date date,
java.io.Writer writer)
throws java.io.IOException
appendDate in class DatabasePlatformjava.io.IOExceptionprotected void appendTime(java.sql.Time time,
java.io.Writer writer)
throws java.io.IOException
appendTime in class DatabasePlatformjava.io.IOExceptionprotected void appendTimestamp(java.sql.Timestamp timestamp,
java.io.Writer writer)
throws java.io.IOException
appendTimestamp in class DatabasePlatformjava.io.IOExceptionprotected void appendCalendar(java.util.Calendar calendar,
java.io.Writer writer)
throws java.io.IOException
appendCalendar in class DatabasePlatformjava.io.IOExceptionpublic ExpressionOperator atan2Operator()
protected java.util.Hashtable buildFieldTypes()
DatabasePlatformbuildFieldTypes in class DatabasePlatformprotected java.util.Hashtable buildClassTypes()
buildClassTypes in class DatabasePlatformpublic DatabaseCall buildCallWithReturning(SQLCall sqlCall, java.util.Vector returnFields)
buildCallWithReturning in class DatabasePlatformpublic boolean canBuildCallWithReturning()
canBuildCallWithReturning in class DatabasePlatformpublic java.lang.String getAssignmentString()
getAssignmentString in class DatabasePlatformpublic java.lang.String getBatchBeginString()
getBatchBeginString in class DatabasePlatformpublic java.lang.String getBatchEndString()
getBatchEndString in class DatabasePlatformpublic java.lang.String getJDBCOuterJoinString()
getJDBCOuterJoinString in class DatabasePlatformpublic int getMaxFieldNameSize()
getMaxFieldNameSize in class DatabasePlatformpublic java.util.Vector getNativeTableInfo(java.lang.String table,
java.lang.String creator,
AbstractSession session)
public java.lang.String getProcedureArgumentSetter()
getProcedureArgumentSetter in class DatabasePlatformpublic java.lang.String getProcedureCallHeader()
getProcedureCallHeader in class DatabasePlatformpublic java.lang.String getProcedureCallTail()
getProcedureCallTail in class DatabasePlatformpublic java.lang.String getSelectForUpdateString()
getSelectForUpdateString in class DatabasePlatformpublic java.lang.String getStoredProcedureParameterPrefix()
getStoredProcedureParameterPrefix in class DatabasePlatformpublic java.lang.String getStoredProcedureTerminationToken()
getStoredProcedureTerminationToken in class DatabasePlatformpublic ValueReadQuery getSystemChangeNumberQuery()
public ValueReadQuery getTimestampQuery()
getTimestampQuery in interface PlatformgetTimestampQuery in class DatasourcePlatformpublic java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type)
throws java.sql.SQLException
getObjectFromResultSet in class DatabasePlatformjava.sql.SQLExceptionoracle.toplink.essentials.oraclespecific.Oracle9Platformprotected void initializePlatformOperators()
initializePlatformOperators in class DatasourcePlatformpublic boolean isOracle()
isOracle in interface PlatformisOracle in class DatasourcePlatformprotected ExpressionOperator logOperator()
public java.util.Hashtable maximumNumericValues()
NOTE: BigInteger & BigDecimal maximums are dependent upon their precision & Scale
maximumNumericValues in class DatabasePlatformpublic java.util.Hashtable minimumNumericValues()
NOTE: BigInteger & BigDecimal minimums are dependent upon their precision & Scale
minimumNumericValues in class DatabasePlatformpublic ValueReadQuery buildSelectQueryForNativeSequence(java.lang.String seqName, java.lang.Integer size)
buildSelectQueryForNativeSequence in class DatabasePlatformsequenceName - Name known by Oracle to be a defined sequenceprotected java.lang.String getQualifiedSequenceName(java.lang.String seqName)
protected ExpressionOperator operatorOuterJoin()
protected ExpressionOperator operatorLocate()
protected ExpressionOperator operatorLocate2()
public void printFieldNullClause(java.io.Writer writer)
throws ValidationException
printFieldNullClause in class DatabasePlatformValidationExceptionpublic java.lang.String serverTimestampString()
public void setPrimitiveParameterValue(java.sql.PreparedStatement statement,
int index,
java.lang.Object parameter)
throws java.sql.SQLException
setPrimitiveParameterValue in class DatabasePlatformjava.sql.SQLExceptionpublic boolean shouldPrintOuterJoinInWhereClause()
shouldPrintOuterJoinInWhereClause in class DatabasePlatformpublic boolean shouldUseJDBCOuterJoinSyntax()
shouldUseJDBCOuterJoinSyntax in class DatabasePlatformpublic boolean supportsNativeSequenceNumbers()
supportsNativeSequenceNumbers in class DatabasePlatformpublic boolean supportsStoredFunctions()
supportsStoredFunctions in class DatabasePlatformpublic boolean supportsSelectForUpdateNoWait()
protected ExpressionOperator todayOperator()
protected ExpressionOperator currentDateOperator()
protected ExpressionOperator currentTimeOperator()