OK, Thanks, I've got the merge version working OK now.
I'm surprised that more people don't want to do this tho'. I've sent a
Collection of *Data object over to a client, the client is updating
them and sending them back to the server to be updated. It seems that
it would be common to want to do something like...
public void updateCustomer(CustomerData custData) {
try {
Customer cust = custHome.findByPrimaryKey(
CustomerUtil.getPkFrom(custData));
cust.setData(custData);
} catch ( ... ) {
// handle problems ;-)
}
}
I know there are potentially some multi-user issues with this, I'm not
worried about this for this particular app I'm writing, I'm just going with
last update succeeds.
Dunno, maybe I'm talking rubbish (again...)
On Fri, Nov 30, 2001 at 01:27:01AM +0330, Ara Abrahamian wrote:
> I don't think it's needed for most cases. So I veto this :-)
> But to make your life easier I added util-custom.j merge point to
> util.j, so just put the your custom stuff into a file named
> util-custom.j and put it in where the mergeDir parameter of ejbdoclet
> points to. Ejbdoclet will pick it up and add it to the template and
> generate it!
>
> Ara.
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:xdoclet-devel-
> > [EMAIL PROTECTED]] On Behalf Of Neale Swinnerton
> > Sent: Thursday, November 29, 2001 8:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Xdoclet-devel] Utility Method
> >
> > Hi,
> >
> > I need to extract the PK from a Data object. I've written a template
> (ie
> > .j ) snippet to generate a method of the form ...
> >
> > // method to extract the PK from a Data object.
> > public CustomerPK getPKFrom(CustomerData data) {
> > CustomerPK pk = new CustomerPK();
> > pk.setCustomerIdf(data.getCustomerId());
> >
> > ...
> >
> > return pk;
> > }
> >
> > I've put it in the util.j template, although I was split whether it
> should
> > be in the Data object. If you want to include it a patch is attached.
> I'll
> > leave it to you to decide where it should 'really' go.
> >
> > --
> > regards
> >
> > Neale Swinnerton
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
--
regards
Neale Swinnerton
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel