jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsmarks <jma...@salo.com>
Subject Re: Need a complete JCR-JQOM example query
Date Fri, 28 Oct 2011 00:08:01 GMT

mmjose26 wrote:
> 
> Here a very simple example, I hope it help you a little.
> 
> Maybe you need take a look to API.
> 
> 
> QueryManager queryManager = session.getWorkspace().getQueryManager();
> QueryObjectModelFactory qomf = queryManager.getQOMFactory();
> 
> //selector if you are interested on a specific node type
> Selector nodeTypeSelector = qomf.selector(nodeTypeName, nodeTypeName +
> "Selector");
> 
> //if you are interested on desdescendants of "/begin" path
> Constraint constraint =
> qomf.descendantNode(nodeTypeSelector.getSelectorName(), "/begin");
> 
> QueryObjectModel qom = qomf.createQuery(nodeTypeSelector, constraint,
> null, columns);
>                         qom.setLimit(MAX_ROWS);
>                         QueryResult queryResult = qom.execute();
> ...
> ....
> ......
> you see something like "missing a SELECT" because As far as I know,
> jackrabbit translate this to SQL2 query
> 
> J.
> 

The problem is that the JQOM API code won't work when you connect to
jackrabbit using rmi.

I also don't understand why jackrabbit would complain about the query not
being JCR_SQL2 when I specifically tell it I want to use JCR_JQOM.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Need-a-complete-JCR-JQOM-example-query-tp3944788p3946447.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message