Package org.exolab.castor.mapping
Interface FieldHandler
-
- All Known Subinterfaces:
ClonableFieldHandler
,ConfigurableFieldHandler
- All Known Implementing Classes:
AbstractFieldHandler
,CenturyDescriptor.CenturyFieldHandler
,CollectionFieldHandler
,ContainerFieldHandler
,DateDescriptor.DateFieldHandler
,DateFieldHandler
,DateTimeDescriptor.DateTimeFieldHandler
,DurationDescriptor.DurationFieldHandler
,EnumFieldHandler
,EnumFieldHandler
,ExtendedFieldHandler
,ExtendedFieldHandler
,FieldHandlerFriend
,FieldHandlerImpl
,GDayDescriptor.GDayFieldHandler
,GeneralizedFieldHandler
,GMonthDayDescriptor.GMonthDayFieldHandler
,GMonthDescriptor.GMonthFieldHandler
,GYearDescriptor.GYearFieldHandler
,GYearMonthDescriptor.GYearMonthFieldHandler
,MonthDescriptor.MonthFieldHandler
,RecurringDurationDescriptor.RecurringDurationFieldHandler
,SQLTimeFieldHandler
,SQLTimestampFieldHandler
,TimeDescriptor.TimeFieldHandler
,TimeDurationDescriptor.TimeDurationFieldHandler
,TimePeriodDescriptor.TimePeriodFieldHandler
,ToStringFieldHandler
,TransientFieldHandler
,ValueOfFieldHandler
,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: 6671 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Assaf Arkin
- See Also:
FieldDescriptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
checkValidity(java.lang.Object object)
Deprecated.No longer supportedjava.lang.Object
getValue(java.lang.Object object)
Returns the value of the field from the object.java.lang.Object
newInstance(java.lang.Object parent)
Creates a new instance of the object described by this field.void
resetValue(java.lang.Object object)
Sets the value of the field to a default value.void
setValue(java.lang.Object object, java.lang.Object value)
Sets the value of the field on the object.
-
-
-
Method Detail
-
getValue
java.lang.Object getValue(java.lang.Object object) throws java.lang.IllegalStateException
Returns the value of the field from the object.- Parameters:
object
- The object- Returns:
- The value of the field
- Throws:
java.lang.IllegalStateException
- The Java object has changed and is no longer supported by this handler, or the handler is not compatible with the Java object
-
setValue
void setValue(java.lang.Object object, java.lang.Object value) throws java.lang.IllegalStateException, java.lang.IllegalArgumentException
Sets the value of the field on the object.- Parameters:
object
- The object.value
- The new value.- Throws:
java.lang.IllegalStateException
- The Java object has changed and is no longer supported by this handler, or the handler is not compatible with the Java object.java.lang.IllegalArgumentException
- The value passed is not of a supported type.
-
resetValue
void resetValue(java.lang.Object object) throws java.lang.IllegalStateException, java.lang.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.- Throws:
java.lang.IllegalStateException
- The Java object has changed and is no longer supported by this handler, or the handler is not compatible with the Java object.java.lang.IllegalArgumentException
-
checkValidity
void checkValidity(java.lang.Object object) throws ValidityException, java.lang.IllegalStateException
Deprecated.No longer supported- Throws:
ValidityException
java.lang.IllegalStateException
-
newInstance
java.lang.Object newInstance(java.lang.Object parent) throws java.lang.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
- Throws:
java.lang.IllegalStateException
- This field is a simple type and cannot be instantiated
-
-