public class CollectionFieldHandler extends XMLFieldHandler
| Constructor and Description |
|---|
CollectionFieldHandler(FieldHandler fieldHandler)
Creates a new CollectionFieldHandler using the given
FieldHandler for delegation.
|
CollectionFieldHandler(FieldHandler fieldHandler,
TypeValidator validator) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValidity(java.lang.Object object)
Checks the field validity.
|
boolean |
equals(java.lang.Object obj)
Returns true if the given object is an XMLFieldHandler that
is equivalent to the delegated handler.
|
java.lang.Object |
getValue(java.lang.Object target)
Gets the value of the field associated with this descriptor.
|
java.lang.Object |
newInstance(java.lang.Object parent)
Creates a new instance of the object described by this field.
|
void |
resetValue(java.lang.Object target)
Sets the value of the field to a default value.
|
void |
setValue(java.lang.Object target,
java.lang.Object value)
Sets the value of the field associated with this descriptor.
|
newInstancegetFieldDescriptor, hasValue, setFieldDescriptorpublic CollectionFieldHandler(FieldHandler fieldHandler)
fieldHandler - the fieldHandler for delegation.public CollectionFieldHandler(FieldHandler fieldHandler, TypeValidator validator)
public void setValue(java.lang.Object target,
java.lang.Object value)
throws java.lang.IllegalStateException
setValue in interface FieldHandlersetValue in class XMLFieldHandlertarget - the object in which to set the valuevalue - the value of the fieldjava.lang.IllegalStateException - The Java object has changed and is no longer
supported by this handler, or the handler is not compatiable with the
Java object.public java.lang.Object getValue(java.lang.Object target)
throws java.lang.IllegalStateException
getValue in interface FieldHandlergetValue in class XMLFieldHandlertarget - the object from which to get the valuejava.lang.IllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectpublic void resetValue(java.lang.Object target)
throws java.lang.IllegalStateException
AbstractFieldHandlerReference fields are set to null, primitive fields are set to their default value, collection fields are emptied of all elements.
resetValue in interface FieldHandlerresetValue in class XMLFieldHandlertarget - The objectjava.lang.IllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler is not
compatiable with the Java objectpublic void checkValidity(java.lang.Object object)
throws ValidityException,
java.lang.IllegalStateException
checkValidity in interface FieldHandlercheckValidity in class ExtendedFieldHandlerobject - The objectValidityException - The field is invalid, is required and
null, or any other validity violationjava.lang.IllegalStateException - The Java object has changed and
is no longer supported by this handler, or the handler
is not compatiable with the Java objectpublic java.lang.Object newInstance(java.lang.Object parent)
throws java.lang.IllegalStateException
newInstance in interface FieldHandlernewInstance in class XMLFieldHandlerparent - The object for which the field is createdjava.lang.IllegalStateException - This field is a simple type and
cannot be instantiatedpublic boolean equals(java.lang.Object obj)
equals in class XMLFieldHandlerIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com