openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Bauer <techhu...@gmail.com>
Subject Re: Custom Annotations
Date Tue, 19 Oct 2010 17:05:19 GMT
Hi Idan,

Field level information is stored in OpenJPA's FieldMetaData or FieldMapping
(a subclass of FieldMetaData) objects.  FieldMetaData extends an abstract
class org.apache.openjpa.meta.Extentions.  While I've never used Extensions,
it looks like you could parse out your specific annotation in the annotation
parser and set a value in the FieldMetaData as an extension.  Then,
depending on the method you are overriding, you may be able to get access to
the FieldMetaData/FieldMapping and its extension(s) within your custom
dictionary.

-Jeremy

On Tue, Oct 19, 2010 at 10:41 AM, idan <idanmo@gmail.com> wrote:

>
> Hey,
>
> I'm still struggling with the code understanding how exactly to get my new
> annotation pass all the way to the create table statement in DBDictionary
> (I
> implemented my own custom dictionary).
>
> I started by identifying the annotation in
> AnnotationPersistenceMappingParser/AnnotationPersistenceMetaDataParser but
> i
> still cant manage to actually pass this information onwards.
>
> Currently i'm only trying to add a boolean flag which states if my
> annotation exists on a certain field or not.
>
> Note that I don't want to change OpenJPA's code but to inject my own
> implementations where needed.
>
> Any clues here?
>
> Thanks,
> Idan
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Custom-Annotations-tp5631231p5651345.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message