|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.util.TreeNode<Component> org.beanio.internal.parser.Component org.beanio.internal.parser.ParserComponent org.beanio.internal.parser.DelegatingParser org.beanio.internal.parser.RecordAggregation org.beanio.internal.parser.RecordCollection
public class RecordCollection
A Parser
tree component for parsing a collection of bean objects, where
a bean object is mapped to a Record
or Group
.
A RecordCollection supports a single Record
or Group
child.
Field Summary |
---|
Fields inherited from class org.beanio.internal.parser.RecordAggregation |
---|
value |
Fields inherited from interface org.beanio.internal.parser.Selector |
---|
COUNT_KEY |
Fields inherited from interface org.beanio.internal.parser.Property |
---|
AGGREGATION_ARRAY, AGGREGATION_COLLECTION, AGGREGATION_MAP, COLLECTION, COMPLEX, MAP, SIMPLE |
Constructor Summary | |
---|---|
RecordCollection()
Constructs a new RecordCollection. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.beanio.internal.parser.RecordAggregation |
---|
clearValue, close, createAggregationType, createValue, defines, getAccessor, getCount, getMaxOccurs, getMinOccurs, getNullValue, getOrder, getProperty, getSelector, getType, getValue, isIdentifier, isMaxOccursReached, isRecordGroup, isSupportedChild, matchAny, matchNext, matchNext, registerLocals, reset, restoreState, setAccessor, setCount, setIdentifier, setType, skip, updateState |
Methods inherited from class org.beanio.internal.parser.DelegatingParser |
---|
getParser, getSize, isLazy, matches |
Methods inherited from class org.beanio.internal.util.TreeNode |
---|
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.beanio.internal.parser.Parser |
---|
getName, getSize, isLazy, matches |
Methods inherited from interface org.beanio.internal.parser.Property |
---|
getName |
Constructor Detail |
---|
public RecordCollection()
Method Detail |
---|
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
Property.SIMPLE
, Property.COMPLEX
, Property.AGGREGATION_ARRAY
, Property.COLLECTION
,
Property.AGGREGATION_COLLECTION
, or Property.MAP
public boolean hasContent(ParsingContext context)
Parser
hasContent
in interface Parser
hasContent
in class DelegatingParser
context
- the ParsingContext
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |