EclipseLink 2.4.0, build 'v20120608-r11652' API Reference

org.eclipse.persistence.platform.database.oracle
Class Oracle9Platform

java.lang.Object
  extended by org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
      extended by org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
          extended by org.eclipse.persistence.platform.database.DatabasePlatform
              extended by org.eclipse.persistence.platform.database.OraclePlatform
                  extended by org.eclipse.persistence.platform.database.oracle.Oracle8Platform
                      extended by org.eclipse.persistence.platform.database.oracle.Oracle9Platform
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.internal.databaseaccess.Platform
Direct Known Subclasses:
Oracle10Platform

public class Oracle9Platform
extends Oracle8Platform

Purpose: Supports usage of certain Oracle JDBC specific APIs.

Supports binding NCHAR, NVARCHAR, NCLOB types as required by Oracle JDBC drivers.

Supports Oracle JDBC TIMESTAMP, TIMESTAMPTZ, TIMESTAMPLTZ types.

See Also:
Serialized Form

Nested Class Summary
protected static class Oracle9Platform.NTypeBindCallCustomParameter
          INTERNAL: This class used for binding of NCHAR, NSTRING, NCLOB types.
 
Field Summary
protected  java.lang.String driverVersion
           
protected  boolean isConnectionDataInitialized
           
protected  boolean isLtzTimestampInGmt
           
protected  boolean isTimestampInGmt
           
static java.lang.Class NCHAR
           
static java.lang.Class NCLOB
           
static java.lang.Class NSTRING
           
protected  boolean shouldPrintCalendar
           
static java.lang.Class XMLTYPE
           
 
Fields inherited from class org.eclipse.persistence.platform.database.oracle.Oracle8Platform
lobValueLimits, usesLocatorForLOBWrite
 
Fields inherited from class org.eclipse.persistence.platform.database.OraclePlatform
END_FROM, FROM, HINT, MAX_ROW, MIN_ROW, SELECT, supportsIdentity, vpdClearIdentifierQuery, vpdSetIdentifierQuery
 
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, Types_NCLOB, Types_SQLXML, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
 
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, tableQualifier, timestampQuery
 
Constructor Summary
Oracle9Platform()
           
 
Method Summary
 int addBatch(java.sql.PreparedStatement statement)
          INTERNAL: This gets called on each iteration to add parameters to the batch Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes (if useNativeBatchWriting is enabled, and the call uses optimistic locking).
protected  void appendCalendar(java.util.Calendar calendar, java.io.Writer writer)
          INTERNAL: Appends an Oracle specific Timestamp with timezone and daylight time elements 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.
protected  java.util.Map<java.lang.String,java.lang.Class> buildClassTypes()
          INTERNAL: Add TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE
protected  java.util.Hashtable buildFieldTypes()
          INTERNAL: Add XMLType as the default database type for org.w3c.dom.Documents.
protected  java.util.Vector buildFromStringCharVec(java.lang.Class javaClass)
           
protected  java.util.Vector buildToNClobVec()
           
protected  java.util.Vector buildToNStringCharVec()
           
