db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Galil" <Guy_Ga...@guardium.com>
Subject Re: Custom BaseObject and BasePeer
Date Thu, 02 Feb 2006 17:13:47 GMT
In Torque.jar look for all files with extension .vm 
To change BaseObject and BasePeer you need to look at om/Object.vm and
om/Peer.vm

As to how to edit them see the following reference from Bobbi Fox who
did a lot of work on this here:
"From
http://mail-archives.apache.org/mod_mbox/db-torque-user/200410.mbox/%
3C1098963075.12975.11.camel@localhost%3E
> 
 I end up at http://www.devaki.org/nextobjects/torque-type-map.html
 which tells you how Torque translates data types.
> 
 I found the message you were responding to; at
http://db.apache.org/torque-32/generator/properties-reference.html
 You can see that the build.properties files tells you where the
template
 path is, and the .vm files are in ${template_path}/om
> 
 Once you locate the .vm files, you can see what their doing, and figure
 out how to modify them. On Thu, 2006-02-02 at 17:28 +0100, Matteo"


 Barbieri wrote:
> I can't find those templates, where are they?
> Are they simple to modify?
> Thanks.
> 
> >The Base objects are generated using velocity templates - by default the
> >templates in the Torque jar are used - you can modify the
> >build.properties file to use the templates in some other location by
> >changing useClasspath=false and pointing templatePath to where your
> >templates are.
> >If you want any code to be added in any generated class add it in the
> >template and regenerate your classes.
> >On Thu, 2006-02-02 at 16:45 +0100, Matteo Barbieri wrote:
> >  
> >
> >>Hi,
> >>I have a question:
> >>I need some methods in all objects, obviusly I don't want to write them
> >>on each Base class, and I don't want to modify the BaseObject class.
> >>Is it possible to tell the generator that all Base classes have to
> >>extend MyCustomBaseObject (that extends BaseObject and implements the
> >>methods that I need)?
> >>
> >>Thank you
> >>Bye
> >>    
> >>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


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


Mime
View raw message