openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: FetchGroup implementation
Date Thu, 28 Aug 2008 21:21:04 GMT

On Aug 27, 2008, at 4:05 PM, Craig L Russell wrote:

> The JDO expert group has adopted a user-level API for configuring  
> FetchGroups at runtime. There is a factory for FetchGroup in the  
> PersistenceManager and PersistenceManagerFactory, corresponding to  
> EntityManager and EntityManagerFactory.
>
> I'd like to implement this concept for OpenJPA, and have a few  
> questions before I start.
>
> Currently there is an Annotation  
> org.apache.openjpa.persistence.FetchGroup that allows an annotation  
> to be defined for a class or field. There are also FetchPlan.java  
> and FetchPlanImpl.java in that same package. The FetchPlan is the  
> interface (not standard) and the FetchPlanImpl is the implementation  
> for the FetchPlan interface.
>
> So if we want to have an interface representing the FetchGroup how  
> do we avoid the name conflict between the annotation name and the  
> interface name for FetchGroup?

This name conflict is making me crazy. Why did we put annotations into  
the same package as interfaces and implementations?

FetchPlan is an interface but it might also be an annotation in  
future, along with FetchPlans. These annotations would allow you to  
define named fetch plans in annotations that could be used for static  
definition of fetch plans for queries, etc. without needing an API.  
Sort of the inverse of what we found useful in FetchGroup.

What if we moved all the annotations currently in  
org.apache.openjpa.persistence to org.apache.openjpa.annotations,  
deprecate the current annotation definitions in  
org.apache.openjpa.persistence?

Craig
>
>
> Craig
>
> Craig L Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
>

Craig L Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message