Class ChunkColumnValues

java.lang.Object
io.debezium.connector.oracle.xstream.ChunkColumnValues

public class ChunkColumnValues extends Object
A simple wrapper class around a collection of ChunkColumnValues.
Author:
Chris Cranford
  • Field Details

    • values

      private final List<oracle.streams.ChunkColumnValue> values
    • size

      private long size
  • Constructor Details

    • ChunkColumnValues

      public ChunkColumnValues()
  • Method Details

    • getChunkType

      public int getChunkType()
      Gets the chunk type of the managed ChunkColumnValue instances.
      Returns:
      the chunk type of the values
      Throws:
      io.debezium.DebeziumException - if the method is called before adding at least one ChunkColumnValue.
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if there are no values, false if at least one value has been added.
    • add

      public void add(oracle.streams.ChunkColumnValue chunkColumnValue)
      Adds a chunk column value instance to this collection.
      Parameters:
      chunkColumnValue - the chunk column value to be added
    • getStringValue

      public String getStringValue() throws SQLException
      Returns:
      the chunk data as a string, may be null if the length of the data is zero.
      Throws:
      SQLException - if there is a database exception accessing the raw chunk value
    • getByteArray

      public byte[] getByteArray() throws SQLException
      Returns:
      the chunk data as a byte array, may be null if the length of the data is zero.
      Throws:
      SQLException - if there is a database exception accessing the raw chunk value
    • calculateChunkSize

      private int calculateChunkSize(oracle.streams.ChunkColumnValue chunkColumnValue)
      Calculates the size of the individual column chunk.
      Parameters:
      chunkColumnValue - a specific chunk of column data
      Returns:
      the size of the column chunk data
      Throws:
      io.debezium.DebeziumException - if there was a problem resolving the size of the column chunk data