ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Slate <jsl...@mtl.mit.edu>
Subject Re: passing in java date
Date Fri, 22 Aug 2008 17:27:36 GMT
Hehehe! Well, yeah, you are probably right. I have no specific love for 
the Java date APIs. It's just that I want my application logic to be in 
one place, in the application layer. But maybe I should just let go of 
that hangup...

On the other hand, I did look some more into how I'd do the proxy thing. 
I think I could could provide before advice to all the methods in 
SqlCleintMap that take a parameter object, and swap out that object for 
a map, using the handy com.ibatis.common.beans.ClassInfo class to get 
the readable properties from the parameter object and set entries in the 
map. Then I could also add additional entries in the map, like the 
current date. Or does that sound like an LSD-induced nightmare? ;)


Larry Meadors wrote:
> Really? Man, I think the Java date APIs suck worse than any SQL
> dialect ever conceived. :-)
> It's like they were created by a mad man after a vision he had in a
> LSD-induced nightmare where colors tasted like music.
> Larry
> On Fri, Aug 22, 2008 at 9:20 AM, Jonathan Slate <jslate@mtl.mit.edu> wrote:
>> I can. I'd just prefer to work with Java dates. If it is really INSERT INTO
>> foo (time, value) values ([six days from now at midnight], 'bar') I'd rather
>> be figuring out the time using Java rather than coding "six days from now at
>> midnight" in SQL. (Clearly I do have options here, I'm just looking for the
>> one that is the most straightforward to implement and maintain.)
>> -Jonathan

View raw message