protected  java.util.Vector buildToTIMESTAMPVec()
           
 boolean canUnwrapOracleConnection()
          INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.
 void clearConnectionData()
           
 void clearOracleConnectionCache(java.sql.Connection conn)
          INTERNAL: Clears both implicit and explicit caches of OracleConnection
 java.lang.Object clone()
           
 java.lang.Object convertObject(java.lang.Object sourceObject, java.lang.Class javaClass)
          INTERNAL: Allow for conversion from the Oracle type to the Java type.
 org.eclipse.persistence.internal.databaseaccess.ConnectionCustomizer createConnectionCustomizer(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL:
 int executeBatch(java.sql.Statement statement, boolean isStatementPrepared)
          INTERNAL: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes (if useNativeBatchWriting is enabled, and the call uses optimistic locking).
 java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, org.eclipse.persistence.internal.helper.DatabaseField field, boolean shouldBind)
          INTERNAL: Used by SQLCall.translate(..)
 java.util.Vector getDataTypesConvertedFrom(java.lang.Class javaClass)
          INTERNAL: Return the list of Classes that can be converted to from the passed in javaClass.
 java.util.Vector getDataTypesConvertedTo(java.lang.Class javaClass)
          INTERNAL: Return the list of Classes that can be converted from to the passed in javaClass.
 java.lang.String getDriverVersion()
          INTERNAL: Return the driver version.
 int getJDBCType(java.lang.Class javaType)
          Return the JDBC type for the Java type.
 int getJDBCType(org.eclipse.persistence.internal.helper.DatabaseField field)
          Return the JDBC type for the given database field.
 int getLobValueLimits()
          PUBLIC: Return the BLOB/CLOB value limits on thin driver.
 java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Get a timestamp value from a result set.
 java.sql.Timestamp getTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.String sessionName)
          INTERNAL: Answer the timestamp from the server.
 java.lang.Object getTIMESTAMPLTZFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Get a TIMESTAMPLTZ value from a result set.
 ValueReadQuery getTimestampQuery()
          INTERNAL: This method returns the query to select the SYSTIMESTAMP as TIMESTAMPTZ from the server for Oracle9i.
 java.lang.Object getTIMESTAMPTZFromResultSet(java.sql.ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Get a TIMESTAMPTZ value from a result set.
protected  org.eclipse.persistence.internal.platform.database.oracle.XMLTypeFactory getXMLTypeFactory()
          INTERNAL: Lazy initialization of xmlTypeFactory allows to avoid loading xdb-dependent class XMLTypeFactoryImpl unless xdb is used.
 void initializeConnectionData(java.sql.Connection connection)
          INTERNAL:
protected  void initializePlatformOperators()
          INTERNAL: Allow the use of XMLType operators on this platform.
protected  boolean isClob(java.lang.Class type)
          INTERNAL: Used in write LOB method only to identify a CLOB.
 boolean isLtzTimestampInGmt()
          INTERNAL: Return if ltz timestamps are returned in GMT by the driver.
 boolean isOracle9()
          PUBLIC: Return is this is the Oracle 9 platform.
protected  boolean isOracle9Specific(java.lang.Class type)
          INTERNAL: Return if the type is a special oracle type.
 boolean isTimestampInGmt()
          INTERNAL: Return if timestamps are returned in GMT by the driver.
 boolean isXDBDocument(java.lang.Object obj)
          INTERNAL: Indicates whether the passed object is an instance of XDBDocument.
 java.sql.Statement prepareBatchStatement(java.sql.Statement statement, int maxBatchWritingSize)
          INTERNAL: Allows setting the batch size on the statement Is used with parameterized SQL, and should only be passed in prepared statements
 java.lang.String serverTimestampString()
          INTERNAL: Return the current SYSTIMESTAMP as TIMESTAMPTZ from the server.
 void setLobValueLimits(int lobValueLimits)
          PUBLIC: Set the BLOB/CLOB value limits on thin driver.
 void setParameterValueInDatabaseCall(java.lang.Object parameter, java.sql.PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Note that index (not index+1) is used in statement.setObject(index, parameter) Binding starts with a 1 not 0, so make sure that index > 0.
 boolean shouldUseCustomModifyForCall(org.eclipse.persistence.internal.helper.DatabaseField field)
          INTERNAL Used by SQLCall.appendModify(..)
 java.sql.Connection unwrapOracleConnection(java.sql.Connection connection)
          INTERNAL: If can unwrap returns unwrapped Oracle connection, otherwise original connection.
 
Methods inherited from class org.eclipse.persistence.platform.database.oracle.Oracle8Platform
copyInto, createArray, createStruct, freeTemporaryObject, getConnection, getRefValue, isBlob, isNativeConnectionRequiredForLobLocator, lobValueExceedsLimit, setShouldUseLocatorForLOBWrite, shouldUseLocatorForLOBWrite, writeLOB
 
Methods inherited from class org.eclipse.persistence.platform.database.OraclePlatform
allowsSizeInProcedureArguments, appendByteArray, appendDate, appendTime, atan2Operator, buildCallWithReturning, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, canBuildCallWithReturning, currentDateOperator, currentTimeOperator, exceptOperator, getAssignmentString, getBatchBeginString, getBatchEndString, getDeclareBeginString, getMaxFieldNameSize, getNativeTableInfo, getProcedureArgumentSetter, getProcedureCallHeader, getProcedureCallTail, getSelectForUpdateString, getSelectForUpdateWaitString, getStoredProcedureParameterPrefix, getStoredProcedureTerminationToken, getSystemChangeNumberQuery, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, isAlterSequenceObjectSupported, isForUpdateCompatibleWithDistinct, isLockTimeoutException, isOracle, logOperator, maximumNumericValues, minimumNumericValues, operatorLocate, operatorLocate2, operatorOuterJoin, printFieldNullClause, printSQLSelectStatement, regexpOperator, setSupportsIdentity, shouldUseJDBCOuterJoinSyntax, supportsAutoConversionToNumericForArithmeticOperations, supportsIdentity, supportsSelectForUpdateNoWait, supportsSequenceObjects, supportsStoredFunctions, supportsVPD, todayOperator, wasFailureCommunicationBased
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addStructConverter, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, createArray, createPlatformDefaultSequence, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, getBatchDelimiterString, getCastSizeForVarcharParameter, getClassTypes, getConstraintDeletionString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getDefaultSequenceTableName, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, hasPartitioningCallback, initialize, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isNullAllowedInSelectClause, minimumTimeIncrement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureArgumentNameInCall, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAutoAssignmentSetClause, writeAutoJoinWhereClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeFields, writeFieldsAutoClause, writeFieldsList, writeInsertIntoTableSql, writeJoinWhereClause, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSql
 
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addOperator, addSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, getConversionManager, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequence
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NCHAR

public static final java.lang.Class NCHAR

NSTRING

public static final java.lang.Class NSTRING

NCLOB

public static final java.lang.Class NCLOB

XMLTYPE

public static final java.lang.Class XMLTYPE

driverVersion

protected transient java.lang.String driverVersion

shouldPrintCalendar

protected transient boolean shouldPrintCalendar

isTimestampInGmt

protected transient boolean isTimestampInGmt

isLtzTimestampInGmt

protected transient boolean isLtzTimestampInGmt

isConnectionDataInitialized

protected transient boolean isConnectionDataInitialized
Constructor Detail

Oracle9Platform

public Oracle9Platform()
Method Detail

getObjectFromResultSet

public java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet,
                                               int columnNumber,
                                               int type,
                                               org.eclipse.persistence.internal.sessions.AbstractSession session)
                                        throws java.sql.SQLException
INTERNAL: Get a timestamp value from a result set. Overrides the default behavior to specifically return a timestamp. Added to overcome an issue with the oracle 9.0.1.4 JDBC driver.

Overrides:
getObjectFromResultSet in class OraclePlatform
Throws:
java.sql.SQLException

getTIMESTAMPTZFromResultSet

public java.lang.Object getTIMESTAMPTZFromResultSet(java.sql.ResultSet resultSet,
                                                    int columnNumber,
                                                    int type,
                                                    org.eclipse.persistence.internal.sessions.AbstractSession session)
                                             throws java.sql.SQLException
INTERNAL: Get a TIMESTAMPTZ value from a result set.

Throws:
java.sql.SQLException

getTIMESTAMPLTZFromResultSet

public java.lang.Object getTIMESTAMPLTZFromResultSet(java.sql.ResultSet resultSet,
                                                     int columnNumber,
                                                     int type,
                                                     org.eclipse.persistence.internal.sessions.AbstractSession session)
                                              throws java.sql.SQLException
INTERNAL: Get a TIMESTAMPLTZ value from a result set.

Throws:
java.sql.SQLException

shouldUseCustomModifyForCall

public boolean shouldUseCustomModifyForCall(org.eclipse.persistence.internal.helper.DatabaseField field)
INTERNAL Used by SQLCall.appendModify(..) If the field should be passed to customModifyInDatabaseCall, retun true, otherwise false. Methods shouldCustomModifyInDatabaseCall and customModifyInDatabaseCall should be kept in sync: shouldCustomModifyInDatabaseCall should return true if and only if the field is handled by customModifyInDatabaseCall.

Specified by:
shouldUseCustomModifyForCall in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
shouldUseCustomModifyForCall in class Oracle8Platform

initializePlatformOperators

protected void initializePlatformOperators()
INTERNAL: Allow the use of XMLType operators on this platform.

Overrides:
initializePlatformOperators in class OraclePlatform

buildFieldTypes

protected java.util.Hashtable buildFieldTypes()
INTERNAL: Add XMLType as the default database type for org.w3c.dom.Documents. Add TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE

Overrides:
buildFieldTypes in class Oracle8Platform

buildClassTypes

protected java.util.Map<java.lang.String,java.lang.Class> buildClassTypes()
INTERNAL: Add TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE

Overrides:
buildClassTypes in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

clone

public java.lang.Object clone()
Specified by:
clone in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
clone in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

convertObject

public java.lang.Object convertObject(java.lang.Object sourceObject,
                                      java.lang.Class javaClass)
                               throws ConversionException,
                                      DatabaseException
INTERNAL: Allow for conversion from the Oracle type to the Java type.

Specified by:
convertObject in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
convertObject in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
Throws:
ConversionException
DatabaseException

appendTimestamp

protected void appendTimestamp(java.sql.Timestamp timestamp,
                               java.io.Writer writer)
                        throws java.io.IOException
INTERNAL: Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format. Native Format: to_timestamp ('1997-11-06 10:35:45.656' , 'yyyy-mm-dd hh:mm:ss.ff')

Overrides:
appendTimestamp in class OraclePlatform
Throws:
java.io.IOException

appendCalendar

protected void appendCalendar(java.util.Calendar calendar,
                              java.io.Writer writer)
                       throws java.io.IOException
INTERNAL: Appends an Oracle specific Timestamp with timezone and daylight time elements if usesNativeSQL is true, otherwise use the ODBC format. Native Format: (DST) to_timestamp_tz ('1997-11-06 10:35:45.345 America/Los_Angeles','yyyy-mm-dd hh:mm:ss.ff TZR TZD') (non-DST) to_timestamp_tz ('1997-11-06 10:35:45.345 America/Los_Angeles','yyyy-mm-dd hh:mm:ss.ff TZR')

Overrides:
appendCalendar in class OraclePlatform
Throws:
java.io.IOException

initializeConnectionData

public void initializeConnectionData(java.sql.Connection connection)
                              throws java.sql.SQLException
INTERNAL:

Overrides:
initializeConnectionData in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.sql.SQLException

clearConnectionData

public void clearConnectionData()

clearOracleConnectionCache

public void clearOracleConnectionCache(java.sql.Connection conn)
INTERNAL: Clears both implicit and explicit caches of OracleConnection

Overrides:
clearOracleConnectionCache in class OraclePlatform

setParameterValueInDatabaseCall

public void setParameterValueInDatabaseCall(java.lang.Object parameter,
                                            java.sql.PreparedStatement statement,
                                            int index,
                                            org.eclipse.persistence.internal.sessions.AbstractSession session)
                                     throws java.sql.SQLException
INTERNAL: Note that index (not index+1) is used in statement.setObject(index, parameter) Binding starts with a 1 not 0, so make sure that index > 0. Treat Calendar separately. Bind Calendar as TIMESTAMPTZ.

Overrides:
setParameterValueInDatabaseCall in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Throws:
java.sql.SQLException

getTimestampFromServer

public java.sql.Timestamp getTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                 java.lang.String sessionName)
INTERNAL: Answer the timestamp from the server. Convert TIMESTAMPTZ to Timestamp

