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,org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>,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
-
-
Field Summary
Fields Modifier and Type Field Description static ClassNCHARstatic ClassNCLOBstatic ClassNSTRINGstatic ClassXMLTYPE-
Fields inherited from class org.eclipse.persistence.platform.database.DatabasePlatform
DEFAULT_VARCHAR_SIZE
-
-
Constructor Summary
Constructors Constructor Description Oracle9Platform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddBatch(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).booleancanUnwrapOracleConnection()INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.voidclearConnectionData()voidclearOracleConnectionCache(Connection conn)INTERNAL: Clears both implicit and explicit caches of OracleConnectionObjectclone()ObjectconvertObject(Object sourceObject, Class javaClass)INTERNAL: Allow for conversion from the Oracle type to the Java type.voidcopyInto(org.eclipse.persistence.internal.databaseaccess.Platform platform)Copy the state into the new platform.org.eclipse.persistence.internal.databaseaccess.ConnectionCustomizercreateConnectionCustomizer(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL:intexecuteBatch(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).StringgetConnectionUserName()INTERNAL: Returns user name retrieved from JDBC connection.ObjectgetCustomModifyValueForCall(Call call, Object value, org.eclipse.persistence.internal.helper.DatabaseField field, boolean shouldBind)INTERNAL: Used by SQLCall.translate(..) The binding *must* be performed (NCHAR, NSTRING, NCLOB).VectorgetDataTypesConvertedFrom(Class javaClass)INTERNAL: Return the list of Classes that can be converted to from the passed in javaClass.VectorgetDataTypesConvertedTo(Class javaClass)INTERNAL: Return the list of Classes that can be converted from to the passed in javaClass.StringgetDriverVersion()INTERNAL: Return the driver version.intgetJDBCType(Class javaType)Return the JDBC type for the Java type.intgetJDBCTypeForSetNull(org.eclipse.persistence.internal.helper.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.intgetLobValueLimits()PUBLIC: Return the BLOB/CLOB value limits on thin driver.ObjectgetObjectFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Get a timestamp value from a result set.TimestampgetTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session, String sessionName)INTERNAL: Answer the timestamp from the server.ObjectgetTIMESTAMPLTZFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Get a TIMESTAMPLTZ value from a result set.ValueReadQuerygetTimestampQuery()INTERNAL: This method returns the query to select the SYSTIMESTAMP as TIMESTAMPTZ from the server for Oracle9i.ObjectgetTIMESTAMPTZFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: Get a TIMESTAMPTZ value from a result set.voidinitializeConnectionData(Connection connection)INTERNAL:booleanisLtzTimestampInGmt()INTERNAL: Return if ltz timestamps are returned in GMT by the driver.booleanisOracle9()PUBLIC: Return is this is the Oracle 9 platform.booleanisTimestampInGmt()INTERNAL: Return if timestamps are returned in GMT by the driver.booleanisXDBDocument(Object obj)INTERNAL: Indicates whether the passed object is an instance of XDBDocument.StatementprepareBatchStatement(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 statementsStringserverTimestampString()INTERNAL: Return the current SYSTIMESTAMP as TIMESTAMPTZ from the server.voidsetLobValueLimits(int lobValueLimits)PUBLIC: Set the BLOB/CLOB value limits on thin driver.voidsetParameterValueInDatabaseCall(Object parameter, 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.voidsetShouldTruncateDate(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.booleanshouldTruncateDate()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.booleanshouldUseCustomModifyForCall(org.eclipse.persistence.internal.helper.DatabaseField field)INTERNAL Used by SQLCall.appendModify(..) If the field should be passed to customModifyInDatabaseCall, retun true, otherwise false.booleansupportsConnectionUserName()INTERNAL: User name from JDBC connection is stored ininitializeConnectionData(Connection).ConnectionunwrapOracleConnection(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, isNativeConnectionRequiredForLobLocator, setShouldUseLocatorForLOBWrite, shouldUseLocatorForLOBWrite, writeLOB
-
Methods inherited from class org.eclipse.persistence.platform.database.OraclePlatform
allowsSizeInProcedureArguments, 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, shouldPrintForUpdateClause, shouldPrintStoredProcedureArgumentNameInCall, shouldUseJDBCOuterJoinSyntax, supportsAutoConversionToNumericForArithmeticOperations, supportsIdentity, supportsSelectForUpdateNoWait, supportsSequenceObjects, supportsStoredFunctions, supportsVPD, useJDBCStoredProcedureSyntax, wasFailureCommunicationBased
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
addStructConverter, 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, 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, writeUpdateOriginalFromTempTableSql
-
Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
addSequence, 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, usesPlatformDefaultSequence
-
-
-
-
Method Detail
-
copyInto
public void copyInto(org.eclipse.persistence.internal.databaseaccess.Platform platform)
Copy the state into the new platform.- Specified by:
copyIntoin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
copyIntoin classOracle8Platform
-
getObjectFromResultSet
public Object getObjectFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.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:
getObjectFromResultSetin classOraclePlatform- Throws:
SQLException- See Also:
org.eclipse.persistence.oraclespecific.Oracle9Platform
-
getTIMESTAMPTZFromResultSet
public Object getTIMESTAMPTZFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException
INTERNAL: Get a TIMESTAMPTZ value from a result set.- Throws:
SQLException
-
getTIMESTAMPLTZFromResultSet
public Object getTIMESTAMPLTZFromResultSet(ResultSet resultSet, int columnNumber, int type, org.eclipse.persistence.internal.sessions.AbstractSession session) throws SQLException
INTERNAL: Get a TIMESTAMPLTZ value from a result set.- Throws:
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:
shouldUseCustomModifyForCallin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
shouldUseCustomModifyForCallin classOracle8Platform
-
clone
public Object clone()
- Specified by:
clonein interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
clonein classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
convertObject
public Object convertObject(Object sourceObject, Class javaClass) throws ConversionException, DatabaseException
INTERNAL: Allow for conversion from the Oracle type to the Java type.- Specified by:
convertObjectin interfaceorg.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>- Specified by:
convertObjectin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
convertObjectin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatformjavaClass- - the class that the object must be converted to- Returns:
- - the newly converted object
- Throws:
ConversionExceptionDatabaseException
-
initializeConnectionData
public void initializeConnectionData(Connection connection) throws SQLException
INTERNAL:- Overrides:
initializeConnectionDatain classOraclePlatform- Throws:
SQLException
-
clearConnectionData
public void clearConnectionData()
-
clearOracleConnectionCache
public void clearOracleConnectionCache(Connection conn)
INTERNAL: Clears both implicit and explicit caches of OracleConnection- Overrides:
clearOracleConnectionCachein classOraclePlatform
-
setParameterValueInDatabaseCall
public void setParameterValueInDatabaseCall(Object parameter, PreparedStatement statement, int index, org.eclipse.persistence.internal.sessions.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:
setParameterValueInDatabaseCallin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Throws:
SQLException
-
getTimestampFromServer
public Timestamp getTimestampFromServer(org.eclipse.persistence.internal.sessions.AbstractSession session, String sessionName)
INTERNAL: Answer the timestamp from the server. Convert TIMESTAMPTZ to Timestamp- Specified by:
getTimestampFromServerin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
getTimestampFromServerin classorg.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:
getTimestampQueryin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
getTimestampQueryin classOraclePlatform
-
serverTimestampString
public String serverTimestampString()
INTERNAL: Return the current SYSTIMESTAMP as TIMESTAMPTZ from the server.- Overrides:
serverTimestampStringin classOraclePlatform
-
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:
getLobValueLimitsin 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:
setLobValueLimitsin classOracle8Platform
-
getCustomModifyValueForCall
public Object getCustomModifyValueForCall(Call call, 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:
getCustomModifyValueForCallin interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
getCustomModifyValueForCallin classOracle8Platform
-
getDataTypesConvertedFrom
public Vector getDataTypesConvertedFrom(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:
getDataTypesConvertedFromin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform- Parameters:
javaClass- - the class that is converted from- Returns:
- - a vector of classes
-
getDataTypesConvertedTo
public Vector getDataTypesConvertedTo(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:
getDataTypesConvertedToin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform- Parameters:
javaClass- - the class that is converted to- Returns:
- - a vector of classes
-
getJDBCTypeForSetNull
public int getJDBCTypeForSetNull(org.eclipse.persistence.internal.helper.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.- Overrides:
getJDBCTypeForSetNullin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
getJDBCType
public int getJDBCType(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:
getJDBCTypein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform
-
executeBatch
public int executeBatch(Statement statement, boolean isStatementPrepared) throws 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:
executeBatchin classorg.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:
SQLException
-
addBatch
public int addBatch(PreparedStatement statement) throws 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:
addBatchin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- 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:
prepareBatchStatementin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Returns:
- - statement to be used for batch writing
- Throws:
SQLException
-
isXDBDocument
public boolean isXDBDocument(Object obj)
INTERNAL: Indicates whether the passed object is an instance of XDBDocument.- Overrides:
isXDBDocumentin classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Returns:
- boolean
-
canUnwrapOracleConnection
public boolean canUnwrapOracleConnection()
INTERNAL: Indicates whether this Oracle platform can unwrap Oracle connection.- Overrides:
canUnwrapOracleConnectionin classOraclePlatform
-
unwrapOracleConnection
public Connection unwrapOracleConnection(Connection connection)
INTERNAL: If can unwrap returns unwrapped Oracle connection, otherwise original connection.- Overrides:
unwrapOracleConnectionin classOraclePlatform
-
isOracle9
public boolean isOracle9()
PUBLIC: Return is this is the Oracle 9 platform.- Specified by:
isOracle9in interfaceorg.eclipse.persistence.internal.databaseaccess.Platform- Overrides:
isOracle9in classorg.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:
createConnectionCustomizerin classorg.eclipse.persistence.internal.databaseaccess.DatasourcePlatform
-
getDriverVersion
public 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.
-
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:
supportsConnectionUserNamein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Returns:
- Always returns
true
-
getConnectionUserName
public String getConnectionUserName()
INTERNAL: Returns user name retrieved from JDBC connection.initializeConnectionData(Connection)shall be called before this method.- Overrides:
getConnectionUserNamein classorg.eclipse.persistence.internal.databaseaccess.DatabasePlatform- Returns:
- User name retrieved from JDBC connection.
-
-