public class BooleanFieldDesc extends FieldDesc<java.lang.Boolean>
Constructor and Description |
---|
BooleanFieldDesc()
Default constructor with no arguments, useful for cases where the
descriptor is configured from XML elements.
|
BooleanFieldDesc(java.lang.String fieldName)
Constructor taking a field name.
|
Modifier and Type | Method and Description |
---|---|
DataType |
getFieldType()
Get the field type for this field description
|
boolean |
isValid(java.lang.Boolean value)
Return whether a field value is valid.
|
java.lang.Boolean |
parse(java.lang.String stringVal)
Parse a given expression into a boolean value.
|
java.lang.Boolean |
parseValueIntoRecord(DataRecord rec,
java.lang.String value)
Parse the given value into a data record field.
|
protected void |
setValues(org.w3c.dom.NodeList valueList)
Set values for this field descriptor.
|
void |
storeDefaultIntoRecord(DataRecord rec)
Store the default value into the data record provided.
|
org.w3c.dom.Element |
toXml(org.w3c.dom.Document doc)
Convert this field description to an XML Element.
|
addSourceField, applyTransform, getDefaultValue, getFieldName, getLookupIndexField, getLookupTable, getLookupValueField, getSourceFields, getTransform, isMultiValue, loadFromXml, setDefaultValue, setFieldName, setMultiValue
public BooleanFieldDesc()
public BooleanFieldDesc(java.lang.String fieldName)
fieldName
- the field name for this descriptorpublic DataType getFieldType()
getFieldType
in class FieldDesc<java.lang.Boolean>
public boolean isValid(java.lang.Boolean value)
public java.lang.Boolean parse(java.lang.String stringVal) throws java.text.ParseException
public java.lang.Boolean parseValueIntoRecord(DataRecord rec, java.lang.String value) throws java.text.ParseException
parseValueIntoRecord
in class FieldDesc<java.lang.Boolean>
rec
- the data recordvalue
- the string value to parsejava.text.ParseException
- if there is a problem parsing the valueprotected void setValues(org.w3c.dom.NodeList valueList)
public void storeDefaultIntoRecord(DataRecord rec)
storeDefaultIntoRecord
in class FieldDesc<java.lang.Boolean>
rec
- the DataRecord to store the value intopublic org.w3c.dom.Element toXml(org.w3c.dom.Document doc)
fieldDef
element, sets the fieldName and fieldType, and
creates a values child element. The values element contains all valid
values for this enumerated field, in separate value
tags.
If the default value is set, this method adds it as well. Not
implemented yet.