ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-François Daune <...@cigersoft.be>
Subject RE: Extending IBATIs
Date Mon, 30 Jul 2007 07:20:26 GMT
OK. I know why I have not found it: it is neither in 2.3.0, nor in developer's guide.
That's the added value of this list!
Could someone tell me the iBATIS version I should use?
The feature has been introduced in february, and I don't know if there have been releases
since february.

-----Message d'origine-----
De : Clinton Begin [mailto:clinton.begin@gmail.com]
Envoyé : lundi 30 juillet 2007 9:06
À : user-java@ibatis.apache.org
Objet : Re: Extending IBATIs

And I still don't understand why direct to field mapping (therefore bypassing setters altogether)
won't work for you?


On 7/30/07, Clinton Begin < clinton.begin@gmail.com> wrote: 

You can make the setters private...


On 7/30/07, Jean-François Daune < jfd@cigersoft.be> wrote: 

Well, I feel that iBATIS needs 'special' access to the classes.
I have a very good case. We store the last modification date for many objects. So, I wanted
to update the field 'lastUpdateTime' in all setters.
But this does not work if iBATIS populates the object using the same 'setters' than other
I feel this relates to the 'anemic model' anti-pattern.
One simple solution is just to have dedicated setters (e.g. prefixed by 'ibatis')
They could be declared by adding a 'setter-method' directive in the result map (or using annotations)
I have just started using iBATIS and appreciate a lot its simplicity, but I am really uncomfortable
weakening that much my object model.

 -----Message d'origine-----
De : Clinton Begin [mailto: clinton.begin@gmail.com]
Envoyé : vendredi 27 juillet 2007 21:22
À : user-java@ibatis.apache.org
Objet : Re: Extending IBATIs

No...and going forward, we'll support JavaBeans only in that get/set methods are properties.
 The JavaBeans spec and related APIs including BeanInfo are horrible and have created far
more problems for us and others than they have solved. 

In the future we'll support classes as classes, not classes as JavaBeans.

That said, sorry for ProbeFactory being static, there's no excuse for that.  


On 7/27/07, Daniel Pitts < Daniel.Pitts@cnet.com> wrote: 

Does iBATIS use Introspector and BeanInfo?  If it does (and it should!), then you can create
a custom BeanInfo class that defines the getter/setter methods for particular properties.


From: Clinton Begin [mailto: clinton.begin@gmail.com] 
Sent: Friday, July 27, 2007 8:57 AM
To: user-java@ibatis.apache.org
Subject: Re: Extending IBATIs

Can you live with simply letting it map directly to the fields?


On 7/26/07, Jean-François Daune <  <mailto:jfd@cigersoft.be> jfd@cigersoft.be >


I would like to customize iBATIS by replacing use of Javabeans setter as default with custom
setter (with a prefix). 

Is it possible? 

I do not see any extension point for this in iBATIS. ProbeFactory is impossible to extend.



View raw message