public class RecordCollection extends RecordAggregation
Parser
tree component for parsing a collection of bean objects, where
a bean object is mapped to a Record
or Group
.
lazy, value
AGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE
Constructor and Description |
---|
RecordCollection()
Constructs a new RecordCollection.
|
Modifier and Type | Method and Description |
---|---|
protected Collection<Object> |
getCollection(ParsingContext context)
Returns the collection value being parsed.
|
boolean |
hasContent(ParsingContext context)
Returns whether this parser or any of its descendant have content for marshalling.
|
boolean |
marshal(MarshallingContext context)
Marshals a record.
|
void |
setValue(ParsingContext context,
Object value)
Sets the property value for marshaling.
|
int |
type()
Returns the property type.
|
boolean |
unmarshal(UnmarshallingContext context)
Unmarshals a record.
|
clearValue, close, createAggregationType, createValue, defines, getAccessor, getCount, getMaxOccurs, getMinOccurs, getNullValue, getOrder, getProperty, getSelector, getType, getValue, isIdentifier, isLazy, isMaxOccursReached, isRecordGroup, isSupportedChild, matchAny, matchNext, matchNext, registerLocals, reset, restoreState, setAccessor, setCount, setIdentifier, setLazy, setType, skip, toParamString, updateState
getParser, getSize, isOptional, matches
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toString, updateReferences
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getSize, isOptional, matches
forEach, spliterator
public boolean unmarshal(UnmarshallingContext context)
Parser
unmarshal
in interface Parser
unmarshal
in class DelegatingParser
context
- the UnmarshallingContext
public boolean marshal(MarshallingContext context) throws IOException
Parser
marshal
in interface Parser
marshal
in class DelegatingParser
context
- the MarshallingContext
IOException
- if an I/O error occurspublic void setValue(ParsingContext context, Object value)
Parser
setValue
in interface Parser
setValue
in interface Property
setValue
in class RecordAggregation
context
- the ParsingContext
value
- the property valueprotected Collection<Object> getCollection(ParsingContext context)
context
- the ParsingContext
Collection
public int type()
Property
public boolean hasContent(ParsingContext context)
Parser
hasContent
in interface Parser
hasContent
in class DelegatingParser
context
- the ParsingContext