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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Class |
NCHAR |
static java.lang.Class |
NCLOB |
static java.lang.Class |
NSTRING |
static java.lang.Class |
XMLTYPE |
DEFAULT_VARCHAR_SIZEDEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, shouldIgnoreCaseOnFieldComparisons, Types_NCLOB, Types_SQLXML| Constructor and Description |
|---|
Oracle9Platform() |
| Modifier and Type | Method and Description |
|---|---|
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).
|
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.
|
void |
copyInto(Platform platform)
Copy the state into the new platform.
|
ConnectionCustomizer |
createConnectionCustomizer(Accessor accessor,
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.String |
getConnectionUserName()
INTERNAL:
Returns user name retrieved from JDBC connection.
|
java.lang.Object |
getCustomModifyValueForCall(Call call,
java.lang.Object value,
DatabaseField field,
boolean shouldBind)
INTERNAL:
Used by SQLCall.translate(..)
The binding *must* be performed (NCHAR, NSTRING, NCLOB).
|
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 |
getJDBCTypeForSetNull(DatabaseField field)
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 |
getLobValueLimits()
PUBLIC:
Return the BLOB/CLOB value limits on thin driver.
|
java.lang.Object |
getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
INTERNAL:
Get a timestamp value from a result set.
|
java.sql.Timestamp |
getTimestampFromServer(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,
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,
AbstractSession session)
INTERNAL:
Get a TIMESTAMPTZ value from a result set.
|
void |
initializeConnectionData(java.sql.Connection connection)
INTERNAL:
|
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.
|
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,
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 |
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 |
shouldUseCustomModifyForCall(DatabaseField field)
INTERNAL
Used by SQLCall.appendModify(..)
If the field should be passed to customModifyInDatabaseCall, retun true,
otherwise false.
|
boolean |
supportsConnectionUserName()
INTERNAL:
User name from JDBC connection is stored in
initializeConnectionData(Connection). |
java.sql.Connection |
unwrapOracleConnection(java.sql.Connection connection)
INTERNAL:
If can unwrap returns unwrapped Oracle connection, otherwise original connection.
|
createArray, createStruct, freeTemporaryObject, getConnection, getRefValue, isNativeConnectionRequiredForLobLocator, setShouldUseLocatorForLOBWrite, shouldUseLocatorForLOBWrite, writeLOBallowsSizeInProcedureArguments, atan2Operator, buildCallWithReturning, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, canBuildCallWithReturning, exceptOperator, getAssignmentString, getBatchBeginString, getBatchEndString, getBatchRowCountAssignString, getBatchRowCountDeclareString, getBatchRowCountReturnString, getDeclareBeginString, getDropCascadeString, getDropDatabaseSchemaString, getMaxFieldNameSize, getNativeTableInfo, getProcedureArgumentSetter, getProcedureCallHeader, getProcedureCallTail, getSelectForUpdateString, getSelectForUpdateWaitString, getStoredProcedureParameterPrefix, getSystemChangeNumberQuery, getVPDClearIdentifierQuery, getVPDCreationFunctionString, getVPDCreationPolicyString, getVPDDeletionString, getVPDSetIdentifierQuery, isAlterSequenceObjectSupported, isForUpdateCompatibleWithDistinct, isLobCompatibleWithDistinct, isLockTimeoutException, isOracle, isRowCountOutputParameterRequired, maximumNumericValues, minimumNumericValues, printFieldNullClause, printSQLSelectStatement, regexpOperator, setSupportsIdentity, shouldPrintStoredProcedureArgumentNameInCall, shouldUseJDBCOuterJoinSyntax, supportsAutoConversionToNumericForArithmeticOperations, supportsIdentity, supportsSelectForUpdateNoWait, supportsSequenceObjects, supportsStoredFunctions, supportsVPD, useJDBCStoredProcedureSyntax, wasFailureCommunicationBasedaddStructConverter, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, createArray, createStruct, dontBindUpdateAllQueryUsingTempTables, executeStoredProcedure, getBatchDelimiterString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getDefaultSequenceTableName, getDriverSupportsNVarChar, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getPartitioningCallback, getPingSQL, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, 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, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setPartitioningCallback, setPingSQL, setPrintInnerJoinInWhereClause, setPrintOuterJoinInWhereClause, setSequenceCounterFieldName, setSequenceNameFieldName, setSequenceTableName, setShouldBindAllParameters, setShouldBindLiterals, setShouldCacheAllStatements, setShouldCreateIndicesOnForeignKeys, setShouldForceFieldNamesToUpperCase, setShouldIgnoreCaseOnFieldComparisons, setShouldOptimizeDataConversion, setShouldTrimStrings, setShouldUseRownumFiltering, setStatementCacheSize, setStoredProcedureTerminationToken, setStringBindingSize, setSupportsAutoCommit, setTableCreationSuffix, setTransactionIsolation, setUseJDBCStoredProcedureSyntax, setUseNationalCharacterVaryingTypeForString, setUsesBatchWriting, setUsesByteArrayBinding, setUsesJDBCBatchWriting, setUsesNativeBatchWriting, setUsesNativeSQL, setUsesStreamsForBinding, setUsesStringBinding, shouldAlwaysUseTempStorageForModifyAll, shouldBindAllParameters, shouldBindLiterals, shouldCacheAllStatements, shouldCreateIndicesForPrimaryKeys, shouldCreateIndicesOnForeignKeys, shouldCreateIndicesOnUniqueKeys, shouldForceFieldNamesToUpperCase, shouldIgnoreCaseOnFieldComparisons, shouldIgnoreException, shouldOptimizeDataConversion, shouldPrintAliasForUpdate, shouldPrintConstraintNameAfter, shouldPrintFieldIdentityClause, shouldPrintForUpdateClause, shouldPrintInnerJoinInWhereClause, shouldPrintInOutputTokenBeforeType, shouldPrintInputTokenAtStart, shouldPrintLockingClauseAfterWhereClause, shouldPrintOuterJoinInWhereClause, shouldPrintOutputTokenAtStart, shouldPrintOutputTokenBeforeType, shouldPrintStoredProcedureVariablesAfterBeginString, shouldTrimStrings, shouldUseGetSetNString, 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, writeAddColumnClause, writeCleanUpTempTableSql, writeCreateTempTableSql, writeDeleteFromTargetTableUsingTempTableSql, writeInsertIntoTableSql, writeParameterMarker, writeTableCreationSuffix, writeUpdateOriginalFromTempTableSqladdSequence, addSequence, buildNativeCall, buildSelectQueryForIdentity, buildSelectQueryForSequenceObject, getConversionManager, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, toString, usesPlatformDefaultSequencepublic static final java.lang.Class NCHAR
public static final java.lang.Class NSTRING
public static final java.lang.Class NCLOB
public static final java.lang.Class XMLTYPE
public void copyInto(Platform platform)
copyInto in interface PlatformcopyInto in class Oracle8Platformpublic java.lang.Object getObjectFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
throws java.sql.SQLException
getObjectFromResultSet in class OraclePlatformjava.sql.SQLExceptionorg.eclipse.persistence.oraclespecific.Oracle9Platformpublic java.lang.Object getTIMESTAMPTZFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Object getTIMESTAMPLTZFromResultSet(java.sql.ResultSet resultSet,
int columnNumber,
int type,
AbstractSession session)
throws java.sql.SQLException
java.sql.SQLExceptionpublic boolean shouldUseCustomModifyForCall(DatabaseField field)
shouldUseCustomModifyForCall in interface PlatformshouldUseCustomModifyForCall in class Oracle8Platformpublic java.lang.Object clone()
clone in interface Platformclone in class DatasourcePlatformpublic java.lang.Object convertObject(java.lang.Object sourceObject,
java.lang.Class javaClass)
throws ConversionException,
DatabaseException
convertObject in interface CorePlatform<ConversionManager>convertObject in interface PlatformconvertObject in class DatasourcePlatformjavaClass - - the class that the object must be converted toConversionExceptionDatabaseExceptionpublic void initializeConnectionData(java.sql.Connection connection)
throws java.sql.SQLException
initializeConnectionData in class OraclePlatformjava.sql.SQLExceptionpublic void clearConnectionData()
public void clearOracleConnectionCache(java.sql.Connection conn)
clearOracleConnectionCache in class OraclePlatformpublic void setParameterValueInDatabaseCall(java.lang.Object parameter,
java.sql.PreparedStatement statement,
int index,
AbstractSession session)
throws java.sql.SQLException
setParameterValueInDatabaseCall in class DatabasePlatformjava.sql.SQLExceptionpublic java.sql.Timestamp getTimestampFromServer(AbstractSession session, java.lang.String sessionName)
getTimestampFromServer in interface PlatformgetTimestampFromServer in class DatasourcePlatformpublic ValueReadQuery getTimestampQuery()
getTimestampQuery in interface PlatformgetTimestampQuery in class OraclePlatformpublic java.lang.String serverTimestampString()
serverTimestampString in class OraclePlatformpublic int getLobValueLimits()
getLobValueLimits in class Oracle8Platformpublic void setLobValueLimits(int lobValueLimits)
setLobValueLimits in class Oracle8Platformpublic java.lang.Object getCustomModifyValueForCall(Call call, java.lang.Object value, DatabaseField field, boolean shouldBind)
getCustomModifyValueForCall in interface PlatformgetCustomModifyValueForCall in class Oracle8Platformpublic java.util.Vector getDataTypesConvertedFrom(java.lang.Class javaClass)
getDataTypesConvertedFrom in class DatasourcePlatformjavaClass - - the class that is converted frompublic java.util.Vector getDataTypesConvertedTo(java.lang.Class javaClass)
getDataTypesConvertedTo in class DatasourcePlatformjavaClass - - the class that is converted topublic int getJDBCTypeForSetNull(DatabaseField field)
getJDBCTypeForSetNull in class DatabasePlatformpublic int getJDBCType(java.lang.Class javaType)
getJDBCType in class DatabasePlatformpublic int executeBatch(java.sql.Statement statement,
boolean isStatementPrepared)
throws java.sql.SQLException
executeBatch in class DatabasePlatformisStatementPrepared - - flag is set to true if this statement is preparedjava.sql.SQLExceptionpublic int addBatch(java.sql.PreparedStatement statement)
throws java.sql.SQLException
addBatch in class DatabasePlatformjava.sql.SQLExceptionpublic java.sql.Statement prepareBatchStatement(java.sql.Statement statement,
int maxBatchWritingSize)
throws java.sql.SQLException
prepareBatchStatement in class DatabasePlatformjava.sql.SQLExceptionpublic boolean isXDBDocument(java.lang.Object obj)
isXDBDocument in class DatabasePlatformpublic boolean canUnwrapOracleConnection()
canUnwrapOracleConnection in class OraclePlatformpublic java.sql.Connection unwrapOracleConnection(java.sql.Connection connection)
unwrapOracleConnection in class OraclePlatformpublic boolean isOracle9()
isOracle9 in interface PlatformisOracle9 in class DatasourcePlatformpublic ConnectionCustomizer createConnectionCustomizer(Accessor accessor, AbstractSession session)
createConnectionCustomizer in class DatasourcePlatformpublic java.lang.String getDriverVersion()
public boolean isTimestampInGmt()
public boolean isLtzTimestampInGmt()
public boolean shouldTruncateDate()
public void setShouldTruncateDate(boolean shouldTruncateDate)
public boolean supportsConnectionUserName()
initializeConnectionData(Connection).supportsConnectionUserName in class DatabasePlatformtruepublic java.lang.String getConnectionUserName()
initializeConnectionData(Connection) shall be called
before this method.getConnectionUserName in class DatabasePlatformEclipseLink 2.6.3, "build v20160428-59c81c5" API Reference