public abstract class PropertyConfig extends ComponentConfig
The following attributes are set during compilation, and are meant for internal use only:
Modifier and Type | Field and Description |
---|---|
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 |
Constructor and Description |
---|
PropertyConfig()
Constructs a new PropertyConfig.
|
Modifier and Type | Method and Description |
---|---|
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.
|
String |
getLabel()
Returns the component name used for identification in error handling.
|
Integer |
getMaxOccurs()
Returns the maximum number of times this component may consecutively appear in
a stream.
|
Integer |
getMaxOccursRef()
Returns the maximum allowed value of the referenced occurs field.
|
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.
|
Integer |
getMinOccursRef()
Returns the minimum required value of the referenced occurs field.
|
int |
getMinSize()
Returns the minimum size of this component (based on its field length
or the field length of its descendants).
|
String |
getOccursRef()
Returns the name of a field in the same record that indicates the number
of occurrences for this component.
|
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()
Returns whether the class assigned to this segment should only be instantiated
if at least one child element is not null or the empty string, or if null should
be returned for an empty collection.
|
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 |
setLabel(String label)
Sets the component name used for identification in error handling.
|
void |
setLazy(boolean lazy)
Sets whether the property assigned to this segment should only be instantiated
if at least one child element is not null or the empty string, or if null should
be returned instead for an empty collection.
|
void |
setMaxOccurs(Integer maxOccurs)
Sets the maximum number of times this component may consecutively appear in
a stream.
|
void |
setMaxOccursRef(Integer maxOccursRef)
Sets the maximum allowed value of the referenced occurs field.
|
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 |
setMinOccursRef(Integer minOccursRef)
Sets the minimum required value of the referenced occurs field.
|
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 |
setOccursRef(String occursRef)
Sets the name of a field in the same record that indicates the number
of occurrences for this component.
|
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.
|
getComponentType, getOrdinal, getXmlName, getXmlNamespace, getXmlPrefix, isXmlNamespaceAware, setOrdinal, setXmlName, setXmlNamespace, setXmlNamespaceAware, setXmlPrefix
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toParamString, toString, updateReferences
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
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
public String getLabel()
public void setLabel(String label)
label
- the component namepublic 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 boolean isLazy()
public void setLazy(boolean lazy)
lazy
- the new lazy valuepublic 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 getOccursRef()
public void setOccursRef(String occursRef)
occursRef
- the field namepublic Integer getMinOccursRef()
public void setMinOccursRef(Integer minOccursRef)
minOccursRef
- the minimum valuepublic Integer getMaxOccursRef()
public void setMaxOccursRef(Integer maxOccursRef)
maxOccursRef
- the maximum valuepublic 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