db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: JDO2 Annotations
Date Mon, 26 Jun 2006 10:40:00 GMT
For information, you can find an initial (top-level) set of suggested JDO2
annotations at
http://jpox.cvs.sourceforge.net/jpox/JPOX/Plugins/Java5/src/java/org/jpox/annotations/
in case JDO2 decides to adopt its own annotations.

The aim with these is to retain the mapping MetaData<->Annotation (which is what
JPA does, just they dont have such generalised MetaData so cant specify things
that we need). The main annotations are

@PersistenceCapable
class MyClass
{
    @PersistentField
    String myField;

    ...
}

@PersistenceAware
class MyAwareClass
{
    ...
}

The "class" metadata element maps to the "PersistenceCapable" annotation. The
"field" metadata element maps to the "PersistentField" annotation. The only place
where this differs in this sample set is that I split out "PersistenceAware" as
its own annotation.

--
Andy

Mime
View raw message