Specified by:
getTimestampFromServer in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
getTimestampFromServer in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

getTimestampQuery

public ValueReadQuery getTimestampQuery()
INTERNAL: This method returns the query to select the SYSTIMESTAMP as TIMESTAMPTZ from the server for Oracle9i.

Specified by:
getTimestampQuery in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
getTimestampQuery in class OraclePlatform

serverTimestampString

public java.lang.String serverTimestampString()
INTERNAL: Return the current SYSTIMESTAMP as TIMESTAMPTZ from the server.

Overrides:
serverTimestampString in class OraclePlatform

buildToTIMESTAMPVec

protected java.util.Vector buildToTIMESTAMPVec()

buildToNStringCharVec

protected java.util.Vector buildToNStringCharVec()

buildToNClobVec

protected java.util.Vector buildToNClobVec()

getLobValueLimits

public int getLobValueLimits()
PUBLIC: Return the BLOB/CLOB value limits on thin driver. The default value is 0. If usesLocatorForLOBWrite is true, locator will be used in case the lob's size is larger than lobValueLimit.

Overrides:
getLobValueLimits in class Oracle8Platform

setLobValueLimits

public void setLobValueLimits(int lobValueLimits)
PUBLIC: Set the BLOB/CLOB value limits on thin driver. The default value is 0. If usesLocatorForLOBWrite is true, locator will be used in case the lob's size is larger than lobValueLimit.

