jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmjose26 <mmjos...@yahoo.com.mx>
Subject Re: Need a complete JCR-JQOM example query
Date Thu, 27 Oct 2011 22:54:26 GMT
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 +

//if you are interested on desdescendants of "/begin" path
Constraint constraint =
qomf.descendantNode(nodeTypeSelector.getSelectorName(), "/begin");

QueryObjectModel qom = qomf.createQuery(nodeTypeSelector, constraint, null,
                        QueryResult queryResult = qom.execute();
you see something like "missing a SELECT" because As far as I know,
jackrabbit translate this to SQL2 query


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

View raw message