Hi,

Would QueryObjectModelFactory.not() do the trick?

constraint = qomf.and(
    constraint,
    qomf.not(qomf.propertyExistence(nodeTypeSelector.getSelectorName(), 
"my:ownDate")));


Regards,

Luke Noel-Storr.
----------------

Integrated Publishing Solutions Ltd.
Tel: +44 (0)1926 889199
http://www.integrate.co.uk



On 7 Jun 2013, at 08:36, Ulrich <for...@gombers.de> wrote:

> 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.descendantNode(nodeTypeSelector.getSelectorName(),
> subtreeQuery);
>                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,
> Ulrich

Reply via email to