jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: [OCM] Add simple query API
Date Fri, 31 Aug 2007 14:06:53 GMT
+1

I think more and more use cases will need something like this.
I thought also about a query language like OQL oriented for content repo
but it will take more time to implement. Futhermore, I'm not yet sure that
will be a great help. So, let's start with your proposal.


br,
Christophe

On 8/31/07, Felix Meschberger <fmeschbe@gmail.com> wrote:
>
> Hi all,
>
> In our day-to-day use of JCR and the OCM, we discovered, that often
> times we have a simple requirement to shoot a query at the repository
> and just get the nodes returned. This contrasts the full-blown query
> support available through the JCR QueryManager. Likewise, the OCM has
> its own QueryManager with its Filter interface and mechanism. Here, too,
> often times, it seems easier to just shoot a known query and get the
> objects back that to build a filter to execute.
>
> For this reason, Betrand and I propose the following addition to the
> ObjectContentManager interface:
>
>      Iterator getObjects(String queryExpression, String language) throws
>             OCMInvalidSyntaxException, ObjectContentMappingException;
>
>      OCMInvalidSyntaxException extends ObjectContentMappingException
>             wrapping the JCR InvalidSyntaxException
>
> The intent is to get an Iterator of objects mapped from the nodes
> returned by the queryExpression given in the query language. The
> queryExpression and language are used to create the JCR Query from whose
> result the mapped objects are retrieved.
>
> We know, that this is just kind of a utility function but nonetheless a
> often used one.
>
> What do you think of this addition ? If there is enough interest - at
> least we are interested as well as some Sling-based applications might
> be - we have a patch handy to implement this.
>
> Any feedback is welcome.
>
> Regards
> Felix
>
>
>

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