org.exolab.castor.types

Class MonthDescriptor.MonthFieldHandler

Enclosing Class:
MonthDescriptor
Implemented Interfaces:
FieldHandler

(package private) class MonthDescriptor.MonthFieldHandler
extends XMLFieldHandler

A specialized FieldHandler for the XML Schema Month related types
Version:
$Revision: 1.2 $ $Date: 2003/04/23 06:35:24 $
Author:
Arnaud Blandin

Constructor Summary

MonthFieldHandler()
Creates a new TimeFieldHandler

Method Summary

void
checkValidity(Object object)
Checks the field validity.
Object
getValue(Object target)
Returns the value of the field associated with this descriptor from the given target object.
Object
newInstance(Object parent)
Creates a new instance of the object described by this field.
void
resetValue(Object target)
void
setValue(Object target, Object value)
Sets the value of the field associated with this descriptor.

Methods inherited from class org.exolab.castor.xml.XMLFieldHandler

checkValidity, equals, getValue, newInstance, resetValue, setValue

Constructor Details

MonthFieldHandler

public MonthFieldHandler()
Creates a new TimeFieldHandler

Method Details

checkValidity

public void checkValidity(Object object)
            throws ValidityException,
                   IllegalStateException
Checks the field validity. Returns successfully if the field can be stored, is valid, etc, throws an exception otherwise.
Specified by:
checkValidity in interface FieldHandler
Overrides:
checkValidity in interface XMLFieldHandler
Parameters:
object - The object
Throws:
ValidityException - The field is invalid, is required and null, or any other validity violation

getValue

public Object getValue(Object target)
            throws java.lang.IllegalStateException
Returns the value of the field associated with this descriptor from the given target object.
Specified by:
getValue in interface FieldHandler
Overrides:
getValue in interface XMLFieldHandler
Parameters:
target - the object to get the value from
Returns:
the value of the field associated with this descriptor from the given target object.

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 XMLFieldHandler
Parameters:
parent - The object for which the field is created
Returns:
A new instance of the field's value

resetValue

public void resetValue(Object target)
            throws java.lang.IllegalStateException
Specified by:
resetValue in interface FieldHandler
Overrides:
resetValue in interface XMLFieldHandler

setValue

public void setValue(Object target,
                     Object value)
            throws java.lang.IllegalStateException
Sets the value of the field associated with this descriptor.
Specified by:
setValue in interface FieldHandler
Overrides:
setValue in interface XMLFieldHandler
Parameters:
target - the object in which to set the value
value - the value of the field

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