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: Supports certain new Oracle 8 data types, and usage of certain Oracle JDBC specific APIs.

    Supports Oracle thin JDBC driver LOB >4k binding workaround.

    Creates BLOB and CLOB type for byte[] and char[] for table creation.

    Supports object-relational data-type creation.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

        DEFAULT_MAX_BATCH_WRITING_SIZE, DEFAULT_PARAMETERIZED_MAX_BATCH_WRITING_SIZE, IS_VALID_TIMEOUT, shouldIgnoreCaseOnFieldComparisons, Types_NCLOB, Types_SQLXML
    • Constructor Summary

      Constructors 
      Constructor Description
      Oracle8Platform()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void copyInto​(org.eclipse.persistence.internal.databaseaccess.Platform platform)
      INTERNAL: Allow for conversion from the Oralce type to the Java type.
      java.sql.Array createArray​(java.lang.String elementDataTypeName, java.lang.Object[] elements, java.sql.Connection connection)
      INTERNAL: Platforms that support java.sql.Array may override this method.
      java.sql.Struct createStruct​(java.lang.String structTypeName, java.lang.Object[] attributes, java.sql.Connection connection)
      INTERNAL: Platforms that support java.sql.Struct may override this method.
      void freeTemporaryObject​(java.lang.Object value)
      INTERNAL: Used by Oracle platforms during reading of ResultSet to free temporary LOBs.
      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(..) Typically there is no field translation (and this is default implementation).
      int getLobValueLimits()
      PUBLIC: Return the BLOB/CLOB value limits on thin driver.
      java.lang.Object getRefValue​(java.sql.Ref ref, java.sql.Connection connection)
      INTERNAL: Overrides DatabasePlatform method.
      boolean isNativeConnectionRequiredForLobLocator()
      INTERNAL: Indicates whether app.
      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(..) If the field should be passed to customModifyInDatabaseCall, retun true, otherwise false.
      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 - works on Oracle 10 and newer
      • Methods inherited from class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform

        addBatch, addStructConverter, appendLiteralToCall, appendParameter, appendParameterInternal, autoCommit, beginTransaction, buildBatchCriteria, buildBatchCriteriaForComplexId, buildCreateIndex, buildCreateIndex, buildDropIndex, buildDropIndex, buildProcedureCallString, buildSequenceObjectAlterIncrementWriter, buildSequenceObjectCreationWriter, buildSequenceObjectDeletionWriter, canBatchWriteWithOptimisticLocking, commitTransaction, computeMaxRowsForSQL, convertToDatabaseType, createArray, createStruct, dontBindUpdateAllQueryUsingTempTables, executeBatch, executeStoredProcedure, getBatchDelimiterString, getBatchWritingMechanism, getCastSizeForVarcharParameter, getClassTypes, getConnectionUserName, getConstraintDeletionString, getCreateDatabaseSchemaString, getCreateViewString, getCreationInOutputProcedureToken, getCreationOutputProcedureToken, getCursorCode, getDefaultSequenceTableName, getDriverSupportsNVarChar, getFieldTypeDefinition, getFieldTypes, getFunctionCallHeader, getIdentifierQuoteCharacter, getIndexNamePrefix, getInOutputProcedureToken, getInputProcedureToken, getJDBCOuterJoinString, getJDBCType, getJDBCType, getJDBCTypeForSetNull, 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, isXDBDocument, minimumTimeIncrement, prepareBatchStatement, printFieldIdentityClause, printFieldNotNullClause, printFieldTypeSize, printFieldUnique, printStoredFunctionReturnKeyWord, printValuelist, printValuelist, registerOutputParameter, requiresNamedPrimaryKeyConstraints, requiresProcedureBrackets, requiresProcedureCallBrackets, requiresProcedureCallOuputToken, requiresTableInIndexDropDDL, requiresTypeNameToRegisterOutputParameter, requiresUniqueConstraintCreationOnTableCreate, retrieveFirstPrimaryKeyOrOne, rollbackTransaction, setBatchWritingMechanism, setCastSizeForVarcharParameter, setCursorCode, setDriverName, setDriverSupportsNVarChar, setIsCastRequired, setMaxBatchWritingSize, setParameterValueInDatabaseCall, 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, supportsConnectionUserName, 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, clone, convertObject, createConnectionCustomizer, getConversionManager, getDataTypesConvertedFrom, getDataTypesConvertedTo, getDefaultNativeSequenceToTable, getDefaultSequence, getDefaultSequenceToWrite, getEndDelimiter, getOperator, getPlatformOperators, getSelectSequenceQuery, getSequence, getSequences, getSequencesToWrite, getStartDelimiter, getTableQualifier, getTimestampFromServer, getUpdateSequenceQuery, hasDefaultSequence, initializeDefaultQueries, isAccess, isAttunity, isCloudscape, isDB2, isDBase, isDerby, isFirebird, isH2, isHANA, isHSQL, isInformix, isMaxDB, isMySQL, isODBC, isOracle9, 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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Oracle8Platform

        public Oracle8Platform()
    • Method Detail

      • copyInto

        public void copyInto​(org.eclipse.persistence.internal.databaseaccess.Platform platform)
        INTERNAL: Allow for conversion from the Oralce 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
      • 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
      • 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
      • 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 - works on Oracle 10 and newer
        Overrides:
        writeLOB in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Throws:
        java.sql.SQLException
      • 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.
      • createArray

        public java.sql.Array createArray​(java.lang.String elementDataTypeName,
                                          java.lang.Object[] elements,
                                          java.sql.Connection connection)
                                   throws java.sql.SQLException
        INTERNAL: Platforms that support java.sql.Array may override this method.
        Overrides:
        createArray in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Returns:
        Array
        Throws:
        java.sql.SQLException
      • createStruct

        public java.sql.Struct createStruct​(java.lang.String structTypeName,
                                            java.lang.Object[] attributes,
                                            java.sql.Connection connection)
                                     throws java.sql.SQLException
        INTERNAL: Platforms that support java.sql.Struct may override this method.
        Overrides:
        createStruct in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Returns:
        Struct
        Throws:
        java.sql.SQLException
      • getRefValue

        public java.lang.Object getRefValue​(java.sql.Ref ref,
                                            java.sql.Connection connection)
                                     throws java.sql.SQLException
        INTERNAL: Overrides DatabasePlatform method.
        Overrides:
        getRefValue in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Returns:
        String
        Throws:
        java.sql.SQLException
      • freeTemporaryObject

        public void freeTemporaryObject​(java.lang.Object value)
                                 throws java.sql.SQLException
        INTERNAL: Used by Oracle platforms during reading of ResultSet to free temporary LOBs.
        Overrides:
        freeTemporaryObject in class org.eclipse.persistence.internal.databaseaccess.DatabasePlatform
        Throws:
        java.sql.SQLException