|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.binding.convert.converters.StringToObject org.springframework.binding.convert.converters.StringToDate
public class StringToDate
A formatter for Date
types. Allows the configuration of an explicit date pattern and locale.
SimpleDateFormat
Constructor Summary | |
---|---|
StringToDate()
|
Method Summary | |
---|---|
protected java.text.DateFormat |
getDateFormat()
|
java.util.Locale |
getLocale()
The locale to use in formatting date values. |
java.lang.String |
getPattern()
The pattern to use to format date values. |
void |
setLocale(java.util.Locale locale)
Sets the locale to use in formatting date values. |
void |
setPattern(java.lang.String pattern)
Sets the pattern to use to format date values. |
java.lang.Object |
toObject(java.lang.String string,
java.lang.Class<?> targetClass)
|
java.lang.String |
toString(java.lang.Object target)
|
Methods inherited from class org.springframework.binding.convert.converters.StringToObject |
---|
convertSourceToTargetClass, convertTargetToSourceClass, getSourceClass, getTargetClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringToDate()
Method Detail |
---|
public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the date formatting patternpublic java.util.Locale getLocale()
LocaleContextHolder.getLocale()
public void setLocale(java.util.Locale locale)
locale
- the localepublic java.lang.Object toObject(java.lang.String string, java.lang.Class<?> targetClass) throws java.lang.Exception
toObject
in class StringToObject
java.lang.Exception
public java.lang.String toString(java.lang.Object target) throws java.lang.Exception
toString
in class StringToObject
java.lang.Exception
protected java.text.DateFormat getDateFormat()
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |