Hi Dmitri,
Yes this is related to what I was trying to do and I did receive your
suggestions. Thank you. I am sorry for not acknowledging them. We are
taking your advice but there is still a problem. Lets say that I have a
persistent field "COMPANY_NAME" and I want to add an audit field
"LAST_MODIFIED_DATE". This is what I do (I think).
- I add code to the template to set the LAST_MODIFIED_DATE within the setter
for all persistent fields.
- I add a getter and a setter for COMPANY_NAME and include the persistent
tag.
- I add code to the jboss-jaws_xml.j (I am using JBoss) and ejb-jar_xml.j to
add the LAST_MODIFIED_DATE as a persistent field.
This works but I thought that it would be cleaner to have a tag that would
allow me to insert getter/setter code specific to that method. I think this
would be valuable for classes as well although I don't have a use for the
ifClassName tag right now.
Thanks again.
C.
-----Original Message-----
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 18, 2001 5:28 PM
To: Clarance Howatt
Cc: [EMAIL PROTECTED]
Subject: Re: [Xdoclet-user] Looking for a new template tag
I've just read Andrew's post on this, and figured that this is related to
what you were doing the other day, yes? Did you understand my
suggestion? The fieldNameLastModified field's getter's and setter's can
be generated based on the getter's for the fieldnames - your real problem
is going to be in ejb2 cmp how to do it... anyway, not 100% about how
you're planning to implement it but want to make sure you received my
suggestion...
> This is an enhancement request. I would like to see two new template tags
> included in XDoclet
> 1. <ifMethodNameEqual>
> 2. <ifMethodNameNotEqual>
I see no problem with this, but am surprised we dont have something
similar. I know we have <ifHasMethod> and stuff, but its not quite the
same thing. The other thing you could do is use the "looping variable" -
I cant remember what its called, but have seen functionality where you can
basically set a variable and then test against it, as a workaround you may
be able to do that.
Having said that, if you want to send a patch with those tags, it'd be
welcome.
cheers
dim
>
> These tags would allow me to include code within a template that is
targeted
> at a specific method within a class. After looking at the source I think
> that these will be very easy to create but I would like to know others
> thoughts before I create them.
>
> C.
>
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user