Package javax.jcr.query.qom

Examples of javax.jcr.query.qom.ChildNodeJoinCondition


    /**
     * Test case for {@link QueryObjectModelFactory#childNodeJoinCondition(String, String)}
     */
    public void testChildNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition cond = qf.childNodeJoinCondition(SELECTOR_NAME1, SELECTOR_NAME2);
        assertEquals("Wrong selector name", cond.getChildSelectorName(), SELECTOR_NAME1);
        assertEquals("Wrong selector name", cond.getParentSelectorName(), SELECTOR_NAME2);
    }
View Full Code Here


    /**
     * Test case for {@link QueryObjectModelFactory#childNodeJoinCondition(String, String)}
     */
    public void testChildNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition cond = qf.childNodeJoinCondition(SELECTOR_NAME1, SELECTOR_NAME2);
        assertEquals("Wrong selector name", cond.getChildSelectorName(), SELECTOR_NAME1);
        assertEquals("Wrong selector name", cond.getParentSelectorName(), SELECTOR_NAME2);
    }
View Full Code Here

        assertEquals("ISCHILDNODE([p])", f.childNode(null, "p").toString());
    }

    @Test
    public void childNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition c = f.childNodeJoinCondition("childSelectorName",
                "parentSelectorName");
        assertEquals("childSelectorName", c.getChildSelectorName());
        assertEquals("parentSelectorName", c.getParentSelectorName());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])",
                c.toString());
    }
View Full Code Here

    @Test
    public void join() throws RepositoryException {
        Source left = f.selector("nodeTypeName", "selectorName");
        Source right = f.selector("nodeTypeName2", "selectorName2");
        ChildNodeJoinCondition jc = f.childNodeJoinCondition("childSelectorName", "parentSelectorName");
        Join j = f.join(left, right, QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, jc);
        assertEquals(left, j.getLeft());
        assertEquals(right, j.getRight());
        assertEquals(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, j.getJoinType());
        assertEquals(jc, j.getJoinCondition());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])", jc.toString());
    }
View Full Code Here

        assertEquals("ISCHILDNODE([p])", f.childNode(null, "p").toString());
    }

    @Test
    public void childNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition c = f.childNodeJoinCondition("childSelectorName",
                "parentSelectorName");
        assertEquals("childSelectorName", c.getChildSelectorName());
        assertEquals("parentSelectorName", c.getParentSelectorName());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])",
                c.toString());
    }
View Full Code Here

    @Test
    public void join() throws RepositoryException {
        Source left = f.selector("nodeTypeName", "selectorName");
        Source right = f.selector("nodeTypeName2", "selectorName2");
        ChildNodeJoinCondition jc = f.childNodeJoinCondition("childSelectorName", "parentSelectorName");
        Join j = f.join(left, right, QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, jc);
        assertEquals(left, j.getLeft());
        assertEquals(right, j.getRight());
        assertEquals(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, j.getJoinType());
        assertEquals(jc, j.getJoinCondition());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])", jc.toString());
    }
View Full Code Here

        assertEquals("ISCHILDNODE([p])", f.childNode(null, "p").toString());
    }

    @Test
    public void childNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition c = f.childNodeJoinCondition("childSelectorName",
                "parentSelectorName");
        assertEquals("childSelectorName", c.getChildSelectorName());
        assertEquals("parentSelectorName", c.getParentSelectorName());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])",
                c.toString());
    }
View Full Code Here

    @Test
    public void join() throws RepositoryException {
        Source left = f.selector("nodeTypeName", "selectorName");
        Source right = f.selector("nodeTypeName2", "selectorName2");
        ChildNodeJoinCondition jc = f.childNodeJoinCondition("childSelectorName", "parentSelectorName");
        Join j = f.join(left, right, QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, jc);
        assertEquals(left, j.getLeft());
        assertEquals(right, j.getRight());
        assertEquals(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, j.getJoinType());
        assertEquals(jc, j.getJoinCondition());
        assertEquals("ISCHILDNODE([childSelectorName], [parentSelectorName])", jc.toString());
    }
View Full Code Here

        assertEquals("parentPath", cn.getParentPath());
    }

    @Test
    public void childNodeJoinCondition() throws RepositoryException {
        ChildNodeJoinCondition c = f.childNodeJoinCondition("childSelectorName",
                "parentSelectorName");
        assertEquals("childSelectorName", c.getChildSelectorName());
        assertEquals("parentSelectorName", c.getParentSelectorName());
    }
View Full Code Here

    @Test
    public void join() throws RepositoryException {
        Source left = f.selector("nodeTypeName", "selectorName");
        Source right = f.selector("nodeTypeName2", "selectorName2");
        ChildNodeJoinCondition jc = f.childNodeJoinCondition("childSelectorName", "parentSelectorName");
        Join j = f.join(left, right, QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, jc);
        assertEquals(left, j.getLeft());
        assertEquals(right, j.getRight());
        assertEquals(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, j.getJoinType());
        assertEquals(jc, j.getJoinCondition());
View Full Code Here

TOP

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

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.