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.
--
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.