Class Oracle9Platform
java.lang.Object
org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
org.eclipse.persistence.platform.database.DatabasePlatform
org.eclipse.persistence.platform.database.OraclePlatform
org.eclipse.persistence.platform.database.oracle.Oracle8Platform
org.eclipse.persistence.platform.database.oracle.Oracle9Platform
- All Implemented Interfaces:
Serializable
,Cloneable
,CorePlatform<ConversionManager>
,Platform
- Direct Known Subclasses:
Oracle10Platform
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
INTERNAL: This class used for binding of NCHAR, NSTRING, NCLOB types. -
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected boolean
protected boolean
protected boolean
static final Class
<NCharacter> protected boolean
protected boolean
Indicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement.static final Class
<XMLTypePlaceholder> Fields inherited from class org.eclipse.persistence.platform.database.oracle.Oracle8Platform
lobValueLimits, usesLocatorForLOBWrite
Fields inherited from class org.eclipse.persistence.platform.database.OraclePlatform
BRACKET_END, END_FROM, END_FROM_ID, FROM, FROM_ID, HINT_END, HINT_START, LOCK_END, LOCK_START_PREFIX, LOCK_START_PREFIX_WHERE, LOCK_START_SUFFIX, MAX_ROW, MIN_ROW, ORDER_BY_ID, SELECT, SELECT_ID_PREFIX, SELECT_ID_SUFFIX, shouldPrintForUpdateClause, 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
batchWritingMechanism, castSizeForVarcharParameter, classTypes, cursorCode, DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, driverName, driverSupportsNationalCharacterVarying, fieldTypes, IS_VALID_TIMEOUT, isCastRequired, maxBatchWritingSize, partitioningCallback, pingSQL, printInnerJoinInWhereClause, printOuterJoinInWhereClause, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesOnForeignKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldOptimizeDataConversion, shouldTrimStrings, statementCacheSize, storedProcedureTerminationToken, stringBindingSize, structConverters, supportsAutoCommit, tableCreationSuffix, transactionIsolation, typeConverters, useJDBCStoredProcedureSyntax, useNationalCharacterVarying, useRownumFiltering, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesStreamsForBinding, usesStringBinding
Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
conversionManager, dataTypesConvertedFromAClass, dataTypesConvertedToAClass, defaultNativeSequenceToTable, defaultSeqenceAtNextValue, defaultSequence, endDelimiter, platformOperators, sequences, sequencesLock, startDelimiter, supportsReturnGeneratedKeys, tableQualifier, timestampQuery, uuidQuery
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addBatch
(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
(Calendar calendar, 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
(Timestamp timestamp, Writer writer) INTERNAL: Appends an Oracle specific Timestamp, if usesNativeSQL is true otherwise use the ODBC format.INTERNAL: Add TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONEprotected Hashtable
<Class<?>, FieldTypeDefinition> INTERNAL: Add XMLType as the default database type for org.w3c.dom.Documents.protected String
buildFirstRowsHint
(int max) Build the hint string used for first rows.protected List
buildFromStringCharVec
(Class<?> javaClass) boolean
INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.void
void
INTERNAL: Clears both implicit and explicit caches of OracleConnectionclone()
<T> T
convertObject
(Object sourceObject, Class<T> javaClass) INTERNAL: Allow for conversion from the Oracle type to the Java type.void
Copy the state into the new platform.createConnectionCustomizer
(Accessor accessor, AbstractSession session) INTERNAL:int
executeBatch
(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).INTERNAL: Returns user name retrieved from JDBC connection.getCustomModifyValueForCall
(Call call, Object value, DatabaseField field, boolean shouldBind) INTERNAL: Used by SQLCall.translate(..) The binding *must* be performed (NCHAR, NSTRING, NCLOB).getDataTypesConvertedFrom
(Class<?> javaClass) INTERNAL: Return the list of Classes that can be converted to from the passed in javaClass.getDataTypesConvertedTo
(Class<?> javaClass) INTERNAL: Return the list of Classes that can be converted from to the passed in javaClass.INTERNAL: Return the driver version.int
getJDBCType
(Class<?> javaType) Return the JDBC type for the Java type.int
Return the JDBC type for the given database field to be passed to Statement.setNull The Oracle driver does not like the OPAQUE type so VARCHAR must be used.int
PUBLIC: Return the BLOB/CLOB value limits on thin driver.getObjectFromResultSet
(ResultSet resultSet, int columnNumber, int type, AbstractSession session) INTERNAL: Get a timestamp value from a result set.getTimestampFromServer
(AbstractSession session, String sessionName) INTERNAL: Answer the timestamp from the server.getTIMESTAMPLTZFromResultSet
(ResultSet resultSet, int columnNumber, AbstractSession session) INTERNAL: Get a TIMESTAMPLTZ value from a result set.INTERNAL: This method returns the query to select the SYSTIMESTAMP as TIMESTAMPTZ from the server for Oracle9i.getTIMESTAMPTZFromResultSet
(ResultSet resultSet, int columnNumber) INTERNAL: Get a TIMESTAMPTZ value from a result set.protected XMLTypeFactory
INTERNAL: Lazy initialization of xmlTypeFactory allows to avoid loading xdb-dependent class XMLTypeFactoryImpl unless xdb is used.void
initializeConnectionData
(Connection connection) INTERNAL:protected void
INTERNAL: Allow the use of XMLType operators on this platform.protected boolean
INTERNAL: Used in write LOB method only to identify a CLOB.boolean
INTERNAL: Return if ltz timestamps are returned in GMT by the driver.boolean
PUBLIC: Return is this is the Oracle 9 platform.protected boolean
isOracle9Specific
(Class<?> type) INTERNAL: Return if the type is a special oracle type.boolean
INTERNAL: Return if timestamps are returned in GMT by the driver.boolean
isXDBDocument
(Object obj) INTERNAL: Indicates whether the passed object is an instance of XDBDocument.prepareBatchStatement
(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 statementsINTERNAL: 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
(Object parameter, CallableStatement statement, String name, 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.void
setParameterValueInDatabaseCall
(Object parameter, PreparedStatement statement, int index, 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.void
setShouldTruncateDate
(boolean shouldTruncateDate) PUBLIC: Indicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement.boolean
PUBLIC: Indicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement.boolean
INTERNAL Used by SQLCall.appendModify(..) If the field should be passed to customModifyInDatabaseCall, retun true, otherwise false.boolean
INTERNAL: User name from JDBC connection is stored ininitializeConnectionData(Connection)
.unwrapOracleConnection
(Connection connection) INTERNAL: If can unwrap returns unwrapped Oracle connection, otherwise original connection.Methods inherited from class org.eclipse.persistence.platform.database.oracle.Oracle8Platform
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, buildCallWithReturning, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, canBuildCallWithReturning, checkTableExists, createExpressionFor, exceptOperator, getAssignmentString, getBatchBeginString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getDeclareBeginString, getDropCascadeString, getDropDatabaseSchemaString, getINClauseLimit, getMaxFieldNameSize, getNativeTableInfo, getProcedureArgument, getProcedureCallHeader, getProcedureCallTail, getSelectForUpdateString, getSelectForUpdateWaitString, getStoredProcedureParameterPrefix, getSystemChangeNumberQuery, getTableExistsQuery, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, isAlterSequenceObjectSupported, isForUpdateCompatibleWithDistinct, isLobCompatibleWithDistinct, isLockTimeoutException, isOracle, isRowCountOutputParameterRequired, logOperator, maximumNumericValues, minimumNumericValues, operatorLocate, operatorLocate2, operatorOuterJoin, oracleDateName, printFieldNullClause, printSQLSelectStatement, regexpOperator, setSupportsIdentity, shouldPrintForUpdateClause, shouldPrintStoredProcedureArgumentNameInCall, shouldUseJDBCOuterJoinSyntax, supportsAutoConversionToNumericForArithmeticOperations, supportsIdentity, supportsSelectForUpdateNoWait, supportsSequenceObjects, supportsStoredFunctions, supportsVPD, supportsWaitForUpdate, useJDBCStoredProcedureSyntax, wasFailureCommunicationBased
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addStructConverter, allowBindingForSelectClause, 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, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, getBatchDelimiterString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getDefaultSequenceTableName, getDriverSupportsNVarChar, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJdbcTypeName, getJsonPlatform, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, getSelectForUpdateNoWaitString, getSelectForUpdateOfString, getSequenceCounterFieldName, getSequenceNameFieldName, getSequencePreallocationSize, getSequenceTableName, getStatementCacheSize, getStoredProcedureTerminationToken, getStringBindingSize, getStructConverters, getTableCreationSuffix, getTempTableForTable, getTransactionIsolation, getTypeConverters, getUniqueConstraintDeletionString, getUseNationalCharacterVaryingTypeForString, hasPartitioningCallback, initialize, isCastRequired, isDynamicSQLRequiredForFunctions, isInformixOuterJoin, isJDBCExecuteCompliant, isNullAllowedInSelectClause, isOutputAllowWithResultSet, minimumTimeIncrement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldTypeSize, printFieldUnique, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, registerOutputParameter, registerOutputParameter, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setClassTypes, setCursorCode, setDriverName, setDriverSupportsNVarChar, setFieldTypes, setIsCastRequired, setMaxBatchWritingSize, setNullFromDatabaseField, setNullFromDatabaseField, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldBindPartialParameters, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceBindAllParameters, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldBindPartialParameters, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceBindAllParameters, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTempTableSpecifyPrimaryKeys, shouldTrimStrings, shouldUseGetSetNString, shouldUseRownumFiltering, supportsANSIInnerJoinSyntax, supportsAutoCommit, supportsCountDistinctWithMultipleFields, supportsDeleteOnCascade, supportsForeignKeyConstraints, supportsGlobalTempTables, supportsIndexes, supportsIndividualTableLocking, supportsLocalTempTables, supportsLockingQueriesWithMultipleTables, supportsNestingOuterJoins, supportsOrderByParameters, supportsOuterJoinsWithBrackets, supportsPrimaryKeyConstraint, supportsTempTables, supportsUniqueColumns, supportsUniqueKeyConstraints, usesBatchWriting, usesByteArrayBinding, usesJDBCBatchWriting, usesNativeBatchWriting, usesNativeSQL, usesSequenceTable, usesStreamsForBinding, usesStringBinding, writeAddColumnClause, 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, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getUpdateSequenceQuery, getUUIDQuery, hasDefaultSequence, initializeDefaultQueries, initIdentitySequences, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMariaDB, isMaxDB, isMySQL, isODBC, isOracle12, isOracle23, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeIdentitySequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, setUUIDQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.internal.databaseaccess.Platform
connectionProperties
-
Field Details
-
NCHAR
-
NSTRING
-
NCLOB
-
XMLTYPE
-
driverVersion
-
shouldPrintCalendar
protected transient boolean shouldPrintCalendar -
isTimestampInGmt
protected transient boolean isTimestampInGmt -
isLtzTimestampInGmt
protected transient boolean isLtzTimestampInGmt -
isConnectionDataInitialized
protected transient boolean isConnectionDataInitialized -
shouldTruncateDate
protected boolean shouldTruncateDateIndicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement. Starting with version 12.1 oracle jdbc Statement.setDate no longer zeroes sql.Date's entire time component (only milliseconds). Set this flag to true to make the platform to truncate days/hours/minutes before passing the date to Statement.setDate method.
-
-
Constructor Details
-
Oracle9Platform
public Oracle9Platform()
-
-
Method Details
-
copyInto
Copy the state into the new platform.- Specified by:
copyInto
in interfacePlatform
- Overrides:
copyInto
in classOracle8Platform
-
getObjectFromResultSet
public Object getObjectFromResultSet(ResultSet resultSet, int columnNumber, int type, AbstractSession session) throws 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 classOraclePlatform
- Throws:
SQLException
- See Also:
-
getTIMESTAMPTZFromResultSet
public Object getTIMESTAMPTZFromResultSet(ResultSet resultSet, int columnNumber) throws SQLException INTERNAL: Get a TIMESTAMPTZ value from a result set.- Throws:
SQLException
-
getTIMESTAMPLTZFromResultSet
public Object getTIMESTAMPLTZFromResultSet(ResultSet resultSet, int columnNumber, AbstractSession session) throws SQLException INTERNAL: Get a TIMESTAMPLTZ value from a result set.- Throws:
SQLException
-
shouldUseCustomModifyForCall
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 interfacePlatform
- Overrides:
shouldUseCustomModifyForCall
in classOracle8Platform
-
initializePlatformOperators
protected void initializePlatformOperators()INTERNAL: Allow the use of XMLType operators on this platform.- Overrides:
initializePlatformOperators
in classOraclePlatform
-
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 classOracle8Platform
-
buildFirstRowsHint
Build the hint string used for first rows. Allows it to be overridden- Overrides:
buildFirstRowsHint
in classOraclePlatform
-
buildClassTypes
INTERNAL: Add TIMESTAMP, TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE- Overrides:
buildClassTypes
in classDatabasePlatform
-
clone
- Specified by:
clone
in interfacePlatform
- Overrides:
clone
in classDatasourcePlatform
-
convertObject
public <T> T convertObject(Object sourceObject, Class<T> javaClass) throws ConversionException, DatabaseException INTERNAL: Allow for conversion from the Oracle type to the Java type.- Specified by:
convertObject
in interfaceCorePlatform<ConversionManager>
- Specified by:
convertObject
in interfacePlatform
- Overrides:
convertObject
in classDatasourcePlatform
- Parameters:
sourceObject
- the object that must be convertedjavaClass
- the class that the object must be converted to- Returns:
- the newly converted object
- Throws:
ConversionException
- all exceptions will be thrown as this type.DatabaseException
-
appendTimestamp
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 classOraclePlatform
- Throws:
IOException
-
appendCalendar
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 classOraclePlatform
- Throws:
IOException
-
initializeConnectionData
INTERNAL:- Overrides:
initializeConnectionData
in classOraclePlatform
- Throws:
SQLException
-
clearConnectionData
public void clearConnectionData() -
clearOracleConnectionCache
INTERNAL: Clears both implicit and explicit caches of OracleConnection- Overrides:
clearOracleConnectionCache
in classOraclePlatform
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, AbstractSession session) throws 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 classDatabasePlatform
- Throws:
SQLException
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, CallableStatement statement, String name, AbstractSession session) throws 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 classDatabasePlatform
- Throws:
SQLException
-
getTimestampFromServer
INTERNAL: Answer the timestamp from the server. Convert TIMESTAMPTZ to Timestamp- Specified by:
getTimestampFromServer
in interfacePlatform
- Overrides:
getTimestampFromServer
in classDatasourcePlatform
-
getTimestampQuery
INTERNAL: This method returns the query to select the SYSTIMESTAMP as TIMESTAMPTZ from the server for Oracle9i.- Specified by:
getTimestampQuery
in interfacePlatform
- Overrides:
getTimestampQuery
in classOraclePlatform
-
serverTimestampString
INTERNAL: Return the current SYSTIMESTAMP as TIMESTAMPTZ from the server.- Overrides:
serverTimestampString
in classOraclePlatform
-
buildToTIMESTAMPVec
-
buildToNStringCharVec
-
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 classOracle8Platform
-
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 classOracle8Platform
-
isOracle9Specific
INTERNAL: Return if the type is a special oracle type. bug 3325122 - just checking against the 4 classes is faster than isAssignableFrom MWN. -
isClob
INTERNAL: Used in write LOB method only to identify a CLOB.- Overrides:
isClob
in classOracle8Platform
-
getCustomModifyValueForCall
public Object getCustomModifyValueForCall(Call call, Object value, 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 interfacePlatform
- Overrides:
getCustomModifyValueForCall
in classOracle8Platform
-
buildFromStringCharVec
-
getDataTypesConvertedFrom
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 classDatasourcePlatform
- Parameters:
javaClass
- - the class that is converted from- Returns:
- - a vector of classes
-
getDataTypesConvertedTo
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 classDatasourcePlatform
- Parameters:
javaClass
- - the class that is converted to- Returns:
- - a vector of classes
-
getJDBCTypeForSetNull
Return the JDBC type for the given database field to be passed to Statement.setNull The Oracle driver does not like the OPAQUE type so VARCHAR must be used.- Overrides:
getJDBCTypeForSetNull
in classDatabasePlatform
-
getJDBCType
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 classDatabasePlatform
-
executeBatch
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 classDatabasePlatform
- Parameters:
isStatementPrepared
- - flag is set to true if this statement is prepared- Returns:
- - number of rows modified/deleted by this statement
- Throws:
SQLException
-
addBatch
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 classDatabasePlatform
- Returns:
- - number of rows modified/deleted by this statement if it was executed (0 if it wasn't)
- Throws:
SQLException
-
prepareBatchStatement
public Statement prepareBatchStatement(Statement statement, int maxBatchWritingSize) throws 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 classDatabasePlatform
- Returns:
- - statement to be used for batch writing
- Throws:
SQLException
-
getXMLTypeFactory
INTERNAL: Lazy initialization of xmlTypeFactory allows to avoid loading xdb-dependent class XMLTypeFactoryImpl unless xdb is used.- Returns:
- XMLTypeFactory
-
isXDBDocument
INTERNAL: Indicates whether the passed object is an instance of XDBDocument.- Overrides:
isXDBDocument
in classDatabasePlatform
- Returns:
- boolean
-
canUnwrapOracleConnection
public boolean canUnwrapOracleConnection()INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.- Overrides:
canUnwrapOracleConnection
in classOraclePlatform
-
unwrapOracleConnection
INTERNAL: If can unwrap returns unwrapped Oracle connection, otherwise original connection.- Overrides:
unwrapOracleConnection
in classOraclePlatform
-
isOracle9
public boolean isOracle9()PUBLIC: Return is this is the Oracle 9 platform.- Specified by:
isOracle9
in interfacePlatform
- Overrides:
isOracle9
in classDatasourcePlatform
-
createConnectionCustomizer
INTERNAL:- Overrides:
createConnectionCustomizer
in classDatasourcePlatform
-
getDriverVersion
INTERNAL: Return the driver version.- Specified by:
getDriverVersion
in interfacePlatform
- Overrides:
getDriverVersion
in classDatasourcePlatform
-
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. -
shouldTruncateDate
public boolean shouldTruncateDate()PUBLIC: Indicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement. Starting with version 12.1 oracle jdbc Statement.setDate no longer zeroes sql.Date's entire time component (only milliseconds). "true" indicates that the platform truncates days/hours/minutes before passing the date to Statement.setDate method. -
setShouldTruncateDate
public void setShouldTruncateDate(boolean shouldTruncateDate) PUBLIC: Indicates whether time component of java.sql.Date should be truncated (hours, minutes, seconds all set to zero) before been passed as a parameter to PreparedStatement. Starting with version 12.1 oracle jdbc Statement.setDate no longer zeroes sql.Date's entire time component (only milliseconds). Set this flag to true to make the platform to truncate days/hours/minutes before passing the date to Statement.setDate method. -
supportsConnectionUserName
public boolean supportsConnectionUserName()INTERNAL: User name from JDBC connection is stored ininitializeConnectionData(Connection)
.- Overrides:
supportsConnectionUserName
in classDatabasePlatform
- Returns:
- Always returns
true
-
getConnectionUserName
INTERNAL: Returns user name retrieved from JDBC connection.initializeConnectionData(Connection)
shall be called before this method.- Overrides:
getConnectionUserName
in classDatabasePlatform
- Returns:
- User name retrieved from JDBC connection.
-