Package net.sf.jguiraffe.transform
Class DateTransformer
- java.lang.Object
-
- net.sf.jguiraffe.transform.DateTransformerBase
-
- net.sf.jguiraffe.transform.DateTransformer
-
- All Implemented Interfaces:
Transformer,Validator
public class DateTransformer extends DateTransformerBase
A specialized transformer that transforms strings into date objects.
Most of the required functionality is already implemented by the base class. This class only creates an appropriate
DateFormatobject that supports parsing dates.For the documentation of the supported properties and error messages refer to the super class.
- Version:
- $Id: DateTransformer.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Field Summary
-
Fields inherited from class net.sf.jguiraffe.transform.DateTransformerBase
PROP_AFTER, PROP_BEFORE, PROP_EQUAL, PROP_LENIENT, PROP_REFERENCE_DATE, PROP_STYLE
-
-
Constructor Summary
Constructors Constructor Description DateTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DateFormatcreateFormat(Locale locale, int style, org.apache.commons.configuration.Configuration config)Returns theDateFormatto be used by this transformer.-
Methods inherited from class net.sf.jguiraffe.transform.DateTransformerBase
errorResult, getDefaultReferenceDate, getReferenceDate, getReferenceDateProperty, getStyle, initializeFormat, isAfter, isBefore, isDateValid, isEqual, isLenient, isValid, setAfter, setBefore, setEqual, setLenient, setReferenceDate, setStyle, transform, transformDate, transformSqlDate, transformToDate, transformToString, updateDatePart, updateTimePart
-
-
-
-
Method Detail
-
createFormat
protected DateFormat createFormat(Locale locale, int style, org.apache.commons.configuration.Configuration config)
Returns theDateFormatto be used by this transformer. This implementation returns a format object for processing dates.- Specified by:
createFormatin classDateTransformerBase- Parameters:
locale- the localestyle- the style to be usedconfig- the configuration with the properties- Returns:
- the format object to be used
-
-