Public Member Functions | |
ContainerFieldHandler (FieldHandler handler) | |
final Object | getValue (Object object) throws IllegalStateException |
Object | newInstance (Object parent) throws IllegalStateException |
final void | resetValue (Object object) throws IllegalStateException, IllegalArgumentException |
final void | setValue (Object object, Object value) throws IllegalStateException, IllegalArgumentException |
void | checkValidity (Object object) throws ValidityException, IllegalStateException |
Static Public Attributes | |
static final int | MODE_AUTO = 0 |
static final int | MODE_PARENT_LINK = 1 |
static final int | MODE_CHILD_LINK = 2 |
The FieldHandler for ContainerElement
org.exolab.castor.xml.handlers.ContainerFieldHandler.ContainerFieldHandler | ( | FieldHandler | handler | ) |
Creates a new ContainerFieldHandler with the given FieldHandler.
void org.exolab.castor.xml.handlers.ContainerFieldHandler.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.
object | The object |
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 |
Implements org.exolab.castor.mapping.FieldHandler.
final Object org.exolab.castor.xml.handlers.ContainerFieldHandler.getValue | ( | Object | object | ) | throws IllegalStateException |
Returns the value of the field from the object.
object | The object |
IllegalStateException | The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object |
Implements org.exolab.castor.mapping.FieldHandler.
References org.exolab.castor.xml.util.ContainerElement.getParent(), org.exolab.castor.mapping.FieldHandler.getValue(), org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_AUTO, org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_CHILD_LINK, org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_PARENT_LINK, and org.exolab.castor.xml.util.ContainerElement.setParent().
Object org.exolab.castor.xml.handlers.ContainerFieldHandler.newInstance | ( | Object | parent | ) | throws IllegalStateException |
Creates a new instance of the object described by this field.
parent | The object for which the field is created |
IllegalStateException | This field is a simple type and cannot be instantiated |
Implements org.exolab.castor.mapping.FieldHandler.
References org.exolab.castor.xml.util.ContainerElement.getParent(), org.exolab.castor.mapping.FieldHandler.newInstance(), and org.exolab.castor.xml.util.ContainerElement.setParent().
final void org.exolab.castor.xml.handlers.ContainerFieldHandler.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.
object | The object |
IllegalStateException | The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object |
Implements org.exolab.castor.mapping.FieldHandler.
References org.exolab.castor.mapping.FieldHandler.resetValue().
final void org.exolab.castor.xml.handlers.ContainerFieldHandler.setValue | ( | Object | object, | |
Object | value | |||
) | throws IllegalStateException, IllegalArgumentException |
Sets the value of the field on the object.
object | The object | |
value | The new value |
IllegalStateException | The Java object has changed and is no longer supported by this handler, or the handler is not compatiable with the Java object IllegalArgumentException The value passed is not of a supported type |
Implements org.exolab.castor.mapping.FieldHandler.
References org.exolab.castor.xml.util.ContainerElement.getParent(), org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_AUTO, org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_CHILD_LINK, and org.exolab.castor.mapping.FieldHandler.setValue().
final int org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_AUTO = 0 [static] |
final int org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_CHILD_LINK = 2 [static] |
final int org.exolab.castor.xml.handlers.ContainerFieldHandler.MODE_PARENT_LINK = 1 [static] |