jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich <For...@gombers.de>
Subject JQOM: How to find nodes where a specific property does NOT exist
Date Fri, 07 Jun 2013 07:36:33 GMT
With JQOM I need to search for nt:file-nodes where a self-defined mixin-property
is NOT set. With QueryObjectModelFactory.propertyExistence() I can test for
existence but do I do the negotiation.
My sample is:
                valueFactory = session.getValueFactory();
                queryManager = session.getWorkspace().getQueryManager();
                qomf = queryManager.getQOMFactory();
                nodeTypeSelector = qomf.selector("nt:file", selectorName);

                constraint  = qomf.and(constraint,
qomf.propertyExistence(nodeTypeSelector.getSelectorName(), "my:ownDate"));
                QueryObjectModel qom = qomf.createQuery(nodeTypeSelector,
constraint, null, null);
                QueryResult queryResult = qom.execute();
                nodeIterator = queryResult.getNodes();

There is a negotiation mentioned for SQL2 in chapter 6.7.18 of the
JCR-Specification but I have no clue how to adapt this for JQOM.

Thanks in advance,

View raw message