db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Engelbert <c.engelb...@u-form.de>
Subject Re: Attibute modifications in schema
Date Fri, 01 Oct 2010 14:54:11 GMT
 Am 01.10.2010 16:23, schrieb Thomas Fischer:
>> ...
>> 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
> be
>>> 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.

It would be (in my opinion) a nice possibility if Torque would use
the same annotations as JPA or JAXB. So there can be one class for
both persistence situations. Especially in times where webservices
grow and they are often implemented by Spring and other JAXB using
implementations.



> 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.
That sound very similar to the first intentions I had about how to
implement the SourceProvider.

About the users mailinglist, I'll add myself and start a discussion
about it.

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


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


Mime
View raw message