Class LOBValueWriter


  • public class LOBValueWriter
    extends Object
    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:

    • Build the Oracle empty lob method call string for the insert call.
    • Build the minimal SELECT call to retrieve the locator.
    • Write the lob value through the locator.
    • Resolve the multiple table INSERT/SELECT orders.
    • Resolve the nested unit of work commit issue.
    Since:
    TopLink/Java 5.0. July 2002.
    Author:
    King Wang
    • Constructor Detail

      • LOBValueWriter

        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

      • fetchLocatorAndWriteValue

        public void fetchLocatorAndWriteValue​(DatabaseCall dbCall,
                                              Object resultSet)
                                       throws SQLException
        Fetch the locator(s) from the result set and write LOB value to the table
        Throws:
        SQLException
      • addCall

        public void addCall​(Call call)
        Add original (insert or update) call to the collection
      • buildAndExecuteSelectCalls

        public void buildAndExecuteSelectCalls​(AbstractSession session)
        Build and execute the deferred select calls.