Feature Requests item #449838, was opened at 2001-08-10 09:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=402707&aid=449838&group_id=31602

Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Andrew Stevens (stevensa)
Assigned to: Vincent Harcq (vharcq)
Summary: Generate only getter for persistent flds

Initial Comment:
Currently, if I indicate a persistent field in an 
entity bean, the generated BMP or CMP class 
automatically contains both a getter and a setter 
method for it.

I have a database table with some columns that are 
filled in automatically by a trigger.  I want to 
include these in my entity bean, so they can be 
queried/displayed, but they need to be read only; 
while I can have the setter method throw an exception 
and/or not be included in the remote interface, 
ideally I'd like it not to be there at all.  Likewise, 
I suppose it's possible (though extremely unlikely) 
that a persistent field might be required to be write-
only and so not need a getter.

It would therefore be nice if XDoclet could generate 
just a getter or setter in the BMP/CMP class, as 
required.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-30 08:15

Message:
Logged In: NO 

I agree with you Andrew. It should do a ifHasMathod for the 
setter and define it in cmp/bmp class.
BTW, why don't you send me the patch to fix it?! Way too 
many bugs to fix and features to impl.

Ara.

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

Comment By: Andrew Stevens (stevensa)
Date: 2001-08-29 08:31

Message:
Logged In: YES 
user_id=247081

Well, the setter-method parameter is an improvement, except 
that:
- it's only used on pk-fields, while the documentation says 
it applies to persistent-fields.
- it only works with CMP, not BMP.
- if you use setter-method="true" it doesn't create one.

Also, I'm still creating abstract getter and setter methods 
as appropriate for all the persistent fields anyway (in 
order to specify container-managed transaction behaviour, 
interface view-type etc. for them).  Couldn't the xdoclet 
templates just check for whether or not there's an abstract 
getter and/or setter method in the bean class for each 
persistent field when adding them to the BMP/CMP class?  
That seems more intuitive than having getter methods in the 
bean class determining the setter methods in the BMP 
class... plus, it would allow for having a setter method 
and no getter (assuming you can think of some bizarre 
reason for doing it).

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

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

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

Reply via email to