I write bean classes, which have a hierarchy. All classes in hierarchy 
are abstract, and not used for actual CMP bean generation, except for 
leaf nodes. I also use XDoclet to create data object. Quite naturally, 
data objects follow hierarchy parallel to one of the beans. XDoclet puts 
all attributes of parent classes in child classes and marks them as 
protected. Can't agree that this does work, but this is not right.... 
Any workaround?

Also, I have an option of generating my data object myself. If I do that 
and exclude dataobject subtask (but keep all dataobject-related tasks in 
the Bean class), CMP generated will be different. It misses getData 
method, which I like so much and do not want to write myself. Can 
anything be done to about that? I like getData...

The other problem with data object is that I want to emit custom code in 
this objects, and I can't describe the code using dataobject-custom.j 
thing. What I am trying to do is allow lazy-loading of related objects 
from data object. So it contains some finder-related methods, which go 
and fetch the data. Body and names of the methods are not directly 
related to attributes and methods of the data object class. To "include" 
my code in data objects I create intermediate classes, which have my 
methods, and use them as parent classes for data objects. This solves 
the problem, but is there a more elegant solution?

Final (I did not want to write so much...) minor thing is that for each 
method or attribute declared as public, and for each attribute defined 
static or final in public interface jikes in pedantic mode says: 
Warning: The use of the "final" (or "public", or "static" -- me) 
modifier in this context is redundant and strongly discouraged as a 
matter of style. It's annoying...

Turns to be longer than expected...

Thanks for all help and a nice tool.
Michael Elizarov


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

Reply via email to