Class AbstractDateTypeConvertor
- java.lang.Object
-
- org.castor.cpa.persistence.convertor.AbstractTypeConvertor
-
- org.castor.cpa.persistence.convertor.AbstractDateTypeConvertor
-
- All Implemented Interfaces:
java.lang.Cloneable,TypeConvertor,TypeConvertor
- Direct Known Subclasses:
BigDecimalToDate,DateToBigDecimal,DateToDouble,DateToInteger,DateToString,DoubleToDate,IntegerToDate,SqlTimestampToString,StringToDate,StringToSqlTimestamp
public abstract class AbstractDateTypeConvertor extends AbstractTypeConvertor
Abstract base class to convert from one type to another without any configuration or parameters.- Since:
- 1.1.3
- Version:
- $Revision: 7134 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Ralf Joachim
-
-
Constructor Summary
Constructors Constructor Description AbstractDateTypeConvertor(java.lang.Class<?> fromType, java.lang.Class<?> toType)Construct a Converter between given fromType an toType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(AbstractProperties properties)Configure the converter with given configuration.protected static java.text.SimpleDateFormatgetDefaultDateFormat()Use this accessor to access the DEFAULT_DATE_FORMAT.protected static java.lang.StringgetFullDatePattern(java.lang.String pattern)Transforms short date format pattern into full format pattern for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").-
Methods inherited from class org.castor.cpa.persistence.convertor.AbstractTypeConvertor
clone, fromType, toString, toType
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.castor.cpa.persistence.convertor.TypeConvertor
convert, parameterize
-
-
-
-
Method Detail
-
getDefaultDateFormat
protected static final java.text.SimpleDateFormat getDefaultDateFormat()
Use this accessor to access the DEFAULT_DATE_FORMAT.- Returns:
- A clone of DEFAULT_DATE_FORMAT.
-
getFullDatePattern
protected static java.lang.String getFullDatePattern(java.lang.String pattern)
Transforms short date format pattern into full format pattern for SimpleDateFormat (e.g., "YMD" to "yyyyMMdd").- Parameters:
pattern- The short pattern.- Returns:
- The full pattern.
-
configure
public final void configure(AbstractProperties properties)
Configure the converter with given configuration.- Parameters:
properties- Properties to use.
-
-