|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interfaces defines the methods a class needs to implement to act as a FormElement.
A FormElement defines how an element in a FormMap should be mapped to a first class java object. There are several key pieces of information required:
Once we have this information, we basically have enough data to map a String value in the data source to a first class Java object in the element.
Method Summary | |
boolean |
allowMultiples()
Does this element allow multiple values |
Boolean |
getBooleanVal()
Get the value for this element as a Boolean |
Boolean |
getBooleanVal(Boolean dflt)
Get a Boolean value from the map, defaulting accordingly if the value is null |
Date |
getDateVal()
Get the value for this element as a Date |
Date |
getDateVal(Date dflt)
Get a Date value from the map, defaulting accordingly if the value is null |
Object |
getDefaultVal()
Get the default value for this form element |
Double |
getDoubleVal()
Get the value for this element as a Double |
Double |
getDoubleVal(Double dflt)
Get a Double value from the map, defaulting accordingly if the value is null |
Float |
getFloatVal()
Get the value for this element as a Float |
Float |
getFloatVal(Float dflt)
Get a Float value from the map, defaulting accordingly if the value is null |
Integer |
getIntegerVal()
Get the value for this element as a Integer |
Integer |
getIntegerVal(Integer dflt)
Get a Integer value from the map, defaulting accordingly if the value is null |
String |
getKey()
Get the key value for this form element |
Long |
getLongVal()
Get the value for this element as a Long |
Long |
getLongVal(Long dflt)
Get a Long value from the map, defaulting accordingly if the value is null |
String |
getName()
Get the name value of form element |
Object |
getOrigVal()
Get the original value for this element |
ParseException |
getParseException()
Get any parse exceptions associated with the element (ie. that might have occurred when the element was mapped) |
Short |
getShortVal()
Get the value for this element as a Short |
Short |
getShortVal(Short dflt)
Get a Short value from the map, defaulting accordingly if the value is null |
String |
getStringVal()
Get the value for this element as a String |
String |
getStringVal(String dflt)
Get the value for this element as a String, defaulting accordingly if the value is null |
FormType |
getType()
Get the FormType for this for element |
Object |
getVal()
Get the value for this element. |
FormValidator |
getValidator()
Get the default FormValidator for this form element |
Object[] |
getVals()
Get all the values for this element. |
void |
setAllowMultiples(boolean val)
Set whether or not this element allows multiple values |
void |
setDefaultVal(Object defaultVal)
Set the default value for this form element |
void |
setKey(String key)
Set the key value for this form element |
void |
setName(String name)
Set the name of this form element |
void |
setOrigVal(Object iorigVal)
Set the original value for this element |
void |
setParseException(ParseException pe)
Set the parse exception associated with this element |
void |
setType(FormType type)
Set the FormType for this form element |
void |
setVal(Object ival)
Set the value for this element |
void |
setValidator(FormValidator validator)
Set the FormValidator for this form element |
Method Detail |
public void setKey(String key)
key
- the key value for this form elementpublic String getKey()
public void setName(String name)
name
- the name value of this form elementpublic String getName()
public void setType(FormType type)
type
- the FormType for this form elementpublic FormType getType()
public void setDefaultVal(Object defaultVal)
defaultVal
- the FormType for this form elementpublic Object getDefaultVal()
public void setAllowMultiples(boolean val)
val
- true if the element allows multiplespublic boolean allowMultiples()
public void setValidator(FormValidator validator)
validator
- the FormValidator for this form elementpublic FormValidator getValidator()
public void setOrigVal(Object iorigVal)
iorigVal
- the original valuepublic Object getOrigVal()
public void setVal(Object ival)
ival
- the value for this elementpublic Object getVal()
public Object[] getVals()
public String getStringVal()
public String getStringVal(String dflt)
public Boolean getBooleanVal()
public Boolean getBooleanVal(Boolean dflt)
public Integer getIntegerVal()
public Integer getIntegerVal(Integer dflt)
public Date getDateVal()
public Date getDateVal(Date dflt)
public Long getLongVal()
public Long getLongVal(Long dflt)
public Short getShortVal()
public Short getShortVal(Short dflt)
public Double getDoubleVal()
public Double getDoubleVal(Double dflt)
public Float getFloatVal()
public Float getFloatVal(Float dflt)
public void setParseException(ParseException pe)
public ParseException getParseException()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |