Examples of PropertyExistence


Examples of javax.jcr.query.qom.PropertyExistence

    /**
     * Test case for {@link QueryObjectModelFactory#and(Constraint, Constraint)}
     */
    public void testAnd() throws RepositoryException {
        PropertyExistence c1 = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyExistence c2 = qf.propertyExistence(SELECTOR_NAME1, propertyName2);
        And and = qf.and(c1, c2);
        assertTrue("Not a PropertyExistence constraint",
                and.getConstraint1() instanceof PropertyExistence);
        assertTrue("Not a PropertyExistence constraint",
                and.getConstraint2() instanceof PropertyExistence);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryWithConstraint() throws RepositoryException {
        Selector selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        QueryObjectModel qom = qf.createQuery(
                selector, propExist, null, null);
        assertTrue("Not a selector source", qom.getSource() instanceof Selector);
        assertTrue("Not a property existence constraint", qom.getConstraint() instanceof PropertyExistence);
        assertEquals("Wrong size of orderings", 0, qom.getOrderings().length);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryWithConstraintAndOrdering() throws RepositoryException {
        Selector selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Ordering ordering = qf.ascending(propValue);
        QueryObjectModel qom = qf.createQuery(selector, propExist,
                new Ordering[]{ordering}, null);
        assertTrue("Not a selector source", qom.getSource() instanceof Selector);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryWithConstraintOrderingAndColumn() throws RepositoryException {
        Selector selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Ordering ordering = qf.ascending(propValue);
        Column column = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        QueryObjectModel qom = qf.createQuery(selector, propExist,
                new Ordering[]{ordering}, new Column[]{column});
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryFromSourceWithConstraint() throws RepositoryException {
        Source selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        QueryObjectModel qom = qf.createQuery(
                selector, propExist, null, null);
        assertTrue("Not a selector source", qom.getSource() instanceof Selector);
        assertTrue("Not a property existence constraint", qom.getConstraint() instanceof PropertyExistence);
        assertEquals("Wrong size of orderings", 0, qom.getOrderings().length);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryFromSourceWithConstraintAndOrdering() throws RepositoryException {
        Source selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Ordering ordering = qf.ascending(propValue);
        QueryObjectModel qom = qf.createQuery(selector, propExist,
                new Ordering[]{ordering}, null);
        assertTrue("Not a selector source", qom.getSource() instanceof Selector);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

        assertEquals("Wrong size of columns", 0, qom.getColumns().length);
    }

    public void testCreateQueryFromSourceWithConstraintOrderingAndColumn() throws RepositoryException {
        Source selector = qf.selector(testNodeType, SELECTOR_NAME1);
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1);
        Ordering ordering = qf.ascending(propValue);
        Column column = qf.column(SELECTOR_NAME1, propertyName1, propertyName1);
        QueryObjectModel qom = qf.createQuery(selector, propExist,
                new Ordering[]{ordering}, new Column[]{column});
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

    /**
     * Test case for {@link QueryObjectModelFactory#not(Constraint)}
     */
    public void testNot() throws RepositoryException {
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        Not not = qf.not(propExist);
        assertTrue("Not a property existence constraint", not.getConstraint() instanceof PropertyExistence);
    }
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

    /**
     * Test case for {@link QueryObjectModelFactory#or(Constraint, Constraint)}
     */
    public void testOr() throws RepositoryException {
        PropertyExistence c1 = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        PropertyExistence c2 = qf.propertyExistence(SELECTOR_NAME1, propertyName2);
        Or or = qf.or(c1, c2);
        assertTrue("Not a PropertyExistence constraint",
                or.getConstraint1() instanceof PropertyExistence);
        assertTrue("Not a PropertyExistence constraint",
                or.getConstraint2() instanceof PropertyExistence);
View Full Code Here

Examples of javax.jcr.query.qom.PropertyExistence

    /**
     * Test case for {@link QueryObjectModelFactory#propertyExistence(String, String)}
     */
    public void testPropertyExistence() throws RepositoryException {
        PropertyExistence propExist = qf.propertyExistence(SELECTOR_NAME1, propertyName1);
        assertEquals("Wrong selector", SELECTOR_NAME1, propExist.getSelectorName());
        assertEquals("Wrong property name", propertyName1, propExist.getPropertyName());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.