org.exolab.castor.xml.handlers
Class ContainerFieldHandler
java.lang.Object
org.exolab.castor.xml.handlers.ContainerFieldHandler
- FieldHandler
public final class ContainerFieldHandler
extends java.lang.Object
The FieldHandler for ContainerElement
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:27 $
void | checkValidity(Object object) - Checks the field validity.
|
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.
|
MODE_AUTO
public static final int MODE_AUTO
MODE_CHILD_LINK
public static final int MODE_CHILD_LINK
MODE_PARENT_LINK
public static final int MODE_PARENT_LINK
ContainerFieldHandler
public ContainerFieldHandler(FieldHandler handler)
Creates a new ContainerFieldHandler with the given FieldHandler.
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.
- checkValidity in interface FieldHandler
ValidityException
- The field is invalid, is required and
null, or any other validity violation
getValue
public final Object getValue(Object object)
throws IllegalStateException
Returns the value of the field from the object.
- getValue in interface FieldHandler
newInstance
public Object newInstance(Object parent)
throws IllegalStateException
Creates a new instance of the object described by this field.
- newInstance in interface FieldHandler
parent
- The object for which the field is created
- A new instance of the field's value
resetValue
public final 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.
- resetValue in interface FieldHandler
setValue
public final void setValue(Object object,
Object value)
throws IllegalStateException,
IllegalArgumentException
Sets the value of the field on the object.
- setValue in interface FieldHandler
object
- The objectvalue
- The new value
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com