| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Property
The Property interface is implemented by parser components capable of storing a property value.
| Field Summary | |
|---|---|
| static int | AGGREGATION_ARRAYThe array property type | 
| static int | AGGREGATION_COLLECTIONThe collection property type used to aggregate multiple occurrences of a single property | 
| static int | AGGREGATION_MAPThe map property type used to aggregate multiple occurrences of key/value pairs | 
| static int | COLLECTIONThe collection property type used to create a collection of other properties | 
| static int | COMPLEXThe bean object property type with simple properties and other bean objects for attributes | 
| static int | MAPThe map property type | 
| static int | SIMPLEThe simple property type that cannot hold other properties | 
| Method Summary | |
|---|---|
|  void | clearValue(ParsingContext context)Clears the property value. | 
|  Object | createValue(ParsingContext context)Creates the property value and returns it. | 
|  boolean | defines(Object value) | 
|  PropertyAccessor | getAccessor() | 
|  String | getName()Returns the property name as configured in the mapping file. | 
|  Class<?> | getType() | 
|  Object | getValue(ParsingContext context)Returns the value of this property. | 
|  boolean | isIdentifier()Returns whether this property or any of its descendants are used to identify a bean object. | 
|  void | setAccessor(PropertyAccessor accessor) | 
|  void | setIdentifier(boolean identifier) | 
|  void | setType(Class<?> type) | 
|  void | setValue(ParsingContext context,
         Object value)Sets the property value (before marshalling). | 
|  int | type()Returns the property type. | 
| Field Detail | 
|---|
static final int SIMPLE
static final int COMPLEX
static final int COLLECTION
static final int MAP
static final int AGGREGATION_ARRAY
static final int AGGREGATION_COLLECTION
static final int AGGREGATION_MAP
| Method Detail | 
|---|
int type()
SIMPLE, COMPLEX, AGGREGATION_ARRAY, COLLECTION, 
   AGGREGATION_COLLECTION, or MAPString getName()
void clearValue(ParsingContext context)
getValue(ParsingContext) should
 return null, or Value.MISSING for lazy property values.
context - the ParsingContextObject createValue(ParsingContext context)
context - the ParsingContext
Object getValue(ParsingContext context)
When unmarshalling, this method should return Value.MISSING if the field
 was not present in the stream.  Or if present, but has no value, null should be returned.  
 
 
When marshalling, this method should return Value.MISSING for any optional
 segment bound to a bean object, or null if required.  Null field properties should 
 always return Value.MISSING.
context - the ParsingContext
Value.MISSING if not present in the stream,
   or Value.INVALID if the field was invalid
void setValue(ParsingContext context,
              Object value)
context - the ParsingContextvalue - the property valueboolean defines(Object value)
boolean isIdentifier()
void setIdentifier(boolean identifier)
PropertyAccessor getAccessor()
void setAccessor(PropertyAccessor accessor)
Class<?> getType()
void setType(Class<?> type)
| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||