Overrides:
setLobValueLimits in class Oracle8Platform

isOracle9Specific

protected boolean isOracle9Specific(java.lang.Class type)
INTERNAL: Return if the type is a special oracle type. bug 3325122 - just checking against the 4 classes is faster than isAssignableFrom MWN.


isClob

protected boolean isClob(java.lang.Class type)
INTERNAL: Used in write LOB method only to identify a CLOB.

Overrides:
isClob in class Oracle8Platform

getCustomModifyValueForCall

public java.lang.Object getCustomModifyValueForCall(Call call,
                                                    java.lang.Object value,
                                                    org.eclipse.persistence.internal.helper.DatabaseField field,
                                                    boolean shouldBind)
INTERNAL: Used by SQLCall.translate(..) The binding *must* be performed (NCHAR, NSTRING, NCLOB). In these special cases the method returns a wrapper object which knows whether it should be bound or appended and knows how to do that.

Specified by:
getCustomModifyValueForCall in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
getCustomModifyValueForCall in class Oracle8Platform

buildFromStringCharVec

protected java.util.Vector buildFromStringCharVec(java.lang.Class javaClass)

getDataTypesConvertedFrom

public java.util.Vector getDataTypesConvertedFrom(java.lang.Class javaClass)
INTERNAL: Return the list of Classes that can be converted to from the passed in javaClass. oracle.sql.TIMESTAMP and NCHAR types are added in some lists.

