org.exolab.castor.xml.handlers

Class SQLTimeFieldHandler

Implemented Interfaces:
ConfigurableFieldHandler, FieldHandler

public class SQLTimeFieldHandler
extends GeneralizedFieldHandler

An implementation of GeneralizedFieldHandler for java.sql.Time.
Version:
$Revision: 6784 $ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $
Author:
Keith Visco
See Also:
FieldDescriptor, FieldHandler

Nested Class Summary

Nested classes/interfaces inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler

GeneralizedFieldHandler.GFHConverterEnumeration

Field Summary

Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler

configuration

Constructor Summary

SQLTimeFieldHandler()
Creates a new SQLTimeFieldHandler.

Method Summary

Object
convertUponGet(Object value)
This method is used to convert the value when the getValue method is called.
Object
convertUponSet(Object value)
This method is used to convert the value when the setValue method is called.
Class
getFieldType()
Returns the class type for the field that this GeneralizedFieldHandler converts to and from.
Object
newInstance(Object parent)
Creates a new instance of the object described by this field.

Methods inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler

convertUponGet, convertUponSet, getFieldType, getValue, newInstance, newInstance, resetValue, setCollectionIteration, setFieldHandler, setValue

Methods inherited from class org.exolab.castor.mapping.AbstractFieldHandler

getFieldDescriptor, getValue, hasValue, newInstance, newInstance, resetValue, setConfiguration, setFieldDescriptor, setValue

Methods inherited from class org.exolab.castor.mapping.ExtendedFieldHandler

checkValidity, getFieldDescriptor, getValue, newInstance, newInstance, resetValue, setFieldDescriptor, setValue

Methods inherited from class org.exolab.castor.mapping.loader.FieldHandlerFriend

checkValidity, getFieldDescriptor, getValue, newInstance, resetValue, setFieldDescriptor, setValue

Constructor Details

SQLTimeFieldHandler

public SQLTimeFieldHandler()
Creates a new SQLTimeFieldHandler.

Method Details

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.
Overrides:
convertUponGet in interface GeneralizedFieldHandler
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.
Overrides:
convertUponSet in interface GeneralizedFieldHandler
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.
Overrides:
getFieldType in interface GeneralizedFieldHandler
Returns:
the class type of of the field

newInstance

public Object newInstance(Object parent)
            throws IllegalStateException
Creates a new instance of the object described by this field.
Specified by:
newInstance in interface FieldHandler
Overrides:
newInstance in interface GeneralizedFieldHandler
Parameters:
parent - The object for which the field is created
Returns:
A new instance of the field's value

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