Interface ChunkColumnValue

  • All Superinterfaces:
    ColumnValue
    All Known Implementing Classes:
    DefaultChunkColumnValue

    public interface ChunkColumnValue
    extends ColumnValue
    The ChunkColumnValue interface encapsulates the information about a LOB, LONG, XMLTYPE or OSON (Oracle binary JSON format) column in a RowLCR. This interface allows large column data to be divided into small chunks and streamed.
    You can have a customized implementation of ChunkColumnValue by implementing this interface.

    See Also:
    RowLCR
    • Method Detail

      • getChunkType

        int getChunkType()
        Gets the chunk type.
        The chunk type indicates the type of the column that contains data that can be split into multiple chunks. Valid values are: BLOB, CLOB, NCLOB, XMLTYPE and OSON (Oracle binary JSON format).
        Returns:
        an integer that contains the chunk type as defined in this interface
      • getChunkOffset

        java.math.BigInteger getChunkOffset()
        Gets the chunk operation offset.
        This method obtains the offset information for piecewise LOB operations. For DML operations, NULL is returned.
        If there are multiple chunks for one LOB WRITE operation, then only the offset of the first chunk is relevant.
        Returns:
        a BigInteger that contains the chunk operation offset
      • getChunkOperationSize

        java.math.BigInteger getChunkOperationSize()
        Gets the chunk operation size.
        This method obtains the size information for piecewise LOB operations LOB TRIM and LOB ERASE. For other operations, NULL is returned.
        The chunk operation size is the number of bytes(for BLOBs) or characters (for CLOBs or NCLOBs).
        Returns:
        a BigInteger that contains the chunk operation size
      • getCharSetId

        int getCharSetId()
        Gets the chunk character set ID. This is only for XMLTTPE chunk
        The character set ID indicates the character set used to interpret the XMLTYPE chunk data.
        Check oracle.sql.CharacterSet for definition of Oracle CharacterSet ID.
        Returns:
        an integer that indicates the character set
      • getUpdatedRowId

        oracle.sql.Datum getUpdatedRowId()
        Gets the updated rowid after receiving all chunks for the row.
        The updated rowid is in oracle.sql.CHAR format. It is available only when the chunk is the end of the entire row, otherwise it will be null.
        Returns:
        an datum object that contains the updated rowid for the row
      • setUpdatedRowId

        void setUpdatedRowId​(oracle.sql.Datum updatedRowId)
        Updates the rowid when chunk is the end of row.
        Parameters:
        updatedRowId - The updated rowid after all chunks of the row
      • setChunkType

        void setChunkType​(int chunkType)
                   throws StreamsException
        Sets the chunk type.
        The chunk type specifies the type of the column that contains data that can be split into mutliple chunks. Valid values are: BLOB, CLOB, NCLOB, XMLTYPE and OSON (Oracle binary JSON format).
        Parameters:
        chunkType - The chunk type as defined in this interface
        Throws:
        StreamsException - is thrown if chunk type is invalid.
      • setChunkOffset

        void setChunkOffset​(java.math.BigInteger chunkOffset)
        Sets the chunk operation offset.
        Use this method for a piecewise LOB operation in which the operation offset indicates the starting point for the LOB operation. The offset value starts from 1.
        Parameters:
        chunkOffset - The chunk operation offset
      • setChunkOperationSize

        void setChunkOperationSize​(java.math.BigInteger chunkOperationSize)
        Sets the chunk operation size.
        Use this method for a piecewise LOB operation where the size is the amount of data to be erased in the case of LOB ERASE or the trim size in the case of LOB TRIM. The chunk operation size is the number of bytes(for BLOBs) or characters (for CLOBs and NCLOBs).
        Parameters:
        chunkOperationSize - The chunk operation size
      • isLastChunk

        boolean isLastChunk()
        Indicates whether the chunk is the last one for the column.
        Returns:
        a boolean flag indicates if this is the last chunk
      • isEmptyChunk

        boolean isEmptyChunk()
        Indicates whether the chunk is empty. For a LOB column, an empty LOB is different than a column containing NULL value.
        Returns:
        a boolean flag indicates if this is an empty chunk
      • isXMLDiff

        boolean isXMLDiff()
        Indicates whether the XMLType chunk is an XMLDiff.
        Returns:
        a boolean flag indicates if this is an XMLDiff.
      • isJSONDiff

        boolean isJSONDiff()
        Indicates whether the JSON chunk is JSONDiff
        Returns:
        a boolean that indicates if this is a JSONDiff
      • isEndOfRow

        boolean isEndOfRow()
        Indicates whether the chunk is the end of the entire row change.
        This indicates if the chunk is the last chunk for the last column in an LCR.
        Returns:
        a boolean flag indicates if this is the end of row change.
      • setEmptyChunk

        void setEmptyChunk​(boolean emptyChunk)
        Sets the empty chunk flag.
        This flag indicates whether the chunk contains an empty LOB. For a LOB column, an empty LOB is different than a NULL value. Use this method to indicate whether this column contains an empty LOB.
        Parameters:
        emptyChunk - The empty chunk flag
      • setXMLDiff

        void setXMLDiff​(boolean xmlDiff)
        Sets the XMLDiff flag.
        This flag indicates whether the XMLType chunk is an XMLDiff.
        Parameters:
        xmlDiff - The XMLDiff flag
      • setJSONDiff

        void setJSONDiff​(boolean jsonDiff)
        Sets the JSONDiff flag
        Parameters:
        jsonDiff - The JSONDiff flag
      • setLastChunk

        void setLastChunk​(boolean lastChunk)
        Sets the last chunk flag.
        This flag indicates whether the chunk is the last one for the current column.
        Parameters:
        lastChunk - The last chunk flag
      • setEndOfRow

        void setEndOfRow​(boolean endOfRow)
        Sets the endOfRow chunk flag.
        This flag indicates whether the chunk is the last one for the last column in an LCR, which also indicates the end of entire row change.
        Parameters:
        endOfRow - The endOfRow chunk flag
      • setCharSetId

        void setCharSetId​(int charSetId)
        Sets the character set ID for an XMLTYPE chunk.
        Check oracle.sql.CharacterSet for definition of Oracle CharacterSet ID.
        Parameters:
        charSetId - The character set id