org.exolab.castor.xml.handlers

Class SQLTimestampFieldHandler

public class SQLTimestampFieldHandler extends GeneralizedFieldHandler

An implementation of GeneralizedFieldHandler for java.sql.Timestamp

Version: $Revision: 1.1 $ $Date: 2004/04/09 04:44:10 $

Author: Keith Visco

See Also: FieldDescriptor FieldHandler

Constructor Summary
SQLTimestampFieldHandler()
Creates a new SQLTimestampFieldHandler
Method Summary
ObjectconvertUponGet(Object value)
This method is used to convert the value when the getValue method is called.
ObjectconvertUponSet(Object value)
This method is used to convert the value when the setValue method is called.
ClassgetFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from.
ObjectnewInstance(Object parent)
Creates a new instance of the object described by this field.

Constructor Detail

SQLTimestampFieldHandler

public SQLTimestampFieldHandler()
Creates a new SQLTimestampFieldHandler

Method Detail

convertUponGet

public Object convertUponGet(Object value)
This method is used to convert the value when the getValue method is called. The getValue method will obtain the actual field value from given 'parent' object. This convert method is then invoked with the field's value. The value returned from this method will be the actual value returned by getValue method.

Parameters: value the object value to convert after performing a get operation

Returns: the converted value.

convertUponSet

public Object convertUponSet(Object value)
This method is used to convert the value when the setValue method is called. The setValue method will call this method to obtain the converted value. The converted value will then be used as the value to set for the field.

Parameters: value the object value to convert before performing a set operation

Returns: the converted value.

getFieldType

public Class getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from. This should be the type that is used in the object model.

Returns: the class type of of the field

newInstance

public Object newInstance(Object parent)
Creates a new instance of the object described by this field.

Parameters: parent The object for which the field is created

Returns: A new instance of the field's value

Throws: IllegalStateException This field is a simple type and cannot be instantiated

Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com