|
Is there an official API for supporting Joda Time? If so, where is it? If not, I'm not certain I completely understand how to write a custom handler to handle Joda's DateTime object and perform the conversion to/from a SQL Date object.
Any assistance would be most welcome. Thanks. --adam |
|
There are not built-in typehandlers for joda time.
Google as always, gives really interesting information: https://github.com/LukeL99/joda-time-mybatis/tree/master/src/main/java/org/joda/time/mybatis/handlers That seems to be a simple implemententation that may work for you depending on your needs. Have a look at this one for hibernate, there are quite a few more mappings. Not for MyBatis but may serve as a basis. http://joda-time.sourceforge.net/contrib/hibernate/userguide.html https://github.com/JodaOrg/joda-time-hibernate/tree/master/src/main/java/org/joda/time/contrib/hibernate On 3 ene, 19:35, icfantv <[hidden email]> wrote: > Is there an official API for supporting Joda Time? If so, where is it? If > not, I'm not certain I completely understand how to write a custom handler > to handle Joda's DateTime object and perform the conversion to/from a SQL > Date object. > > Any assistance would be most welcome. Thanks. > > --adam > > -- > View this message in context:http://mybatis-user.963551.n3.nabble.com/Mybatis-Joda-Time-Support-tp... > Sent from the mybatis-user mailing list archive at Nabble.com. |
|
In reply to this post by icfantv
On Tue, Jan 3, 2012 at 11:35 AM, icfantv <[hidden email]> wrote:
> Is there an official API for supporting Joda Time? If so, where is it? Not that I'm aware of. > If not, I'm not certain I completely understand how to write a custom handler > to handle Joda's DateTime object and perform the conversion to/from a SQL > Date object. You'd create a type handler. If you end up building one or more to work with joda time and want to share, then create a google code project and we may add it as a subproject if: - the license is compatible (looks like joda time's is - make sure you use ASL2) - your code's decent (and/or you're ok with people messing with it) - people are interested Larry |
|
In reply to this post by Eduardo Macarron
On Tue, Jan 3, 2012 at 4:59 PM, Eduardo <[hidden email]>
wrote:> https://github.com/LukeL99/joda-time-mybatis/tree/master/src/main/java/org/joda/time/mybatis/handlers Good find Eduardo! :) I wonder what the license is... Larry |
|
Hi Larry!
I cannot see any license but.. I think that is just a few lines of code and seems to be no activity. I would say that the official support for hibernate is a good basis for a MyBatis joda-time type handler library. The most difficult part is decide which joda-time types map to which JDBC types and viceversa. And that is already been done for hibernate. So the task of porting them to MyBatis should not be too hard. On 4 ene, 01:10, Larry Meadors <[hidden email]> wrote: > On Tue, Jan 3, 2012 at 4:59 PM, Eduardo <[hidden email]> > wrote:>https://github.com/LukeL99/joda-time-mybatis/tree/master/src/main/jav... > Good find Eduardo! :) > > I wonder what the license is... > > Larry |
|
In reply to this post by Eduardo Macarron
Yea, I saw that github project but we're going to be using this in 50+ production environments supporting 20M people and I wanted something that was a little more supported than someone's hobby. :-)
|
|
In am sorry but that is what you can get for free :)
On 4 ene, 16:57, icfantv <[hidden email]> wrote: > Yea, I saw that github project but we're going to be using this in 50+ > production environments supporting 20M people and I wanted something that > was a little more supported than someone's hobby. :-) > > -- > View this message in context:http://mybatis-user.963551.n3.nabble.com/Mybatis-Joda-Time-Support-tp... > Sent from the mybatis-user mailing list archive at Nabble.com. |
|
In reply to this post by icfantv
On Wed, Jan 4, 2012 at 8:57 AM, icfantv <[hidden email]> wrote:
> Yea, I saw that github project but we're going to be using this in 50+ > production environments supporting 20M people and I wanted something that > was a little more supported than someone's hobby. :-) I agree with Eduardo - I'd suggest doing one of 3 things: 1) integrate their code into your project and make it subject to your test/release cycle 2) copy their code into a separate google code project and make it open source 3) start your own open source project to do it I'd strongly suggest options 2 or 3 to get more hands and eyes on the code. It would also make it *possible* to hire someone who had used the code before (rolling your own framework code is NEVER EVER a good idea, imo). If you need professional support, feel free to contact me off-list and I can give you an idea of the cost of that. :-) Larry |
|
Unfortunately, I'm in a big time crunch and don't have time to work on this now. Perhaps when I finish my current UI project and move to the next one which is even bigger and makes more glorious use of java.util.Date.
However, if we decide to stick with GWT for that project, we won't be able to use JodaTime because of the severe limitations GWT places on its GWT-RPC protocol. |
|
In reply to this post by Larry Meadors
Hey guys,
joda-time-mybatis is my project. It's pretty incomplete, but it works for my purposes, although I would love to see it expanded upon. What license would you suggest in order to best serve everyone's needs? Thanks, Luke |
|
Disregard this. I added Apache license 2.0 to my source code, feel free to use it as needed.
|
|
Hi LukeL99. I saw your project googling some time ago.
Really useful indeed. There was a guy interested in joda-time typehandlers some time ago. Good work, go on with it! |
| Powered by Nabble | Edit this page |
