continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Thakur <rahul.thakur.x...@gmail.com>
Subject Re: Some continuum-jpa branch updates
Date Wed, 02 Apr 2008 03:58:39 GMT

I am happy with the refactorings to the Store API; but IIRC Emmanuel 
mentioned was that he would put in some code to reflect his ideas on how 
he sees the Store API to shape up (w.r.t Criteria API).

So basically, from my end (and if everyone agrees):
1)  Need to bring over the Store API changes from JPA branch.
2)  Bring over Entity classes; Annotations will need some review and 
updates.

Cheers,
Rahul



Brett Porter wrote:
> Rahul,
>
> What's the status of this work? Are you thinking of phasing it in to
> trunk, based on findings from the experiments, or something else?
>
> Cheers,
> Brett
>
> On 10/12/2007, at 10:04 AM, Rahul Thakur wrote:
>
>> Hi All,
>>
>> Scribbling some quick notes on some of the toying around I have been
>> doing with OpenJPA, Generics etc on the continuum-jpa branch[1]:
>>
>> 1) Use JPA for persistence
>> Motivation behind this has been to investigate how this compares to
>> JPOX/JDO for managing the model - both in terms on performance and
>> ease of use (Store APIs). Continuum model classes are annotated with
>> JPA annotations on the branch. However, this needs a review as there
>> are some elements (for example 'configuration' typed as Map) that I am
>> not sure yet how to persist yet. The provider used is OpenJPA [2].
>>
>> 2) Refactorings to Store interface
>> Main motivation has been to keep the core Store interface lean and
>> mean (read extensible). The Store interface[3] now has 4 methods:
>> lookup()
>> save()
>> delete()
>> query()
>>
>> The lookup(), save() and delete() act on single model Entity, while
>> query() will filter and obtain matching Entities from the underlying
>> database based on the Query specified. Query implementations control
>> how a resulting JPQL gets constructed and which matching entities get
>> pulled, and can be easily extended.
>>
>> To preserve compatibility with the existing Store interface, we can
>> mimick the existing ContinuumStore interface operations by having a
>> facade that can prepare requisite queries and delegate to a Store
>> instance.
>>
>> 3) Misc.
>> There are a few I am investigating:
>> 1) Spring/Guice under the hood.
>> 2) JUnit 4.4 (and Hamcrest library)
>> , but these are still in early stages.
>>
>> I am keen to get a feedback on what others think.
>>
>> Cheers,
>>
>> Rahul
>>
>>
>> [1] -
>> http://svn.apache.org/repos/asf/maven/continuum/branches/continuum-jpa/
>>
>> [2] - http://openjpa.apache.org/
>>
>> [3] -
>> http://svn.apache.org/repos/asf/maven/continuum/branches/continuum-jpa/continuum-model-jpa/src/main/java/org/apache/maven/continuum/store/api/Store.java
>>
>
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
>
>

Mime
View raw message