org.exolab.castor.xml
Class XMLFieldHandler
java.lang.Object
org.exolab.castor.xml.XMLFieldHandler
- FieldHandler
public class XMLFieldHandler
extends java.lang.Object
A field handler knows how to perform various operations on the
field that require access to the field value.
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:16 $
void | checkValidity(Object object) - Checks the field validity.
|
boolean | equals(Object obj) - Returns true if the given object is an XMLFieldHandler that
is equivalent to this one.
|
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)
|
void | setValue(Object object, Object value) - Sets the value of the field on the object.
|
XMLFieldHandler
public XMLFieldHandler()
Creates a new default XMLFieldHandler
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
equals
public boolean equals(Object obj)
Returns true if the given object is an XMLFieldHandler that
is equivalent to this one. An equivalent XMLFieldHandler is
an XMLFieldHandler that is an instances of the same class.
This method can be overwritten to provide more advanced
equivalence tests.
- true if the given object is an XMLFieldHandler that
is equivalent to this one.
getValue
public 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)
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 void resetValue(Object object)
throws IllegalStateException,
IllegalArgumentException
- resetValue in interface FieldHandler
setValue
public 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