Here's what I was able to do add helper methods to my value objects that
don't correlate to persisted fields (get/set), without using merge:

In the bean class, I added the extends attribute to my class level
value-ojbect tag so my bean class can extend the parent class:
/[EMAIL PROTECTED]
   *      name="MyEntity"
   *      match="*"
   *      extends = "com.mypackage.ejb.BaseProvider"
   *

I like keeping the helper methods seperate from the ejb get/set persisted
methods/fields.
In the non-persisted methods, I only add the tag:

  /**
   * @ejb.interface-method
   */
and leave off the persistence tag.
I also declare class member variables in the parent class that is extended.
The generated value object then extends the parent class, BaseProvider, so
my generated value object has access to the methods and member variables in
BaseProvider.

/Lorraine

-----Original Message-----
From: Harkness, David [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:47 PM
To: [EMAIL PROTECTED]
Subject: RE: [Xdoclet-user] request for ejb.valueobject-method


Lorraine Fox wrote:
> I'd like to request that xdoclet have a tag that will create
> value object methods beyond the entity field get/set, such as
> @ejb.valueobject-method 

I thought there was a merge-point for value objects, but looking in the
template I do not see one. You can extract and modify the template
(entity-value.xdt) and add a custom merge-point that would allow you to
add extra fields and methods as you desire. You can also put {0} in the
name of the file where it's included (not the actual file name) and it
will replace it with the bean name, allowing you to have different merge
files for each bean.

Good luck!

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


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified that
any dissemination, distribution or copying of this e-mail is prohibited. If
you have received this e-mail in error, please notify the sender by replying
to this message and delete this e-mail immediately.


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to