|
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<ComponentConfig> org.beanio.internal.config.ComponentConfig org.beanio.internal.config.PropertyConfig
public abstract class PropertyConfig
A base class for configuration components that can be bound to a property of a bean object.
The following attributes are set during compilation, and are meant for internal use only:
Field Summary | |
---|---|
static String |
JSON_TYPE_ARRAY
|
static String |
JSON_TYPE_BOOLEAN
|
static String |
JSON_TYPE_NONE
|
static String |
JSON_TYPE_NUMBER
|
static String |
JSON_TYPE_OBJECT
|
static String |
JSON_TYPE_STRING
|
Fields inherited from class org.beanio.internal.config.ComponentConfig |
---|
CONSTANT, FIELD, GROUP, RECORD, SEGMENT, STREAM, WRAPPER |
Constructor Summary | |
---|---|
PropertyConfig()
Constructs a new PropertyConfig. |
Method Summary | |
---|---|
String |
getCollection()
Returns the collection type, or null if this component is not bound to a collection or array. |
String |
getGetter()
Returns the name of the getter method for retrieving this property's value from its parent bean object during marshalling. |
int |
getJsonArrayIndex()
Returns the index of this property in its parent JSON array. |
String |
getJsonName()
Returns the JSON field name if different that the property name. |
String |
getJsonType()
Returns the JSON type. |
String |
getKey()
Returns the name of the property descendant to use for the Map key when collection is set to map. |
Integer |
getMaxOccurs()
Returns the maximum number of times this component may consecutively appear in a stream. |
int |
getMaxSize()
Returns the maximum size of one occurrence of this component (based on its field length or the field length of its descendants). |
Integer |
getMinOccurs()
Returns the minimum number of times this component must appear in the stream. |
int |
getMinSize()
Returns the minimum size of this component (based on its field length or the field length of its descendants). |
Integer |
getPosition()
Returns the position of this component. |
String |
getSetter()
Returns the name of the setter method to use when setting this property's value on its parent bean object during unmarshalling. |
String |
getType()
Returns the fully qualified class name or type alias of this property. |
Integer |
getUntil()
Returns the excluded maximum position of this component which may be specified for components that repeat indefinitely, A negative number is counted from the end of the record. |
String |
getXmlType()
Returns the XML node type of this component. |
boolean |
isBound()
Returns whether this property is bound to its parent bean object. |
boolean |
isCollection()
Returns whether this component is bound to a collection or array. |
boolean |
isIdentifier()
Returns whether this component is used to identify a record during unmarshalling or a bean during marshalling. |
boolean |
isJsonArray()
Returns whether the property is mapped to a JSON array. |
boolean |
isLazy()
|
boolean |
isNillable()
Returns whether this component is nillable. |
boolean |
isRepeating()
Returns whether this component repeats in a stream. |
protected boolean |
isSupportedChild(ComponentConfig child)
Returns whether a node is a supported child of this node. |
void |
setBound(boolean bound)
Sets whether this property is bound to its parent bean object. |
void |
setCollection(String collection)
Sets the collection type. |
void |
setGetter(String getter)
Sets the name of the getter method for retrieving this property's value from it parent bean object during marshalling. |
void |
setIdentifier(boolean b)
Sets whether this component is used to identify a record during unmarshalling or a bean during marshalling. |
void |
setJsonArray(boolean jsonArray)
Sets whether this property is mapped to a JSON array. |
void |
setJsonArrayIndex(int jsonArrayIndex)
Sets the index of this property in its parent JSON array. |
void |
setJsonName(String jsonName)
Sets the JSON field name. |
void |
setJsonType(String jsonType)
Sets the JSON type. |
void |
setMaxOccurs(Integer maxOccurs)
Sets the maximum number of times this component may consecutively appear in a stream. |
void |
setMaxSize(int maxSize)
Sets the maximum size of one occurrence of this component (based on its field length or the field length of its descendants). |
void |
setMinOccurs(Integer minOccurs)
Sets the minimum number of times this component must consecutively appear in a stream. |
void |
setMinSize(int minSize)
Sets the minimum size of this component (based on its field length or the field length of its descendants). |
void |
setNillable(boolean nillable)
Sets whether this component is nillable. |
void |
setPosition(Integer position)
Sets the position of this component. |
void |
setSetter(String setter)
Sets the name of the setter method to use when setting this property's value on its parent bean object during unmarshalling. |
void |
setType(String type)
Sets the fully qualified class name or type alias of this property. |
void |
setUntil(Integer until)
Sets the excluded maximum position of this component which may be specified for components that repeat indefinitely, A negative number is counted from the end of the record. |
void |
setXmlType(String xmlType)
Sets the XML node type of this component. |
Methods inherited from class org.beanio.internal.config.ComponentConfig |
---|
getComponentType, getXmlName, getXmlNamespace, getXmlPrefix, isXmlNamespaceAware, setXmlName, setXmlNamespace, setXmlNamespaceAware, setXmlPrefix |
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 |
Field Detail |
---|
public static final String JSON_TYPE_NONE
public static final String JSON_TYPE_ARRAY
public static final String JSON_TYPE_OBJECT
public static final String JSON_TYPE_BOOLEAN
public static final String JSON_TYPE_NUMBER
public static final String JSON_TYPE_STRING
Constructor Detail |
---|
public PropertyConfig()
Method Detail |
---|
public String getType()
public void setType(String type)
type
- the class name of this property valuepublic String getGetter()
public void setGetter(String getter)
getter
- the getter method for this propertypublic String getSetter()
public void setSetter(String setter)
setter
- the setter method for this propertypublic boolean isBound()
public void setBound(boolean bound)
bound
- true if bound, false otherwisepublic Integer getPosition()
For delimited record formats, the position is the index (beginning at 0) of this component in the record. For fixed length record formats, the position is the index of the first character in the component.
A negative number is counted from the end of the record.
public void setPosition(Integer position)
For delimited record formats, the position is the index (beginning at 0) of this component in the record. For fixed length record formats, the position is the index of the first character in the component.
position
- the field positionpublic Integer getUntil()
public void setUntil(Integer until)
until
- the maximum positionpublic String getCollection()
public void setCollection(String collection)
collection
- the collection typepublic Integer getMinOccurs()
public void setMinOccurs(Integer minOccurs)
minOccurs
- the minimum occurrences of this componentpublic Integer getMaxOccurs()
public void setMaxOccurs(Integer maxOccurs)
maxOccurs
- the maximum occurrences of this component, or -1 to
indicate no limitpublic String getXmlType()
XmlTypeConstants
public void setXmlType(String xmlType)
xmlType
- the XML node typeXmlTypeConstants
public boolean isNillable()
public void setNillable(boolean nillable)
nillable
- true if this component is nillablepublic String getJsonName()
public void setJsonName(String jsonName)
jsonName
- the JSON field namepublic String getJsonType()
public void setJsonType(String jsonType)
jsonType
- the JSON typepublic boolean isJsonArray()
public void setJsonArray(boolean jsonArray)
jsonArray
- true if this property is mapped to a JSON array, false otherwisepublic int getJsonArrayIndex()
public void setJsonArrayIndex(int jsonArrayIndex)
jsonArrayIndex
- the array index, or -1 if not applicablepublic boolean isIdentifier()
public void setIdentifier(boolean b)
b
- true if this component is used for identificationpublic int getMinSize()
public void setMinSize(int minSize)
minSize
- the minimum size of this componentpublic int getMaxSize()
public void setMaxSize(int maxSize)
maxSize
- the maximum size of this componentpublic boolean isCollection()
public boolean isRepeating()
public String getKey()
protected boolean isSupportedChild(ComponentConfig child)
TreeNode
TreeNode.add(TreeNode)
.
isSupportedChild
in class TreeNode<ComponentConfig>
child
- the node to test
public boolean isLazy()
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |