Top Description Fields Constructors Methods
org.eclipse.persistence.platform.database

public Class Oracle8Platform

extends OraclePlatform
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.platform.database.Oracle9Platform
Imports
java.sql.Connection, .ResultSet, .SQLException, java.util.Hashtable, org.eclipse.persistence.internal.databaseaccess.DatabaseCall, .FieldTypeDefinition, .Platform, .SimpleAppendCallCustomParameter, org.eclipse.persistence.internal.helper.ClassConstants, .DatabaseField, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.logging.SessionLog, org.eclipse.persistence.queries.Call

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

Field Summary

Modifier and TypeField and 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

Inherited from org.eclipse.persistence.platform.database.OraclePlatform:
BRACKET_ENDEND_FROMEND_FROM_IDFROMFROM_IDHINT_ENDHINT_STARTLOCK_ENDLOCK_START_PREFIXLOCK_START_PREFIX_WHERELOCK_START_SUFFIXMAX_ROWMIN_ROWORDER_BY_IDSELECTSELECT_ID_PREFIXSELECT_ID_SUFFIXshouldPrintForUpdateClausesupportsIdentityvpdClearIdentifierQueryvpdSetIdentifierQuery

Constructor Summary

AccessConstructor and Description
public
Oracle8Platform()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected Hashtable<Class<?>, FieldTypeDefinition>
public void
copyInto(Platform platform)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.copyInto.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.copyInto.

INTERNAL: Allow for conversion from the Oracle type to the Java type.
public Connection
getConnection(AbstractSession session, Connection connection)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getConnection.

INTERNAL: This method is used to unwrap the oracle connection wrapped by the application server.
public Object
getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCustomModifyValueForCall.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.getCustomModifyValueForCall.

INTERNAL Used by SQLCall.translate(..) Typically there is no field translation (and this is default implementation).
public int
getLobValueLimits()

PUBLIC: Return the BLOB/CLOB value limits on thin driver.

protected boolean
isBlob(Class<?> type)

INTERNAL: Used in writeLOB method only to identify a BLOB

protected boolean
isClob(Class<?> type)

INTERNAL: Used in writeLOB method only to identify a CLOB

public boolean
protected boolean
lobValueExceedsLimit(Object value)

INTERNAL: Return if the LOB value size is larger than the limit, i.e. 4k.

public void
setLobValueLimits(int lobValueLimits)

PUBLIC: Set the BLOB/CLOB value limits on thin driver.

public void
setShouldUseLocatorForLOBWrite(boolean usesLocatorForLOBWrite)

PUBLIC: Set if the locator is required for the LOB write.

public boolean
shouldUseCustomModifyForCall(DatabaseField field)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseCustomModifyForCall.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.shouldUseCustomModifyForCall.

INTERNAL Used by SQLCall.appendModify(..) If the field should be passed to customModifyInDatabaseCall, retun true, otherwise false.
public boolean
shouldUseLocatorForLOBWrite()

PUBLIC: Return if the locator is required for the LOB write.

public void
writeLOB(DatabaseField field, Object value, ResultSet resultSet, AbstractSession session)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeLOB.

