|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.click.util.RequestTypeConverter
Provides an request parameter OGNL TypeConverter class.
This class is adapted from the OGNL DefaultTypeConverter, by Luke Blanshard and Drew Davidson, and provides additional Date conversion capabilities.
Constructor Summary | |
RequestTypeConverter()
|
Method Summary | |
Object |
convertValue(Map context,
Object target,
Member member,
String propertyName,
Object value,
Class toType)
Converts the given value to a given type. |
protected Object |
convertValue(Object value,
Class toType)
Return the converted value for the given value object and target type. |
protected Date |
createDateFromSqlString(String value)
Return a new date object from the give SQL format date string, or null if the value is invalid. |
protected long |
getTimeFromDateString(String value)
Return the time value in milliseconds of the given date value string, or Long.MIN_VALUE if the date could not be determined. |
protected boolean |
isTimeValue(String value)
Return true if the given string value is a long time value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RequestTypeConverter()
Method Detail |
public Object convertValue(Map context, Object target, Member member, String propertyName, Object value, Class toType)
convertValue
in interface ognl.TypeConverter
context
- OGNL context under which the conversion is being donetarget
- target object in which the property is being setmember
- member (Constructor, Method or Field) being setpropertyName
- property name being setvalue
- value to be convertedtoType
- type to which value is converted
protected Object convertValue(Object value, Class toType)
value
- the value object to converttoType
- the target class type to convert the value to
protected long getTimeFromDateString(String value)
value
- the date value string
protected boolean isTimeValue(String value)
value
- the string value to test
protected Date createDateFromSqlString(String value)
value
- the SQL format date string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |