tyrex.resource.castor

Class ResourceFieldHandlerImpl

class ResourceFieldHandlerImpl extends Object implements FieldHandler

Implementation of org.exolab.castor.mapping.FieldHandler.
Constructor Summary
ResourceFieldHandlerImpl(Method method, Class type)
Create the ResourceFieldHandlerImpl
Method Summary
voidcheckValidity(Object object)
ObjectgetValue(Object object)
Returns the value of the field from the object.
ObjectnewInstance(Object parent)
Creates a new instance of the object described by this field.
voidresetValue(Object object)
Sets the value of the field to a default value.
voidsetValue(Object object, Object value)
Sets the value of the field on the object.

Constructor Detail

ResourceFieldHandlerImpl

ResourceFieldHandlerImpl(Method method, Class type)
Create the ResourceFieldHandlerImpl

Parameters: method the set method (required) type the type of the set method parameter (optional)

Method Detail

checkValidity

public void checkValidity(Object object)

Deprecated: No longer supported

getValue

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

Parameters: object The object

Returns: The value of the field

Throws: IllegalStateException The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java 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 object)
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: IllegalStateException The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object

setValue

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

Parameters: object The object value The new value

Throws: IllegalStateException The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object

UNKNOWN: IllegalArgumentException The value passed is not of a supported type

Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.