Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.PropertyExistence


        assertEquals("([x].[c0] IS NOT NULL) OR ([x].[c1] IS NOT NULL)", or.toString());
    }

    @Test
    public void propertyExistence() throws RepositoryException {
        PropertyExistence pe = f.propertyExistence("selectorName", "propertyName");
        assertEquals("selectorName", pe.getSelectorName());
        assertEquals("propertyName", pe.getPropertyName());
        assertEquals("[selectorName].[propertyName] IS NOT NULL", pe.toString());
       
        assertEquals("* IS NOT NULL",
                f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL",
                f.propertyExistence("s", null).toString());
View Full Code Here


            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;
            return Collections.singleton(getSelectorName(c.getOperand1()));
        } else if (constraint instanceof SameNode) {
            SameNode sn = (SameNode) constraint;
View Full Code Here

        assertEquals("([x].[c0] IS NOT NULL) OR ([x].[c1] IS NOT NULL)", or.toString());
    }

    @Test
    public void propertyExistence() throws RepositoryException {
        PropertyExistence pe = f.propertyExistence("selectorName", "propertyName");
        assertEquals("selectorName", pe.getSelectorName());
        assertEquals("propertyName", pe.getPropertyName());
        assertEquals("[selectorName].[propertyName] IS NOT NULL", pe.toString());
       
        assertEquals("* IS NOT NULL",
                f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL",
                f.propertyExistence("s", null).toString());
View Full Code Here

        assertEquals("([x].[c0] IS NOT NULL) OR ([x].[c1] IS NOT NULL)", or.toString());
    }

    @Test
    public void propertyExistence() throws RepositoryException {
        PropertyExistence pe = f.propertyExistence("selectorName", "propertyName");
        assertEquals("selectorName", pe.getSelectorName());
        assertEquals("propertyName", pe.getPropertyName());
        assertEquals("[selectorName].[propertyName] IS NOT NULL", pe.toString());
       
        assertEquals("* IS NOT NULL",
                f.propertyExistence(null, null).toString());
        assertEquals("[s].* IS NOT NULL",
                f.propertyExistence("s", null).toString());
View Full Code Here

        assertEquals(or.getConstraint2(), c1);
    }

    @Test
    public void propertyExistence() throws RepositoryException {
        PropertyExistence pe = f.propertyExistence("selectorName", "propertyName");
        assertEquals("selectorName", pe.getSelectorName());
        assertEquals("propertyName", pe.getPropertyName());
    }
View Full Code Here

TOP

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

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.