Title: FieldHandler associated with a class instead of a field

I've written my own DateFieldHandler that extends GeneralizedFieldHandler.  It works great when I associate it with a field as follows.

<mapping>
    <description>Description of the mapping</description>
    <class name="com.agedwards.model.Person">
        <field name="birthday" type="date"
            handler="com.agedwards.core.xml.DateFieldHandler">
            <bind-xml name="dateOfBirth" node="element"/>
        </field>
    </class>
</mapping>

However, what I really want to do is associate it with ALL fields of type java.util.Date.  In my real application there are too many such fields to do this for each one and I don't want to have to update my mapping file every time a new object field of type java.util.Date is added.

Is there a way I can associate a handler with a class instead of a field?



***********************************************************************************
WARNING: All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************

Reply via email to