org.exolab.castor.mapping

Interface FieldHandler

Known Implementing Classes:
AbstractFieldHandler, CenturyDescriptor.CenturyFieldHandler, CollectionFieldHandler, ContainerFieldHandler, DateDescriptor.DateFieldHandler, DateFieldHandler, DurationDescriptor.DurationFieldHandler, EnumFieldHandler, ExtendedFieldHandler, ExtendedFieldHandler, FieldHandlerFriend, FieldHandlerImpl, GDayDescriptor.GDayFieldHandler, GeneralizedFieldHandler, GMonthDayDescriptor.GMonthDayFieldHandler, GMonthDescriptor.GMonthFieldHandler, GYearDescriptor.GYearFieldHandler, GYearMonthDescriptor.GYearMonthFieldHandler, MonthDescriptor.MonthFieldHandler, RecurringDurationDescriptor.RecurringDurationFieldHandler, TimeDescriptor.TimeFieldHandler, TimeDurationDescriptor.TimeDurationFieldHandler, TimePeriodDescriptor.TimePeriodFieldHandler, XMLFieldHandler, YearDescriptor.YearFieldHandler

public interface FieldHandler

A field handler knows how to perform various operations on the field that require access to the field value.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:26 $

Author:
Assaf Arkin

See Also:
FieldDescriptor

Method Summary

void
checkValidity(Object object)
Deprecated. No longer supported
Object
getValue(Object object)
Returns the value of the field from the object.
Object
newInstance(Object parent)
Creates a new instance of the object described by this field.
void
resetValue(Object object)
Sets the value of the field to a default value.
void
setValue(Object object, Object value)
Sets the value of the field on the object.

Method Details

checkValidity

public void checkValidity(Object object)
            throws ValidityException,
                   IllegalStateException

Deprecated. No longer supported


getValue

public Object getValue(Object object)
            throws IllegalStateException
Returns the value of the field from the object.

Parameters:
object - The object

Returns:
The value of the field


newInstance

public Object newInstance(Object parent)
            throws IllegalStateException
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


resetValue

public void resetValue(Object object)
            throws IllegalStateException,
                   IllegalArgumentException
Sets the value of the field to a default value.

Reference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.

Parameters:
object - The object


setValue

public void setValue(Object object,
                     Object value)
            throws IllegalStateException,
                   IllegalArgumentException
Sets the value of the field on the object.

Parameters:
object - The object
value - The new value


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