org.melati.template
Class YMDDateAdaptor
java.lang.Object
org.melati.template.YMDDateAdaptor
- All Implemented Interfaces:
- TempletAdaptor
- Direct Known Subclasses:
- YMDHMSTimestampAdaptor
public class YMDDateAdaptor
- extends Object
- implements TempletAdaptor
An adaptor for a string date in YMD format.
See for example org.melati.poem.DatePoemType-dropdown.wm
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
yearSuffix
protected static final String yearSuffix
- See Also:
- Constant Field Values
monthSuffix
protected static final String monthSuffix
- See Also:
- Constant Field Values
daySuffix
protected static final String daySuffix
- See Also:
- Constant Field Values
it
public static final YMDDateAdaptor it
- The instance.
YMDDateAdaptor
public YMDDateAdaptor()
getFormOrDie
protected String getFormOrDie(ServletTemplateContext context,
String fieldName,
String suffix)
rawFrom
public Object rawFrom(ServletTemplateContext context,
String fieldName)
- Retrieve a raw value, ie an SQL value, from a ServletTemplateContext.
- Specified by:
rawFrom
in interface TempletAdaptor
- Parameters:
context
- the ServletTemplateContext the value is stored infieldName
- the name of the field in the context
- Returns:
- the raw value
- See Also:
rawFrom(org.melati.template.ServletTemplateContext, java.lang.String)
yearField
public Field yearField(Field dateField)
- Parameters:
dateField
- date field to extract year field from
- Returns:
- year constituent of date
monthField
public Field monthField(Field dateField)
- Parameters:
dateField
- date field to extract month field from
- Returns:
- month constituent of date
dayField
public Field dayField(Field dateField)
- Parameters:
dateField
- date field to extract day field from
- Returns:
- day constituent of date
when
protected Calendar when(Field dateField)
Copyright © 2000-2010 PanEris. All Rights Reserved.