ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Reeves <ch...@ev-soft.net>
Subject Scala object support in iBATIS 3
Date Thu, 31 Dec 2009 05:41:38 GMT
Hello,

I would like to add support for scala objects to iBATIS 3 for a
project I'm working on, and I have a few questions before I dive in
too deep.

>From what I can tell, this basically entails adding a new wrapper in
org.apache.ibatis.reflection.wrapper that can handle scala's slightly
different property naming conventions. Then, the forObject method in
MetaObject would need to use the new wrapper for the appropriate
objects. Is that more or less all that is necessary, or have I missed
something? I will be playing with this tomorrow, but I though I'd ask
the community as well.

Assuming I'm on the right track, I wonder if it would make sense to
have a factory for wrappers that could be modified as part of the
configuration. This would allow the scala support to be added to the
project in a contrib module so the main project would have no
dependencies on the scala libraries, as I will probably use the
ScalaObject marker interface to create the appropriate wrapper. Of
course, if no one else is interested in native scala object support,
this is moot.

However, other getter/setter naming strategies that don't conform to
the javabeans spec could also be plugged in if there was a
configurable wrapper factory, which probably isn't very useful to most
java developers, but may be useful for other jvm languages or some
seriously strange legacy cruft.

Thanks, Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message