Class RetrievalCriteria

java.lang.Object
io.debezium.ibmi.db2.journal.retrieve.RetrievalCriteria

public class RetrievalCriteria extends Object
Inner class representing Journal Entry to Retrieve section. Mainly used to encode the following: a. Binary(4) - Number of Variable Length Records b1. Binary(4) - Length of Variable Length Record - length(b1+b2+b3+b4) b2. Binary(4) - Key b3. Binary(4) - Length of Data - length(b4) b4. Char(*) - Data To see an example using AS400Structure for a composite type of data types: http://publib.boulder.ibm.com/html/as400/java/rzahh115.htm#HDRRZAHH-COMEX TODO optimise so we don't have to rebuild entire thing for every offset
Author:
loosely based off work by Stanley
  • Field Details

    • AS400_DATA_TYPES_2

      private static final AS400DataType[] AS400_DATA_TYPES_2
    • AS400_TEXT_20

      private static final AS400Text AS400_TEXT_20
    • AS400_TEXT_10

      private static final AS400Text AS400_TEXT_10
    • AS400_TEXT_40

      private static final AS400Text AS400_TEXT_40
    • log

      private static final org.slf4j.Logger log
    • BIN4

      private static final AS400Bin4 BIN4
    • structure

      private ArrayList<AS400DataType> structure
    • data

      private ArrayList<Object> data
  • Constructor Details

    • RetrievalCriteria

      public RetrievalCriteria()
  • Method Details

    • getStructure

      public AS400DataType[] getStructure()
    • getObject

      public Object[] getObject()
    • withReceiverRange

      public void withReceiverRange(String value)
      Add retrieval criteria 01: range of journal receivers. This can be used to indicate where to start when previous returned continuation handle='1'.
      Parameters:
      value -
    • withReceiverRange

      public void withReceiverRange(String startReceiver, String startLibrary, String endReceiver, String endLibrary)
    • withLenNullPointerIndicatorVarLength

      public void withLenNullPointerIndicatorVarLength()
    • withNullPointerIndicatorLength

      public void withNullPointerIndicatorLength(int value)
    • withFromEnt

      public void withFromEnt(RetrievalCriteria.FromEnt value)
      Add retrieval criteria 02: starting sequence number. This can be used to indicate where to start when previous returned continuation handle='1'.
      Parameters:
      value -
    • withFromEnt

      public void withFromEnt(BigInteger value)
      Add retrieval criteria 02: starting sequence number. This can be used to indicate where to start when previous returned continuation handle='1'.
      Parameters:
      value -
    • withStart

      public void withStart()
    • withEnd

      public void withEnd()
    • withEnd

      public void withEnd(BigInteger value)
    • withMaxEntriesToReturn

      private void withMaxEntriesToReturn(Integer value)
      Add retrieval criteria 06: max number of entries to retrieve. This indicates the 'max' number of entries to retrieve, not number of entries retrieved in this call.
      Parameters:
      eKey -
      value -
    • withJrnCde

      public void withJrnCde(RetrievalCriteria.JournalCode[] value)
      Add retrieval criteria 07: journal codes. Input parameter must be one of the below: - *ALL (String). - *CTL (String). - JournalCode[] to hold all the desired journal codes to retrieve. Currently only '*ALLSLT' is implemented if JournalCode[] is passed in.
      Parameters:
      value -
    • _withJrnCde

      private void _withJrnCde(int count, String codes)
    • withEntTyp

      public void withEntTyp(RetrievalCriteria.JournalEntryType[] range)
      Add retrieval criteria 08: journal entry types.
      Parameters:
      value -
    • withFILE

      public void withFILE(List<FileFilter> fileFilters)
      Add retrieval criteria 16: FILE. Input parameter must be one of the BINARY(4) Number in array Note: These fields repeat for each file member. CHAR(10) File name CHAR(10) Library name CHAR(10) Member name
      Parameters:
      fileFilters -
    • reset

      public void reset()
    • addStructureData

      private void addStructureData(RetrievalCriteria.RetrieveKey rKey, AS400DataType valueType, Object value)
      Add additional selection entry to two ArrayList: structure and data.
      Parameters:
      rKey -
      dataType -
      value -