ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: Custom property editor?
Date Wed, 24 Nov 2004 16:23:03 GMT
Aliaksandr Radzivanovich wrote:

>SQL Maps is great framework!
>In my current project java.util.Calendar is used to store dates in
>bean properties. Does SQLMaps work with this type?
Not out of the box.

>Is this possible to add custom property editor to a bean which would
>preprocess/convert property's value somehow before storing or after
>reading it from database?
Yes indeed.  Take a look at the javadocs for 
com/ibatis/sqlmap/client/extensions/TypeHandlerCallback.  It includes an 
example of how to write a true/false<->YES/NO mapper which should get 
you started.


PS - Where are the javadocs?  Okay, for now take a look at the source 
file - that's in the distribution under debug/ibatis-debug.jar.

Kris Jenkins
Email: kris@jenkster.com
Web:   http://cafe.jenkster.com/

View raw message