|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.castor.mapping.loader.FieldHandlerFriend<T>
org.exolab.castor.mapping.ExtendedFieldHandler<T>
org.exolab.castor.mapping.AbstractFieldHandler<T>
org.exolab.castor.xml.XMLFieldHandler
org.exolab.castor.xml.handlers.CollectionFieldHandler
public class CollectionFieldHandler
A FieldHandler for the XML Schema Collection type.
TODO : support all kind of XSList.
| Field Summary |
|---|
| Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
|---|
_properties |
| Constructor Summary | |
|---|---|
CollectionFieldHandler(FieldHandler fieldHandler)
Creates a new CollectionFieldHandler using the given FieldHandler for delegation. |
|
CollectionFieldHandler(FieldHandler fieldHandler,
TypeValidator validator)
Creates a new CollectionFieldHandler using the given FieldHandler for delegation and the given type validator for validation. |
|
| Method Summary | |
|---|---|
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 the delegated handler. |
Object |
getValue(Object target)
Gets the value of the field associated with this descriptor. |
Object |
newInstance(Object parent)
Creates a new instance of the object described by this field. |
void |
resetValue(Object target)
Sets the value of the field to a default value. |
void |
setValue(Object target,
Object value)
Sets the value of the field associated with this descriptor. |
| Methods inherited from class org.exolab.castor.xml.XMLFieldHandler |
|---|
newInstance |
| Methods inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
|---|
getFieldDescriptor, hasValue, setConfiguration, setFieldDescriptor |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionFieldHandler(FieldHandler fieldHandler)
fieldHandler - the fieldHandler for delegation.
public CollectionFieldHandler(FieldHandler fieldHandler,
TypeValidator validator)
fieldHandler - the fieldHandler for delegation.validator - Type validator to use to validate an instance of this type.| Method Detail |
|---|
public void setValue(Object target,
Object value)
throws IllegalStateException
setValue in interface FieldHandlersetValue in class XMLFieldHandlertarget - the object in which to set the valuevalue - the value of the field
IllegalStateException - if any value provided fails validation.
public Object getValue(Object target)
throws IllegalStateException
getValue in interface FieldHandlergetValue in class XMLFieldHandlertarget - the object from which to get the value
IllegalStateException - if any value provided fails validation.
public void resetValue(Object target)
throws IllegalStateException
resetValue in interface FieldHandlerresetValue in class XMLFieldHandlertarget - The object to reset
IllegalStateException - if the Java object has changed and is no
longer supported by this handler or the handler is not
compatible with the Java object
public void checkValidity(Object object)
throws ValidityException,
IllegalStateException
checkValidity in interface FieldHandlercheckValidity in class ExtendedFieldHandlerobject - 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
public Object newInstance(Object parent)
throws IllegalStateException
newInstance in interface FieldHandlernewInstance in class XMLFieldHandlerparent - The object for which the field is created
IllegalStateException - This field is a simple type and cannot be
instantiatedpublic boolean equals(Object obj)
equals in class XMLFieldHandlerobj - The object to compare to this.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||