Bugs item #517022, was opened at 2002-02-13 16:51
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=517022&group_id=31602

Category: ejbdoclet
Group: cvs
Status: Open
Resolution: None
Priority: 5
Submitted By: Matt (mpetteys)
>Assigned to: Aslak Helles�y (rinkrank)
Summary: Patch: get/set methods for ejb:relation

Initial Comment:

Attached is a patch to create setter/getter methods 
for functions that are part of an ejb:relation.  With 
an ejb:relation  you want still want the getter setter 
method published in the interface so you can modify 
the relationship but you cannot mark the method as 
ejb:persistent-field because that field is created in 
the database through the defined relationship.  So 
this method looks through the methods looking for the 
ejb:relation fields and creating the getter/setter 
methods.

cvs -z9 diff entitycmp.j (in directory 
C:\java\xdoclet\core\resources\xdoclet\ejb\)
Index: entitycmp.j
=======================================================
============
RCS 
file: /cvsroot/xdoclet/xdoclet/core/resources/xdoclet/e
jb/entitycmp.j,v
retrieving revision 1.32
diff -r1.32 entitycmp.j
40a41,50
>   <XDtMethod:forAllMethods> 
>    <XDtMethod:ifHasMethodTag tagName="ejb:relation">
>    public abstract <XDtMethod:methodType/> 
<XDtMethod:getterMethod/>() <XDtMethod:exceptionList/>;
>    <XDtMethod:ifHasMethod 
name="<XDtMethod:setterMethod/>" 
parameters="<XDtMethod:methodType/>">
>    public abstract void <XDtMethod:setterMethod/>( 
<XDtMethod:methodType/> <XDtMethod:propertyName/> ) 
<XDtMethod:exceptionList 
method="<XDtMethod:setterMethod/>"/>;
>    </XDtMethod:ifHasMethod>
> 
>    </XDtMethod:ifHasMethodTag>
>   </XDtMethod:forAllMethods>
> 

*****CVS exited normally with code 1*****


----------------------------------------------------------------------

Comment By: Matt (mpetteys)
Date: 2002-02-15 23:49

Message:
Logged In: YES 
user_id=258771

I am not an expert so I don't know how the classloader sees 
these things but I know that at least the JBOSS app server 
generates an error if the abstract methods are not in the 
CMP class themselves.  Existing code in XDoclet recreates 
the abstract fields that are in the bean class and declared 
with ejb:persistent-field into the CMP class so there are 
duplicate abstract methods in both classes?  There must be 
a reason for that?

----------------------------------------------------------------------

Comment By: Andrew Stevens (stevensa)
Date: 2002-02-13 20:32

Message:
Logged In: YES 
user_id=247081

Am I missing something, or is this unnecessary?  You'll 
already have the abstract getter/setter methods in the bean 
class, in order to put the @ejb:interface-method tags on 
them.  So they'll already be inherited by the CMP class 
(and hence by the EJB Container generated stuff) whether or 
not it repeats the abstract declaration in xdoclet's CMP 
class?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402704&aid=517022&group_id=31602

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to