| 
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.beanio.parser.NodeDefinition
org.beanio.parser.RecordDefinition
public abstract class RecordDefinition
A RecordDefinition is used to parse and format a record. Exception for record level validation, most of the work is delegated to a bean definition.
BeanDefinition| Constructor Summary | |
|---|---|
RecordDefinition()
Creates a new RecordDefinition.  | 
|
| Method Summary | |
|---|---|
 NodeDefinition | 
findDefinitionFor(Object bean)
Returns a record definition (i.e.  | 
 Object | 
formatBean(Object bean)
Formats a Java bean into a record (whose class type will depend on the type of stream and record writer being used).  | 
 BeanDefinition | 
getBeanDefinition()
Returns the bean definition used to parse and format this record.  | 
 List<NodeDefinition> | 
getChildren()
Returns a list of this node's children.  | 
 boolean | 
isRecordDefinition()
Returns true if this node is a leaf node, or in this case a record definition.  | 
 boolean | 
matches(Record record)
Test if a record matches this record definition.  | 
 Object | 
parseBean(Record record)
Validates and parses a record into a Java bean.  | 
 void | 
setBeanDefinition(BeanDefinition beanDefinition)
Sets the bean definition used to parse and format this record.  | 
 String | 
toString()
 | 
protected  void | 
validateRecord(Record record)
Performs record level validations.  | 
| Methods inherited from class org.beanio.parser.NodeDefinition | 
|---|
getMaxOccurs, getMinOccurs, getName, getOrder, setMaxOccurs, setMinOccurs, setName, setOrder | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public RecordDefinition()
| Method Detail | 
|---|
public final List<NodeDefinition> getChildren()
NodeDefinition
getChildren in class NodeDefinitionpublic final boolean isRecordDefinition()
NodeDefinition
isRecordDefinition in class NodeDefinitionpublic NodeDefinition findDefinitionFor(Object bean)
NodeDefinition
findDefinitionFor in class NodeDefinitionbean - the bean to format
public boolean matches(Record record)
record - the record to test
public Object parseBean(Record record)
                 throws InvalidRecordException
record - the record to parse
InvalidRecordExceptionprotected void validateRecord(Record record)
record - the record to validatepublic Object formatBean(Object bean)
bean - the bean to format
public BeanDefinition getBeanDefinition()
public void setBeanDefinition(BeanDefinition beanDefinition)
beanDefinition - the bean definitionpublic String toString()
toString in class Object
  | 
BeanIO 1.2.3 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||