Hi Rick,
 
It turns out that you can use either one.  TypeHandlerCallback is a bit simpler to implement than TypeHandler, but either will do.  We call the XML attributes "typeHandler" for brevity.
 
If you use TypeHandlerCallback, then the class com.ibatis.sqlmap.engine.type.CustomTypeHandler is used internally to simulate a full TypeHandler.
 
Off to update the documentation...sigh...
 
Jeff Butler
 
PS - I have nothing against the ternary operator!  I didn't write that section of the manual, so I don't make any claims about the code style :)
 


 
On 6/29/06, Rick <[EMAIL PROTECTED] > wrote:

Jeff,

 

I downloaded the guide out of svn. It does mention TypeHandler (which is what I used), but it also mentions TypeHandlerCallback.

 

TypeHandler seems very similar to TypeHandlerCallback, with the exception that TypeHandlerCallback seems to have the ability to be applied globally.

 

Which should I use? What is the difference?

 

You were right about the example, it is very similar to what I did.

 

 

P.S.

Mine was more terse….

I don't use constants unless they are needed in more than one method or their value is not clear what they are doing.

What do you have against the ternary operator?

 

 

--Rick Hightower


 

Reply via email to