|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.parser.PropertyDefinition org.beanio.parser.BeanPropertyDefinition
public class BeanPropertyDefinition
This property definition is used to define a constant bean property value that does not directly map to any field in an input or output stream. This allows a bean property to be populated based on record identification during unmarshalling. Or likewise during marshalling, for a bean property value that is not mapped to a stream field to identify the mapping definition.
Field Summary |
---|
Fields inherited from class org.beanio.parser.PropertyDefinition |
---|
INVALID, MISSING |
Constructor Summary | |
---|---|
BeanPropertyDefinition()
Constructs a new BeanPropertyDefinition. |
Method Summary | |
---|---|
boolean |
defines(Object propertyValue)
Tests whether this definition is used to map the given bean or property value. |
Object |
getValue()
Returns the property value. |
boolean |
isConstant()
Returns whether this property describes a constant value and does not map to field found in the stream. |
boolean |
matches(Record record)
Tests if the field text in the record matches this field definition. |
protected Object |
parsePropertyValue(Record record)
Parses and validates a field property value from the record. |
void |
setValue(Object value)
Sets the property value. |
Methods inherited from class org.beanio.parser.PropertyDefinition |
---|
getCollectionType, getLength, getMaxOccurs, getMinOccurs, getName, getParent, getPropertyDescriptor, getPropertyType, isArray, isBean, isCollection, isField, isLazy, isProperty, isRecordIdentifier, parseValue, setCollectionType, setLazy, setLength, setMaxOccurs, setMinOccurs, setName, setParent, setProperty, setPropertyDescriptor, setPropertyType, setRecordIdentifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanPropertyDefinition()
Method Detail |
---|
public boolean isConstant()
PropertyDefinition
isConstant
in class PropertyDefinition
public boolean matches(Record record)
PropertyDefinition
matches
in class PropertyDefinition
record
- the record containing the field to test
public boolean defines(Object propertyValue)
PropertyDefinition
defines
in class PropertyDefinition
propertyValue
- the bean or property value to test
protected Object parsePropertyValue(Record record)
PropertyDefinition
parsePropertyValue
in class PropertyDefinition
record
- the record to parse
PropertyDefinition.INVALID
if the field was invalid,
or PropertyDefinition.MISSING
if the field was not present in the recordpublic Object getValue()
public void setValue(Object value)
value
- the property value
|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |