Re: Scala object support in iBATIS 3
2010-01-01 03:05:48 GMT
Thanks Clinton; for an excellent mapper that's well designed and for
the pointers.
Here is what I came up with for an object wrapper factory. I don't
really like keeping it in static field on MetaObject, but I couldn't
come up with anything better. I'm not entirely certain the xml
configuration part is done correctly, but it adds
<ObjectWrapperFactory type="com.something.MyFactory" /> in the same
way as ObjectFactory.
I was hoping to be able to subclass BeanWrapper to accomplish my goal
of supporting scala objects, but it looks like it delegates to much to
Reflector and MetaClass. I will post my code for a scala object
wrapper and more generic base class when I complete it, if anyone is
interested.
Thanks, Chris
On Thu, Dec 31, 2009 at 11:00 AM, Clinton Begin <clinton.begin <at> gmail.com> wrote:
> For both cases, I believe all necessary changes would be in the wrappers.
> However, there are places where Map is treated like a special case. But as
> long as you stick to making a peer to the bean wrapper, then you should be
> fine.
>
> While there's no factory class, the MetaObject framework uses a factory
> method w/ delegates rather than a constructor, and is aware of all known
> implementations.
>
> private MetaObject(Object object, ObjectFactory objectFactory) {
> this.originalObject = object;
(Continue reading)
>>
>>
>>
>> On Thu, Dec 31, 2009 at 11:29 AM, Simone Tripodi <simone.tripodi <at> gmail.com>
>> wrote:
>>>
>>> Hi Clinton,
>>> sure, I'll add the Jira ticket for this, but since here in Italy,
>>> because of the timezone, started celebrating the new year, I'll do it
>>> tomorrow :P
>>> BTW, I discourage the use of the test
>>>
>>> value == Cache.NULL_OBJECT
>>>
RSS Feed