org.exolab.castor.types

Class MonthDescriptor.MonthFieldHandler

class MonthDescriptor.MonthFieldHandler extends XMLFieldHandler

A specialized FieldHandler for the XML Schema Month related types

Version: $Revision: 5951 $ $Date: 2005-03-05 06:42:06 -0700 (Sat, 05 Mar 2005) $

Author: Arnaud Blandin

Constructor Summary
MonthFieldHandler()
Creates a new TimeFieldHandler
Method Summary
voidcheckValidity(Object object)
Checks the field validity.
ObjectgetValue(Object target)
Returns the value of the field associated with this descriptor from the given target object.
ObjectnewInstance(Object parent)
Creates a new instance of the object described by this field.
voidresetValue(Object target)
voidsetValue(Object target, Object value)
Sets the value of the field associated with this descriptor.

Constructor Detail

MonthFieldHandler

public MonthFieldHandler()
Creates a new TimeFieldHandler

Method Detail

checkValidity

public void checkValidity(Object object)
Checks the field validity. Returns successfully if the field can be stored, is valid, etc, throws an exception otherwise.

Parameters: object The object

Throws: ValidityException The field is invalid, is required and null, or any other validity violation IllegalStateException The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object

getValue

public Object getValue(Object target)
Returns the value of the field associated with this descriptor from the given target object.

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)
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

resetValue

public void resetValue(Object target)

setValue

public void setValue(Object target, Object value)
Sets the value of the field associated with this descriptor.

Parameters: target the object in which to set the value value the value of the field

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