David

Thank you very much for this.

I'm sure this would work. My only concern is that - by putting my code in the template - I've made it harder to modify and develop the code. But that's not a significant problem in most situations.

Cheers,

Bruno.


On 10 May 2004, at 19:36, Harkness, David wrote:


Bruno Beloff wrote:
Now I want to extend the functionality of the VO.  Among other
things, I want to add compareTo(..) methods for the VO.

You can extend the template used to generate value objects (valueobject.xdt) with code that will create the compareTo method for you. The templates aren't too hard to modify, and the equals method should be a good starting point for you.

Alternatively, you can more easily modify the template to include a
custom value object merge point *for each class* (the current merge
point at the bottom of the file is for a single custom code block for
the whole build, not one per bean). This allows you to write plain Java
code to be included. You'll of course need to keep your merge files
up-to-date with any attribute changes in your beans, but that shouldn't
be that bad.

If you go the latter route, you just need to insert "-{0}" somewhere in
the merge file name.

   <XDtMerge:merge file="valueobject-custom-{0}.xdt">
                                           ^^^^

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user





------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to