Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.Not


    }

    @Test
    public void not() throws RepositoryException {
        Constraint c = f.propertyExistence("x", "c0");
        Not n = f.not(c);
        assertEquals(c, n.getConstraint());
    }
View Full Code Here


    }

    @Test
    public void not() throws RepositoryException {
        Constraint c = f.propertyExistence("x", "c0");
        Not n = f.not(c);
        assertEquals(c, n.getConstraint());
        assertEquals("[x].[c0] IS NOT NULL", c.toString());
       
        assertEquals("* IS NOT NULL", f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL", f.propertyExistence("s", null).toString());
        assertEquals("[p] IS NOT NULL", f.propertyExistence(null, "p").toString());
View Full Code Here

            return getSelectorNames(and.getConstraint1(), and.getConstraint2());
        } else if (constraint instanceof Or) {
            Or or = (Or) constraint;
            return getSelectorNames(or.getConstraint1(), or.getConstraint2());
        } else if (constraint instanceof Not) {
            Not not = (Not) constraint;
            return getSelectorNames(not.getConstraint());
        } else if (constraint instanceof PropertyExistence) {
            PropertyExistence pe = (PropertyExistence) constraint;
            return Collections.singleton(pe.getSelectorName());
        } else if (constraint instanceof Comparison) {
            Comparison c = (Comparison) constraint;
View Full Code Here

                OperationBuilder<T> left = apply(or.getConstraint1(), negated);
                OperationBuilder<T> right = apply(or.getConstraint2(), negated);
                return new DualOperationBuilder<>(left, right);
            }
            if (constraint instanceof Not) {
                Not not = (Not)constraint;
                return apply(not.getConstraint(), !negated);
            }
            if (constraint instanceof PropertyExistence) {
                // Presumably this index only contains values for this property ...
                return this;
            }
View Full Code Here

    }

    @Test
    public void not() throws RepositoryException {
        Constraint c = f.propertyExistence("x", "c0");
        Not n = f.not(c);
        assertEquals(c, n.getConstraint());
        assertEquals("[x].[c0] IS NOT NULL", c.toString());
       
        assertEquals("* IS NOT NULL", f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL", f.propertyExistence("s", null).toString());
        assertEquals("[p] IS NOT NULL", f.propertyExistence(null, "p").toString());
View Full Code Here

    }

    @Test
    public void not() throws RepositoryException {
        Constraint c = f.propertyExistence("x", "c0");
        Not n = f.not(c);
        assertEquals(c, n.getConstraint());
        assertEquals("[x].[c0] IS NOT NULL", c.toString());
       
        assertEquals("* IS NOT NULL", f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL", f.propertyExistence("s", null).toString());
        assertEquals("[p] IS NOT NULL", f.propertyExistence(null, "p").toString());
View Full Code Here

    }

    @Test
    public void not() throws RepositoryException {
        Constraint c = f.propertyExistence("x", "c0");
        Not n = f.not(c);
        assertEquals(c, n.getConstraint());
    }
View Full Code Here

TOP

Related Classes of javax.jcr.query.qom.Not

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.