You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Paul Carr <Pa...@express-gifts.co.uk> on 2006/03/16 12:01:15 UTC

Abator VO generation

Hi Jeff, is there a way to make abator only generate the DAO's and leave
the VO's alone and SQLMaps alone ? (the DTD seems to enforce all must be
generated )
 
 
-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com] 
Sent: 10 March 2006 17:28
To: user-java@ibatis.apache.org
Subject: Re: How to make dao's / vo's more polymorphic
 
Yes - that's a difficult problem on many levels.  First there's the
difficulty of the introspection (and what to do if there's a collision).
Second there's the issue of classloading - in Eclipse it would be
difficult to see the base class because the plugin has a different
classloader than the Eclipse project (this can be solved in Eclipse 3.1
with OSGi buddy classloaders, but complex).  Initially, I would probably
take the easy way out and generate a warning message if possible.  Other
than that, it would be the responsibility of the user to make sure this
wouldn't happen. 
 
Jeff Butler

 
On 3/10/06, Engel, Gregory A <GA...@tribune.com> wrote: 
One thing I ran across with this when generating code that you should be
aware of (you probubly already are)
is that you have to be careful of declaring varables in the extended
class with the same name as the one
in the base class.
 
So you have to inspect the base class before generating the code of the
extended class
and only generate fields and getters/setters for the diff. Otherwise you
will end up with
variable hiding which can be frustrating if later you cast to the base
class.
	-----Original Message-----
	From: Jeff Butler [mailto:jeffgbutler@gmail.com ]
	Sent: Friday, March 10, 2006 8:55 AM
	To: user-java@ibatis.apache.org 
	Subject: Re: How to make dao's / vo's more polymorphic
Abator doesn't have support for this now - but it should be fairly
simple to add.  Abator would not generate these base objects, it would
just assume they are there and use them - right???
 
Jeff Butler

 
On 3/10/06, Paul Carr <Paul.Carr@express-gifts.co.uk > wrote: 
Hi All,

Is there a way to make the DAO's and VO's generated by abator all extend
a single class or implement a common interface? 

Ideally I'd like all my DAO interfaces to extend a BaseDAO and all my
value objects to extend a BaseValueObject automatically as abator
creates them ???

Best Regards
Paul.
 
 

Re: Abator VO generation

Posted by Jeff Butler <je...@gmail.com>.
No.  The SqlMaps are dependant on the VOs and the DAOs are dependant on both
- so only the DAOs are optional (it didn't make sense to me to generate VOs
without SqlMaps).

What problem are you trying to solve?  If this is a regeneration thing,
Abator will ignore any additions you've made to the VOs and SqlMaps - they
will carry through a regeneration.

Jeff Butler


On 3/16/06, Paul Carr <Pa...@express-gifts.co.uk> wrote:
>
>  Hi Jeff, is there a way to make abator only generate the DAO's and leave
> the VO's alone and SQLMaps alone ? (the DTD seems to enforce all must be
> generated )
>