|
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.config.PropertyConfig org.beanio.config.FieldConfig
public class FieldConfig
Stores configuration settings for a field. Fields are used to define the layout of a record.
Field Summary | |
---|---|
static String |
LEFT
Left justification setting |
static String |
RIGHT
Right justification setting |
Constructor Summary | |
---|---|
FieldConfig()
Constructs a new FieldConfig. |
Method Summary | |
---|---|
String |
getDefault()
Returns the default textual representation of the value of this field when the field is not present in the input stream. |
String |
getFormat()
Returns the format pattern used by date and number type handlers. |
String |
getJustify()
Returns the justification of this field. |
int |
getLength()
Returns the length of this field in characters. |
String |
getLiteral()
Returns the static text for this field, or null if the field text is not static. |
Integer |
getMaxLength()
Returns the maximum length of this field in characters. |
Integer |
getMinLength()
Returns the minimum length of this field in characters, or null if a minimum length should not be enforced. |
Character |
getPadding()
Returns the character used to pad this field. |
int |
getPosition()
Returns the position of this field. |
String |
getRegex()
Returns the regular expression pattern for validating this field's text when read from an input stream. |
String |
getTypeHandler()
Returns the name of the custom type handler used for type conversion by this field, or null if the default type handler is sufficient. |
boolean |
isField()
Returns whether this property configuration defines a field. |
boolean |
isRecordIdentifier()
Returns true if this field is used to identify the type of record. |
boolean |
isRequired()
Returns true if this field is required when parsing an input stream. |
boolean |
isTrim()
Returns true if field text will be trimmed before validation and type conversion. |
void |
setDefault(String text)
Sets the default textual representation of the value of this field when the field is not present in the input stream. |
void |
setFormat(String format)
Sets the format pattern used by date and number type handlers. |
void |
setJustify(String justify)
Sets the justification of this field. |
void |
setLength(int length)
Sets the length of this field in characters. |
void |
setLiteral(String literal)
Sets the static text for this field. |
void |
setMaxLength(Integer maxLength)
Sets the maximum length of this field in characters. |
void |
setMinLength(Integer minLength)
Sets the minimum length of this field in characters, or null if a minimum length should not be enforced. |
void |
setPadding(Character padding)
Sets the character used to pad this field. |
void |
setPosition(int position)
Sets the position of this field. |
void |
setRecordIdentifier(boolean b)
Set to true if this field is used to identify the type of record. |
void |
setRegex(String pattern)
Sets the regular expression pattern for validating this field's text when read from an input stream. |
void |
setRequired(boolean required)
Set to true if this field is required when parsing an input stream. |
void |
setTrim(boolean trim)
Set to true if field text should be trimmed before validation and type conversion. |
void |
setTypeHandler(String handler)
Sets the name of the custom type handler to use for type conversion by this field. |
Methods inherited from class org.beanio.config.PropertyConfig |
---|
getCollection, getGetter, getMaxOccurs, getMinOccurs, getName, getSetter, getType, getXmlName, getXmlNamespace, getXmlPrefix, getXmlType, getXmlWrapper, isBean, isIgnored, isNillable, setCollection, setGetter, setIgnored, setMaxOccurs, setMinOccurs, setName, setNillable, setSetter, setType, setXmlName, setXmlNamespace, setXmlPrefix, setXmlType, setXmlWrapper |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LEFT
public static final String RIGHT
Constructor Detail |
---|
public FieldConfig()
Method Detail |
---|
public boolean isField()
PropertyConfig
isField
in class PropertyConfig
public String getDefault()
public void setDefault(String text)
text
- the default value (as text)public int getPosition()
public void setPosition(int position)
position
- the field positionpublic Integer getMinLength()
public void setMinLength(Integer minLength)
minLength
- the minimum length, or null if not enforcedpublic Integer getMaxLength()
public void setMaxLength(Integer maxLength)
maxLength
- the maximum length, or null if not enforcedpublic boolean isTrim()
public void setTrim(boolean trim)
trim
- true if field text will be trimmedpublic boolean isRecordIdentifier()
public void setRecordIdentifier(boolean b)
b
- true if this field is used to identify the recordpublic String getLiteral()
public void setLiteral(String literal)
literal
- the literal text of the fieldpublic String getRegex()
public void setRegex(String pattern)
pattern
- the regular expression patternpublic boolean isRequired()
public void setRequired(boolean required)
required
- true if this field is requiredpublic String getTypeHandler()
public void setTypeHandler(String handler)
handler
- the name of the custom type handlerpublic String getFormat()
public void setFormat(String format)
format
- the date or number format patternpublic int getLength()
public void setLength(int length)
length
- the length of this fieldpublic Character getPadding()
public void setPadding(Character padding)
padding
- the character used to pad this fieldpublic String getJustify()
LEFT
or RIGHT
public void setJustify(String justify)
justify
- LEFT
or RIGHT
|
BeanIO 1.2.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |