> I would like to generate a finder method (e.g. findByCrtieria) in my
home
> interface with all the defined attributes (e.g. all @ejb:persistent-
> field),
> anyway that I can automate this (cuz this is one of our standard
finder
> method in all the entity bean)?
You mean you want findByCriteria( persistent-field1, ...,
persistent-fieldn) and you want xdoclet to list the parameter
types/names automatically? <XDoclet:persistentfieldList/> is the
template tag that does exactly that. Modify home.j and handle it, like
this:
<XDoclet:ifIsDerivedFrom self-or-derived-from="javax.ejb.EntityBean">
public <XDoclet:componentInterface type="remote"/>
findByCriteria(<XDoclet:persistentfieldList/>)
throws java.rmi.RemoteException,javax.ejb.FinderException;
</XDoclet:ifIsDerivedFrom>
Or you can create a custom.j file with exactly only the above lines in
it and put it in your mergedir.
> P.S.
> We use Session Controller (Session Bean) to wrap the Entity Bean, any
way
> that I can generate this (and this one is quite simple) during the
bean
> generation? (i.e. does ejbdoclet allow to generate additional self-
> defined
> file(s)?)
You can easily create a sessionwrapper.j template file; there you define
how the Session Controller looks like. Look at xdoclet's source, you'll
get the idea. BTW, it's an interesting feature, probably worth to be
part of the core, though I don't know how we can make it generic and
satisfy everyone.
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/xdoclet-user