db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: Attibute modifications in schema
Date Fri, 01 Oct 2010 14:23:54 GMT
> ...
> About the problem with inheritance I guess there needs to be some
> discussion. There would be one way which possibly most people around
> here do not like, that would be bytecode enhancement after compilation.
> Since this would be some kind of religious war I'm open to other
> possibilites.
> I would like to see some discussion on that topic.

My personal goal would be to remove te necessity to inherit from
BaseObject. If anything like it is required, the object should rather
implement an interface.

> > b) I would welcome an annotation-based approach. I do not think
> > implementation would be too difficult given the 4.0 generator
> > implementation, it would mean to implement just another
> > org.apache.torque.generator.source.SourceProvider (there are already
two of
> > them). Of course some design questions need to be splved, which might
> > difficult in detail, but the implementation to the generator is
> > straightforward.
> I would try to implement a SourceProvider in the first stage after there
> was some discussion, enough interest and a basic concept how to
> implement it.

Personally I'm not interested, I'd rather edit an XML file than annotate
classes. Others? You can also ask at the users list.

I have thought a bit about the AnnotationSourceProvider class. It could be
split in two parts:
- A general AnnotationSourceProvider which reads annotated classes (this
would be in the generator). It would have an annotation processor
configured in, which translates the annotations to a source tree.
The annotationProcessor interface would also live in the generator. It
would get e.g. a list of annotated classes which themselves contain the
annotated methods (and members, but personally I do not think annotating
members is a good idea) and would be responsible to create a source tree
from the annotated classes. General helpers (e.g. add all annotation
attributes as attributes of an elment in teh source tree) would also live
in the generator.
- The annotation processor and the specific annotations would be part of
the templates.


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message