public class DelimitedMarshallingContext extends MarshallingContext
MarshallingContext
for delimited records.MARSHALLING, UNMARSHALLING
Constructor and Description |
---|
DelimitedMarshallingContext()
Constructs a new DelimitedMarshallingContext.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear is invoked after each bean object (record or group) is marshalled.
|
Object |
getRecordObject()
Returns the record object to pass to the
RecordWriter when
MarshallingContext.writeRecord() is called. |
void |
setField(int position,
String fieldText,
boolean commit)
Puts the field text in the record.
|
String[] |
toArray(Object record)
Converts a record object to a String[].
|
List<String> |
toList(Object record)
Converts a record object to a
List . |
getBean, getComponentName, getMode, getRecordWriter, setBean, setComponentName, setRecordWriter, toDocument, writeRecord
createHeap, getAdjustedFieldPosition, getLocal, getRelativeFieldIndex, isRepeating, popIteration, pushIteration, setLocal
public DelimitedMarshallingContext()
public void clear()
MarshallingContext
clear
in class MarshallingContext
public void setField(int position, String fieldText, boolean commit)
position
- the position of the field in the record.fieldText
- the field textcommit
- true to commit the current record, or false
if the field is optional and should not extend the record
unless a subsequent field is later appended to the recordpublic Object getRecordObject()
MarshallingContext
RecordWriter
when
MarshallingContext.writeRecord()
is called.getRecordObject
in class MarshallingContext
public String[] toArray(Object record)
MarshallingContext
toArray
in class MarshallingContext
record
- the record object to convertpublic List<String> toList(Object record)
MarshallingContext
List
.toList
in class MarshallingContext
record
- the record object to convertList
result, or null if not supported