INTERNAL: Write LOB value - only on Oracle8 and up
Inherited from org.eclipse.persistence.platform.database.OraclePlatform:
allowsSizeInProcedureArgumentsappendByteArrayappendCalendarappendDateappendTimeappendTimestampbuildCallWithReturningbuildFirstRowsHintbuildSelectQueryForIdentitybuildSelectQueryForSequenceObjectcanBuildCallWithReturningcanUnwrapOracleConnectioncheckTableExistsclearOracleConnectionCachecreateExpressionForexceptOperatorgetAssignmentStringgetBatchBeginStringgetBatchEndStringgetBatchRowCountAssignStringgetBatchRowCountDeclareStringgetBatchRowCountReturnStringgetDeclareBeginStringgetDropCascadeStringgetDropDatabaseSchemaStringgetINClauseLimitgetMaxFieldNameSizegetNativeTableInfogetObjectFromResultSetgetProcedureArgumentgetProcedureCallHeadergetProcedureCallTailgetSelectForUpdateStringgetSelectForUpdateWaitStringgetStoredProcedureParameterPrefixgetSystemChangeNumberQuerygetTableExistsQuerygetTimestampQuerygetVPDClearIdentifierQuerygetVPDCreationFunctionStringgetVPDCreationPolicyStringgetVPDDeletionStringgetVPDSetIdentifierQueryinitializeConnectionDatainitializePlatformOperatorsisAlterSequenceObjectSupportedisForUpdateCompatibleWithDistinctisLobCompatibleWithDistinctisLockTimeoutExceptionisOracleisRowCountOutputParameterRequiredlogOperatormaximumNumericValuesminimumNumericValuesoperatorLocateoperatorLocate2operatorOuterJoinoracleDateNameprintFieldNullClauseprintSQLSelectStatementregexpOperatorserverTimestampStringsetSupportsIdentityshouldPrintForUpdateClauseshouldPrintStoredProcedureArgumentNameInCallshouldUseJDBCOuterJoinSyntaxsupportsAutoConversionToNumericForArithmeticOperationssupportsIdentitysupportsSelectForUpdateNoWaitsupportsSequenceObjectssupportsStoredFunctionssupportsVPDsupportsWaitForUpdateunwrapOracleConnectionuseJDBCStoredProcedureSyntaxwasFailureCommunicationBased

Field Detail

lobValueLimitsback to summary
protected int lobValueLimits

The LOB value limits when the Locator is required for the writing

usesLocatorForLOBWriteback to summary
protected boolean usesLocatorForLOBWrite

Locator is required for Oracle thin driver to write LOB value exceeds the limits

Constructor Detail

Oracle8Platformback to summary
public Oracle8Platform()

Default constructor.

Method Detail

buildFieldTypesback to summary
protected Hashtable<Class<?>, FieldTypeDefinition> buildFieldTypes()

Overrides org.eclipse.persistence.platform.database.OraclePlatform.buildFieldTypes.

INTERNAL:

Annotations
@Override
copyIntoback to summary
public void copyInto(Platform platform)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.copyInto.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.copyInto.

INTERNAL: Allow for conversion from the Oracle type to the Java type.

Annotations
@Override
getConnectionback to summary
public Connection getConnection(AbstractSession session, Connection connection)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getConnection.

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

Annotations
@Override
getCustomModifyValueForCallback to summary
public Object getCustomModifyValueForCall(Call call, Object value, DatabaseField field, boolean shouldBind)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.getCustomModifyValueForCall.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.getCustomModifyValueForCall.

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.

Annotations
@Override
getLobValueLimitsback to summary
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.

isBlobback to summary
protected boolean isBlob(Class<?> type)

INTERNAL: Used in writeLOB method only to identify a BLOB

isClobback to summary
protected boolean isClob(Class<?> type)

INTERNAL: Used in writeLOB method only to identify a CLOB

isNativeConnectionRequiredForLobLocatorback to summary
public boolean isNativeConnectionRequiredForLobLocator()

Overrides org.eclipse.persistence.platform.database.OraclePlatform.isNativeConnectionRequiredForLobLocator.

INTERNAL: Indicates whether app. server should unwrap connection to use lob locator.

Annotations
@Override
lobValueExceedsLimitback to summary
protected boolean lobValueExceedsLimit(Object value)

INTERNAL: Return if the LOB value size is larger than the limit, i.e. 4k.

setLobValueLimitsback to summary
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.

setShouldUseLocatorForLOBWriteback to summary
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.

shouldUseCustomModifyForCallback to summary
public boolean shouldUseCustomModifyForCall(DatabaseField field)

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.shouldUseCustomModifyForCall.

Implements org.eclipse.persistence.internal.databaseaccess.Platform.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.

Annotations
@Override
shouldUseLocatorForLOBWriteback to summary
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.

writeLOBback to summary
public void writeLOB(DatabaseField field, Object value, ResultSet resultSet, AbstractSession session) throws SQLException

Overrides org.eclipse.persistence.internal.databaseaccess.DatabasePlatform.writeLOB.

INTERNAL: Write LOB value - only on Oracle8 and up

Annotations
@Override