Top Description Fields Constructors Methods
org.eclipse.persistence.internal.helper

public Class LOBValueWriter

extends Object
Class Inheritance
Imports
java.sql.ResultSet, .SQLException, java.util.ArrayList, .Collection, .Enumeration, .Iterator, .Vector, org.eclipse.persistence.expressions.Expression, org.eclipse.persistence.internal.databaseaccess.Accessor, .DatabaseAccessor, .DatabaseCall, .DatabasePlatform, org.eclipse.persistence.internal.expressions.ForUpdateClause, .SQLSelectStatement, org.eclipse.persistence.internal.sessions.AbstractSession, org.eclipse.persistence.platform.database.OraclePlatform, org.eclipse.persistence.queries.Call, .DatabaseQuery, .ObjectBuildingQuery, .WriteObjectQuery

INTERNAL:

Purpose:LOBValueWriter is used to write a large size of object into an Oracle CLOB/BLOB column through Oracle LOB Locator. It's a work-around object for the well-known 4k write limits on an Oracle thin driver.

Responsibilities:

Author
King Wang
Since
TopLink/Java 5.0. July 2002.

Field Summary

Modifier and TypeField and Description
private Accessor
private Collection<DatabaseCall>
private boolean

Constructor Summary

AccessConstructor and Description
public
LOBValueWriter(Accessor accessor)

This is the default constructor for the class.

Method Summary

Modifier and TypeMethod and Description
public void
addCall(Call call)

Add original (insert or update) call to the collection

protected void
public void
buildAndExecuteSelectCalls(AbstractSession session)

Build and execute the deferred select calls.

private DatabaseCall
buildCallFromSelectStatementForLocator(SQLSelectStatement selectStatement, WriteObjectQuery writeQuery, DatabaseCall dbCall, AbstractSession session)

Build the sql call from the select statement for selecting the locator

private SQLSelectStatement
buildSelectStatementForLocator(WriteObjectQuery writeQuery, DatabaseCall call, AbstractSession session)

Build the select statement for selecting the locator

public void
fetchLocatorAndWriteValue(DatabaseCall dbCall, Object resultSet)

Fetch the locator(s) from the result set and write LOB value to the table

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessorback to summary
private Accessor accessor
callsback to summary
private Collection<DatabaseCall> calls
isNativeConnectionRequiredback to summary
private boolean isNativeConnectionRequired

Constructor Detail

LOBValueWriterback to summary
public LOBValueWriter(Accessor accessor)

This is the default constructor for the class. Bug 2804663 - Each DatabaseAccessor will now hold on to its own instance of this class, hence a singleton pattern is not applicable.

Method Detail

addCallback to summary
public void addCall(Call call)

Add original (insert or update) call to the collection

buildAndExecuteCallback to summary
protected void buildAndExecuteCall(DatabaseCall dbCall, AbstractSession session)
buildAndExecuteSelectCallsback to summary
public void buildAndExecuteSelectCalls(AbstractSession session)

Build and execute the deferred select calls.

buildCallFromSelectStatementForLocatorback to summary
private DatabaseCall buildCallFromSelectStatementForLocator(SQLSelectStatement selectStatement, WriteObjectQuery writeQuery, DatabaseCall dbCall, AbstractSession session)

Build the sql call from the select statement for selecting the locator

buildSelectStatementForLocatorback to summary
private SQLSelectStatement buildSelectStatementForLocator(WriteObjectQuery writeQuery, DatabaseCall call, AbstractSession session)

Build the select statement for selecting the locator

fetchLocatorAndWriteValueback to summary
public void fetchLocatorAndWriteValue(DatabaseCall dbCall, Object resultSet) throws SQLException

Fetch the locator(s) from the result set and write LOB value to the table