That may be easier, but that's not how we're using out entity beans here. All access goes through a session bean, and DataTransferObjects (generic value objects) are returned to the web tier to be used. Any changes are sent back to the session bean to be merged into the entity beans. Therefore, I definitely do not want any of the CMP/CMR accessors to be exposed through the interface.
That being said, it would be very cool to be able to specify certain tags that "imply" other tags in xdoclet. In your case, you would want @ejb.persistence --> @ejb.interface-method You could of course do this yourself in the .xdt template if they allow "or" logic. Where it checks for "ejb.interface-method", just change it to also check for "@ejb.persistence". I don't know if the xdt language allows this, but it may be worth some research on your part. David Harkness Sony Pictures Digital Networks (310) 482-4756 -----Original Message----- From: Jean-philippe VIGNIEL [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 11:36 PM To: [EMAIL PROTECTED] Subject: Re: [Xdoclet-user] Add relation or persistent member accessor to the public interface [EMAIL PROTECTED] wrote: >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. > > Thanks for the confirmation, it was exactly what i asked for :). I don't understand why these methods aren't added to the interface espacially in case of relation. It's simpler to use the getRelation() than getting a value object and then a findById. > > ------------------------------------------------------- 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 ------------------------------------------------------- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code4 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
