public class BufferCompare
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BufferCompare.Mode
Comparison mode types
|
Modifier and Type | Field and Description |
---|---|
private DataModelObject |
dmo1
"Left" object of the comparison
|
private DataModelObject |
dmo2
"Right" object of the comparison
|
private boolean |
exclusive
true if fields should be excluded; false for them to be included |
private boolean |
exhaustive
true to compare all fields; false to halt at the first difference |
private java.lang.String[] |
fields
Optional field names to include or exclude from comparison
|
private BufferCompare.Mode |
mode
Comparison mode
|
private boolean |
noLobs
true to skip any LOBs when performing comparison; false to include them |
private Accessor |
resultDelegate
Delegate which sets the results of the comparison into a results object
|
Constructor and Description |
---|
BufferCompare(DataModelObject dmo1,
DataModelObject dmo2)
Constructor which accepts DMOs to compare.
|
Modifier and Type | Method and Description |
---|---|
BufferCompare |
binary()
Configure a binary comparison.
|
BufferCompare |
caseSensitive()
Configure a case-sensitive comparison (only relevant for character and CLOB fields).
|
BufferCompare |
except(java.lang.String... fields)
Exclude the given fields from the comparison.
|
BufferCompare |
noLobs()
Exclude any LOB fields from the comparison.
|
void |
run()
Perform the comparison.
|
BufferCompare |
saveResultIn(character target)
Set the target object into which a text result of the comparison will be stored.
|
BufferCompare |
saveResultIn(FieldReference target)
Set the target field into which a result of the comparison will be stored.
|
BufferCompare |
saveResultIn(logical target)
Set the target object into which a boolean result of the comparison will be stored.
|
BufferCompare |
using(java.lang.String... fields)
Include only the given fields for the comparison.
|
private final DataModelObject dmo1
private final DataModelObject dmo2
private boolean exclusive
true
if fields
should be excluded; false
for them to be includedprivate boolean exhaustive
true
to compare all fields; false
to halt at the first differenceprivate java.lang.String[] fields
private BufferCompare.Mode mode
private Accessor resultDelegate
private boolean noLobs
true
to skip any LOBs when performing comparison; false
to include thempublic BufferCompare(DataModelObject dmo1, DataModelObject dmo2)
dmo1
- "Left" object of the comparison.dmo2
- "Right" object of the comparison.public BufferCompare except(java.lang.String... fields)
#noLobs()
was invoked).fields
- List of legacy field names to exclude.public BufferCompare using(java.lang.String... fields)
fields
- List of legacy field names to include.public BufferCompare caseSensitive()
public BufferCompare binary()
public BufferCompare saveResultIn(logical target)
true
if all compared fields matched; else false
.target
- Result target.public BufferCompare saveResultIn(character target)
target
- Result target.public BufferCompare saveResultIn(FieldReference target)
logical
or character
. If logical
, the result will be
true
if all compared fields matched; else false
. If character
, the
result will be a list of the names of legacy fields, if any, whose values did not match.target
- Result target.public BufferCompare noLobs()
public void run()
new BufferCompare(dmo1, dmo2)
.