Class RetrievalCriteria
java.lang.Object
io.debezium.ibmi.db2.journal.retrieve.RetrievalCriteria
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final AS400DataType[]private static final AS400Textprivate static final AS400Textprivate static final AS400Textprivate static final AS400Bin4private static final org.slf4j.Loggerprivate ArrayList<AS400DataType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void_withJrnCde(int count, String codes) private voidaddStructureData(RetrievalCriteria.RetrieveKey rKey, AS400DataType valueType, Object value) Add additional selection entry to two ArrayList: structure and data.Object[]voidreset()voidwithEnd()voidwithEnd(BigInteger value) voidAdd retrieval criteria 08: journal entry types.voidwithFILE(List<FileFilter> fileFilters) Add retrieval criteria 16: FILE.voidAdd retrieval criteria 02: starting sequence number.voidwithFromEnt(BigInteger value) Add retrieval criteria 02: starting sequence number.voidwithJrnCde(RetrievalCriteria.JournalCode[] value) Add retrieval criteria 07: journal codes.voidprivate voidwithMaxEntriesToReturn(Integer value) Add retrieval criteria 06: max number of entries to retrieve.voidwithNullPointerIndicatorLength(int value) voidwithReceiverRange(String value) Add retrieval criteria 01: range of journal receivers.voidwithReceiverRange(String startReceiver, String startLibrary, String endReceiver, String endLibrary) void
-
Field Details
-
AS400_DATA_TYPES_2
-
AS400_TEXT_20
-
AS400_TEXT_10
-
AS400_TEXT_40
-
log
private static final org.slf4j.Logger log -
BIN4
-
structure
-
data
-
-
Constructor Details
-
RetrievalCriteria
public RetrievalCriteria()
-
-
Method Details
-
getStructure
-
getObject
-
withReceiverRange
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
-
withLenNullPointerIndicatorVarLength
public void withLenNullPointerIndicatorVarLength() -
withNullPointerIndicatorLength
public void withNullPointerIndicatorLength(int value) -
withFromEnt
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
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
-
withMaxEntriesToReturn
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
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
-
withEntTyp
Add retrieval criteria 08: journal entry types.- Parameters:
value-
-
withFILE
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-
-