public class ValidatingRecordConsumer extends RecordConsumer
| Constructor and Description |
|---|
ValidatingRecordConsumer(RecordConsumer delegate,
MessageType schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBinary(Binary value)
add a binary value in the current field
|
void |
addBoolean(boolean value)
add a boolean value in the current field
|
void |
addDouble(double value)
add a double value in the current field
|
void |
addFloat(float value)
add a float value in the current field
|
void |
addInteger(int value)
add an int value in the current field
|
void |
addLong(long value)
add a long value in the current field
|
void |
endField(String field,
int index)
end of a field in a group or message
|
void |
endGroup()
end of a group in a field
|
void |
endMessage()
end of a record
|
void |
startField(String field,
int index)
start of a field in a group or message
if the field is repeated the field is started only once and all values added in between start and end
|
void |
startGroup()
start of a group in a field
|
void |
startMessage()
start a new record
|
public ValidatingRecordConsumer(RecordConsumer delegate, MessageType schema)
delegate - the consumer to pass down the event toschema - the schema to validate againstpublic void startMessage()
startMessage in class RecordConsumerpublic void endMessage()
endMessage in class RecordConsumerpublic void startField(String field, int index)
startField in class RecordConsumerfield - name of the fieldindex - of the field in the group or messagepublic void endField(String field, int index)
endField in class RecordConsumerfield - name of the fieldindex - of the field in the group or messagepublic void startGroup()
startGroup in class RecordConsumerpublic void endGroup()
endGroup in class RecordConsumerpublic void addInteger(int value)
addInteger in class RecordConsumerpublic void addLong(long value)
addLong in class RecordConsumerpublic void addBoolean(boolean value)
addBoolean in class RecordConsumerpublic void addBinary(Binary value)
addBinary in class RecordConsumerpublic void addFloat(float value)
addFloat in class RecordConsumerpublic void addDouble(double value)
addDouble in class RecordConsumerCopyright © 2015 The Apache Software Foundation. All rights reserved.