Overrides:
getDataTypesConvertedFrom in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
Parameters:
javaClass - - the class that is converted from
Returns:
- a vector of classes

getDataTypesConvertedTo

public java.util.Vector getDataTypesConvertedTo(java.lang.Class javaClass)
INTERNAL: Return the list of Classes that can be converted from to the passed in javaClass. A list is added for oracle.sql.TIMESTAMP and NCHAR types.

Overrides:
getDataTypesConvertedTo in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
Parameters:
javaClass - - the class that is converted to
Returns:
- a vector of classes

getJDBCType

public int getJDBCType(org.eclipse.persistence.internal.helper.DatabaseField field)
Return the JDBC type for the given database field. The Oracle driver does not like the OPAQUE type so VARCHAR must be used.

Overrides:
getJDBCType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

getJDBCType

public int getJDBCType(java.lang.Class javaType)
Return the JDBC type for the Java type. The Oracle driver does not like the OPAQUE type so VARCHAR must be used.

Overrides:
getJDBCType in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

executeBatch

public int executeBatch(java.sql.Statement statement,
                        boolean isStatementPrepared)
                 throws java.sql.SQLException
INTERNAL: This gets called on each batch statement execution Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes (if useNativeBatchWriting is enabled, and the call uses optimistic locking).

Overrides:
executeBatch in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Parameters:
isStatementPrepared - - flag is set to true if this statement is prepared
Returns:
- number of rows modified/deleted by this statement
Throws:
java.sql.SQLException

addBatch

public int addBatch(java.sql.PreparedStatement statement)
             throws java.sql.SQLException
INTERNAL: This gets called on each iteration to add parameters to the batch Needs to be implemented so that it returns the number of rows successfully modified by this statement for optimistic locking purposes (if useNativeBatchWriting is enabled, and the call uses optimistic locking). Is used with parameterized SQL

Overrides:
addBatch in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
- number of rows modified/deleted by this statement if it was executed (0 if it wasn't)
Throws:
java.sql.SQLException

prepareBatchStatement

public java.sql.Statement prepareBatchStatement(java.sql.Statement statement,
                                                int maxBatchWritingSize)
                                         throws java.sql.SQLException
INTERNAL: Allows setting the batch size on the statement Is used with parameterized SQL, and should only be passed in prepared statements

Overrides:
prepareBatchStatement in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
- statement to be used for batch writing
Throws:
java.sql.SQLException

getXMLTypeFactory

protected org.eclipse.persistence.internal.platform.database.oracle.XMLTypeFactory getXMLTypeFactory()
INTERNAL: Lazy initialization of xmlTypeFactory allows to avoid loading xdb-dependent class XMLTypeFactoryImpl unless xdb is used.

Returns:
XMLTypeFactory

isXDBDocument

public boolean isXDBDocument(java.lang.Object obj)
INTERNAL: Indicates whether the passed object is an instance of XDBDocument.

Overrides:
isXDBDocument in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
Returns:
boolean

canUnwrapOracleConnection

public boolean canUnwrapOracleConnection()
INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.

Overrides:
canUnwrapOracleConnection in class OraclePlatform

unwrapOracleConnection

public java.sql.Connection unwrapOracleConnection(java.sql.Connection connection)
INTERNAL: If can unwrap returns unwrapped Oracle connection, otherwise original connection.

Overrides:
unwrapOracleConnection in class OraclePlatform

isOracle9

public boolean isOracle9()
PUBLIC: Return is this is the Oracle 9 platform.

Specified by:
isOracle9 in interface org.eclipse.persistence.internal.databaseaccess.Platform
Overrides:
isOracle9 in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

createConnectionCustomizer

public org.eclipse.persistence.internal.databaseaccess.ConnectionCustomizer createConnectionCustomizer(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
                                                                                                       org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:

Overrides:
createConnectionCustomizer in class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform

getDriverVersion

public java.lang.String getDriverVersion()
INTERNAL: Return the driver version.


isTimestampInGmt

public boolean isTimestampInGmt()
INTERNAL: Return if timestamps are returned in GMT by the driver.


isLtzTimestampInGmt

public boolean isLtzTimestampInGmt()
INTERNAL: Return if ltz timestamps are returned in GMT by the driver.


EclipseLink 2.4.0, build 'v20120608-r11652' API Reference