org.castor.cpa.persistence.convertor
Interface TypeConvertor
- Cloneable, TypeConvertor
- AbstractDateTypeConvertor, AbstractLobTypeConvertor, AbstractSimpleTypeConvertor, AbstractTypeConvertor, BigDecimalToBoolean, BigDecimalToByte, BigDecimalToDate, BigDecimalToDouble, BigDecimalToFloat, BigDecimalToInteger, BigDecimalToLong, BigDecimalToShort, BooleanToBigDecimal, BooleanToInteger, BooleanToShort, BooleanToString, ByteArrayToInputStream, ByteArrayToSerializable, ByteArrayToString, ByteToBigDecimal, ByteToInteger, ByteToShort, CastorDateToDate, CastorDateToSqlDate, CastorDurationToLong, CharArrayToSqlClob, CharArrayToString, DateToBigDecimal, DateToCastorDate, DateToDouble, DateToInteger, DateToLong, DateToSqlDate, DateToSqlTime, DateToSqlTimestamp, DateToString, DoubleToBigDecimal, DoubleToDate, DoubleToFloat, DoubleToInteger, DoubleToLong, FloatToBigDecimal, FloatToDouble, FloatToInteger, FloatToLong, InputStreamToByteArray, InputStreamToSerializable, IntegerToBigDecimal, IntegerToBoolean, IntegerToByte, IntegerToDate, IntegerToDouble, IntegerToFloat, IntegerToLong, IntegerToShort, LongToBigDecimal, LongToCastorDuration, LongToDate, LongToDouble, LongToFloat, LongToInteger, LongToShort, ObjectToString, SerializableToByteArray, SerializableToInputStream, ShortToBigDecimal, ShortToBoolean, ShortToByte, ShortToInteger, ShortToLong, SqlClobToCharArray, SqlClobToString, SqlDateToCastorDate, SqlDateToDate, SqlTimestampToDate, SqlTimestampToString, SqlTimeToDate, StringToBigDecimal, StringToBoolean, StringToByteArray, StringToCharArray, StringToCharacter, StringToDate, StringToDouble, StringToFloat, StringToInteger, StringToLong, StringToShort, StringToSqlClob, StringToSqlTimestamp
public interface TypeConvertor
Interface for a type convertor. A type convertor converts a Java object from one
type to another. A type convertor implementation is required for each type of
conversion.
$Revision: 7134 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $ Object | clone() - Creates and returns a copy of this object.
|
void | configure(Configuration configuration) - Configure the converter with given configuration.
|
Object | convert(Object object) - Convert the object from one type to another.
|
Class | fromType() - Get the type being converted from.
|
void | parameterize(String parameter) - Initialize the converter with the given parameter.
|
Class | toType() - Get the type being converted to.
|
clone
public Object clone()
Creates and returns a copy of this object.
- A clone of this instance.
configure
public void configure(Configuration configuration)
Configure the converter with given configuration.
configuration
- Configuration to use.
convert
public Object convert(Object object)
throws ClassCastException
Convert the object from one type to another.
- convert in interface TypeConvertor
object
- The object to convert.
fromType
public Class fromType()
Get the type being converted from.
- The type being converted from.
parameterize
public void parameterize(String parameter)
Initialize the converter with the given parameter. If no parameter is available the method
don't need to be called or may be called with null
which both should lead to
the default behaviour of the converter.
parameter
- The parameter for the convertor (null if is not specified).
toType
public Class toType()
Get the type being converted to.
- The type being converted to.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com