ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Butler <jeffgbut...@gmail.com>
Subject Re: upgrading to ibator 1.2.1-681 and overriding DAO Generator methods
Date Wed, 22 Apr 2009 21:17:52 GMT
If the DAOTemplate won't work, then you should use a plugin.  There
are plugin methods for every DAO method and you could use those
methods to completely rewrite each method if you needed to.
Alternatively, you could configure Ibator so that it doesn't generate
any DAO classes and then use a plugin to generate your entire DAO
class (with the contextGenerateAdditionalJavaFiles method).

Jeff Butler



On Wed, Apr 22, 2009 at 4:09 PM, javaguy44 <javaguy44@yahoo.com> wrote:
>
> Hi,
>
> I'm looking to upgrade my ibator version from 1.1.0-426 to the latest stable
> release 1.2.1-681.  I've been
> looking over the docs regarding extending / implementing IbatorPlugin and I
> have a few questions.  Previously, I was defining a custom DAOGenerator so
> that I could override the methods generated for the DAOImpl e.g.
> SelectByExample, insert, delete etc.  It was straightforward as my custom
> DAOGenerator extended extended BaseDAOGenerator which I declared in abator
> configuration.
>
> Looking at v1.2.1, I see that providing a custom DAOGenerator has changed.
> Following the documentation, declaring a custom DAOTemplate in daogenerator
> config doesn't give me access to overriding a custom implementation of
> methods(SelectByExample, SelectByPrimaryKey) etc.  Doing a debug / tracing
> through the code, it seems like to upgrade + continue to override DAO
> methods, i will have to:
>
> - extend from IntrospectedTable
> - extend from DAOGenerator
> - extend from each MethodGenerator that I need to override
>
> Can someone please verify if this is correct?
>
> Many thanks
>
> --
> View this message in context: http://www.nabble.com/upgrading-to-ibator-1.2.1-681-and-overriding-DAO-Generator-methods-tp23175863p23175863.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message