com.silverpeas.importExport.model
Class DateHandler
java.lang.Object
org.exolab.castor.mapping.loader.FieldHandlerFriend
org.exolab.castor.mapping.ExtendedFieldHandler
org.exolab.castor.mapping.AbstractFieldHandler
org.exolab.castor.mapping.GeneralizedFieldHandler
com.silverpeas.importExport.model.DateHandler
- All Implemented Interfaces:
- org.exolab.castor.mapping.ConfigurableFieldHandler, org.exolab.castor.mapping.FieldHandler
public class DateHandler
- extends org.exolab.castor.mapping.GeneralizedFieldHandler
The FieldHandler for the Date class
Fields inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
configuration |
Constructor Summary |
DateHandler()
Creates a new MyDateHandler instance |
Methods inherited from class org.exolab.castor.mapping.GeneralizedFieldHandler |
getValue, newInstance, resetValue, setCollectionIteration, setFieldHandler, setValue |
Methods inherited from class org.exolab.castor.mapping.AbstractFieldHandler |
getFieldDescriptor, hasValue, setConfiguration, setFieldDescriptor |
Methods inherited from class org.exolab.castor.mapping.ExtendedFieldHandler |
checkValidity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.exolab.castor.mapping.FieldHandler |
checkValidity |
DateHandler
public DateHandler()
- Creates a new MyDateHandler instance
convertUponGet
public Object convertUponGet(Object value)
- This method is used to convert the value when the getValue method is called. The getValue
method will obtain the actual field value from given 'parent' object. This convert method is
then invoked with the field's value. The value returned from this method will be the actual
value returned by getValue method.
- Specified by:
convertUponGet
in class org.exolab.castor.mapping.GeneralizedFieldHandler
- Parameters:
value
- the object value to convert after performing a get operation
- Returns:
- the converted value.
convertUponSet
public Object convertUponSet(Object value)
- This method is used to convert the value when the setValue method is called. The setValue
method will call this method to obtain the converted value. The converted value will then be
used as the value to set for the field.
- Specified by:
convertUponSet
in class org.exolab.castor.mapping.GeneralizedFieldHandler
- Parameters:
value
- the object value to convert before performing a set operation
- Returns:
- the converted value.
getFieldType
public Class getFieldType()
- Returns the class type for the field that this GeneralizedFieldHandler converts to and from.
This should be the type that is used in the object model.
- Specified by:
getFieldType
in class org.exolab.castor.mapping.GeneralizedFieldHandler
- Returns:
- the class type of of the field
newInstance
public Object newInstance(Object parent)
throws IllegalStateException
- Creates a new instance of the object described by this field.
- Specified by:
newInstance
in interface org.exolab.castor.mapping.FieldHandler
- Overrides:
newInstance
in class org.exolab.castor.mapping.GeneralizedFieldHandler
- Parameters:
parent
- The object for which the field is created
- Returns:
- A new instance of the field's value
- Throws:
IllegalStateException
- This field is a simple type and cannot be instantiated
Copyright © 2016 Silverpeas. All Rights Reserved.