Class Oracle8Platform

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.internal.core.databaseaccess.CorePlatform<org.eclipse.persistence.internal.helper.ConversionManager>, org.eclipse.persistence.internal.databaseaccess.Platform
    Direct Known Subclasses:
    Oracle9Platform

    public class Oracle8Platform
    extends OraclePlatform

    Purpose: Provides Oracle version specific behavior when org.eclipse.persistence.oracle bundle is not available.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int lobValueLimits
      The LOB value limits when the Locator is required for the writing
      protected boolean usesLocatorForLOBWrite
      Locator is required for Oracle thin driver to write LOB value exceeds the limits
      • 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, Types_NCLOB, Types_SQLXML, 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Oracle8Platform()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Hashtable buildFieldTypes()
      INTERNAL:
      void copyInto​(org.eclipse.persistence.internal.databaseaccess.Platform platform)
      INTERNAL: Allow for conversion from the Oracle type to the Java type.
      java.sql.Connection getConnection​(org.eclipse.persistence.internal.sessions.AbstractSession session, java.sql.Connection connection)
      INTERNAL: This method is used to unwrap the oracle connection wrapped by the application server.
      java.lang.Object getCustomModifyValueForCall​(Call call, java.lang.Object value, org.eclipse.persistence.internal.helper.DatabaseField field, boolean shouldBind)
      INTERNAL Used by SQLCall.translate(..)
      int getLobValueLimits()
      PUBLIC: Return the BLOB/CLOB value limits on thin driver.
      protected boolean isBlob​(java.lang.Class type)
      INTERNAL: Used in writeLOB method only to identify a BLOB
      protected boolean isClob​(java.lang.Class type)
      INTERNAL: Used in writeLOB method only to identify a CLOB
      boolean isNativeConnectionRequiredForLobLocator()
      INTERNAL: Indicates whether app. server should unwrap connection to use lob locator.
      protected boolean lobValueExceedsLimit​(java.lang.Object value)
      INTERNAL: Return if the LOB value size is larger than the limit, i.e. 4k.
      void setLobValueLimits​(int lobValueLimits)
      PUBLIC: Set the BLOB/CLOB value limits on thin driver.
      void setShouldUseLocatorForLOBWrite​(boolean usesLocatorForLOBWrite)
      PUBLIC: Set if the locator is required for the LOB write.
      boolean shouldUseCustomModifyForCall​(org.eclipse.persistence.internal.helper.DatabaseField field)
      INTERNAL Used by SQLCall.appendModify(..)
      boolean shouldUseLocatorForLOBWrite()
      PUBLIC: Return if the locator is required for the LOB write.
      void writeLOB​(org.eclipse.persistence.internal.helper.DatabaseField field, java.lang.Object value, java.sql.ResultSet resultSet, org.eclipse.persistence.internal.sessions.AbstractSession session)
      INTERNAL: Write LOB value - only on Oracle8 and up
      • Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

        addBatch, addStructConverter, allowBindingForSelectClause, appendBoolean, appendLiteralToCall, appendLiteralToCallWithBinding, appendNumber, appendParameter, appendParameterInternal, appendString, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildClassTypes, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, createArray, createArray, createPlatformDefaultSequence, createStruct, createStruct, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, freeTemporaryObject, getBatchDelimiterString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateTempTableSqlBodyForTable, getCreateTempTableSqlPrefix, getCreateTempTableSqlSuffix, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getDefaultSequenceTableName, getDriverSupportsNVarChar, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, getJdbcTypeName, getMaxBatchWritingSize, getMaxForeignKeyNameSize, getMaxIndexNameSize, getMaxUniqueKeyNameSize, getNoWaitString, getOutputProcedureToken, getParameterValueFromDatabaseCall, getParameterValueFromDatabaseCall, getPartitioningCallback, getPingSQL, getProcedureArgument, getProcedureArgumentString, getProcedureAsString, getProcedureBeginString, getProcedureEndString, getProcedureOptionList, getQualifiedName, getQualifiedSequenceTableName, getRefValue, 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, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, 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, setParameterValueInDatabaseCall, setParameterValueInDatabaseCall, 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, supportsConnectionUserName, 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, clone, convertObject, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSeqenceAtNextValue, getDefaultSequence, getDefaultSequenceToWrite, getDriverVersion, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDB2Z, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle23, isOracle9, isPervasive, isPointBase, isPostgreSQL, isSQLAnywhere, isSQLServer, isSybase, isSymfoware, isTimesTen, isTimesTen7, removeAllSequences, removeSequence, sequencesAfterCloneCleanup, setConversionManager, setDefaultNativeSequenceToTable, setDefaultSeqenceAtNextValue, setDefaultSequence, setEndDelimiter, setSelectSequenceNumberQuery, setSequencePreallocationSize, setSequences, setStartDelimiter, setSupportsReturnGeneratedKeys, setTableQualifier, setTimestampQuery, setUpdateSequenceQuery, shouldNativeSequenceUseTransaction, shouldPrepare, shouldSelectDistinctIncludeOrderBy, shouldSelectIncludeOrderBy, supportsNativeSequenceNumbers, supportsReturnGeneratedKeys, toString, usesPlatformDefaultSequence
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • usesLocatorForLOBWrite

        protected boolean usesLocatorForLOBWrite
        Locator is required for Oracle thin driver to write LOB value exceeds the limits
      • lobValueLimits

        protected int lobValueLimits
        The LOB value limits when the Locator is required for the writing
    • Constructor Detail

      • Oracle8Platform

        public Oracle8Platform()
    • Method Detail

      • copyInto

        public void copyInto​(org.eclipse.persistence.internal.databaseaccess.Platform platform)
        INTERNAL: Allow for conversion from the Oracle type to the Java type.
        Specified by:
        copyInto in interface org.eclipse.persistence.internal.databaseaccess.Platform
        Overrides:
        copyInto in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • 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 org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • lobValueExceedsLimit

        protected boolean lobValueExceedsLimit​(java.lang.Object value)
        INTERNAL: Return if the LOB value size is larger than the limit, i.e. 4k.
      • getConnection

        public java.sql.Connection getConnection​(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                 java.sql.Connection connection)
        INTERNAL: This method is used to unwrap the oracle connection wrapped by the application server. TopLink needs this unwrapped connection for certain Oracle Specific support. (ie TIMESTAMPTZ, LOB) This is added as a workaround for bug 4565190
        Overrides:
        getConnection in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • 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(..) Typically there is no field translation (and this is default implementation). However on different platforms (Oracle) there are cases such that the values for binding and appending may be different (BLOB, CLOB). 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 org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
      • writeLOB

        public void writeLOB​(org.eclipse.persistence.internal.helper.DatabaseField field,
                             java.lang.Object value,
                             java.sql.ResultSet resultSet,
                             org.eclipse.persistence.internal.sessions.AbstractSession session)
                      throws java.sql.SQLException
        INTERNAL: Write LOB value - only on Oracle8 and up
        Overrides:
        writeLOB in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Throws:
        java.sql.SQLException
      • isBlob

        protected boolean isBlob​(java.lang.Class type)
        INTERNAL: Used in writeLOB method only to identify a BLOB
      • isClob

        protected boolean isClob​(java.lang.Class type)
        INTERNAL: Used in writeLOB method only to identify a CLOB
      • setShouldUseLocatorForLOBWrite

        public void setShouldUseLocatorForLOBWrite​(boolean usesLocatorForLOBWrite)
        PUBLIC: Set if the locator is required for the LOB write. The default is true. For Oracle thin driver, the locator is recommended for large size ( >4k for Oracle8, >5.9K for Oracle9) BLOB/CLOB value write.
      • shouldUseLocatorForLOBWrite

        public boolean shouldUseLocatorForLOBWrite()
        PUBLIC: Return if the locator is required for the LOB write. The default is true. For Oracle thin driver, the locator is recommended for large size ( >4k for Oracle8, >5.9K for Oracle9) BLOB/CLOB value write.
      • 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.
      • 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.