I think I understand what you're asking, and the answer is "no" -- @ejb.persistence has nothing to do with putting methods into your remote/local interfaces. It is used to tell the container what column to map the attribute to. Here's an example:
/** * @ejb.interface-method * @ejb.transaction type="Supports" * @ejb.persistence * column-name="birth_dt" */ public abstract Date getBirthDate ( ) ; /** * @ejb.interface-method * @ejb.transaction type="Mandatory" */ public abstract void setBirthDate ( Date birthDate ) ; @ejb.interface-method tells xdoclet to put both methods into the interfaces (remote cannot be default here because I am only generating the local interface [EMAIL PROTECTED] view-type="local" at the class level], and they appear there). @ejb.persistence column-name="birth_dt" tells xdoclet to generate the XML to map "birthDate" to "birth_dt". It has no affect on the interfaces whatsoever. If you want this tag to force xdoclet to put the accessors into your interfaces, you'll need to modify the xdt template that generates the interfaces. I don't see any other way around that. Is this what you were asking? If not, then I guess I'm still not understanding you. ;) Let me know. David Harkness Sony Pictures Digital Networks (310) 482-4756 -----Original Message----- From: Jean-philippe VIGNIEL [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 2:49 AM To: [EMAIL PROTECTED] Subject: Re: [Xdoclet-user] Add relation or persistent member accessor to the public interface I'm not sure you've really understood my problem (i'm not sure it was clearly explained :)) Generating a method by adding the @ejb.interface works fine. On the other hand all methods tagged by @ejb.persistence or @ejb.relation are not added to the interfaces. I guess it's the default behavior. If you tag these methods with the both tags, nothing is added to the interfaces as well. What i'm looking for, is a way to add these methods to the interfaces (remote or not). To resume, i want to write class ABean{ /** /* @ejb.persistence /* **/ public abstract String getId(); public abstract void setId(String id); } and have as result interface A { String getId(); void setId(String id); } or interface ALocal { String getId(); void setId(String id); } Is it really what you have understood about my needs? [EMAIL PROTECTED] wrote: On Wednesday 13 Aug 2003 07:57, Jean-philippe VIGNIEL wrote: Thanks for your answer. I think i've not correcltly explained what i want to do. I would like to add persistent members accessors of an entity bean to its interface. I've already tried to add the ejb.interface-method to a persistent member definition, but it doesn't work. Indeed, if I write the following code class ABean { /** * @ejb.interface-method * @ejb.persistence * * */ public abstract String getId(); public abstract void setId(String id); } The getId and setId methods are not added to the A or ALocal interfaces. Any idea to do that? The view-type="local" parameter on the @ejb.interface-method specifies to add it to the Local interface only - make sure you have that local specified. The default is "remote" ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
