Examples of EquiJoinCondition


Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qf.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qf.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

        assertEquals("[selectorName].[propertyName] DESC", o.toString());
    }

    @Test
    public void equiJoinCondition() throws RepositoryException {
        EquiJoinCondition e = f.equiJoinCondition("selector1Name", "property1Name",
                "selector2Name", "property2Name");
        assertEquals("selector1Name", e.getSelector1Name());
        assertEquals("property1Name", e.getProperty1Name());
        assertEquals("selector2Name", e.getSelector2Name());
        assertEquals("property2Name", e.getProperty2Name());
        assertEquals("[selector1Name].[property1Name] = [selector2Name].[property2Name]",
                e.toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

        assertEquals(QueryObjectModelConstants.JCR_ORDER_DESCENDING, o.getOrder());
    }

    @Test
    public void equiJoinCondition() throws RepositoryException {
        EquiJoinCondition e = f.equiJoinCondition("selector1Name", "property1Name",
                "selector2Name", "property2Name");
        assertEquals("selector1Name", e.getSelector1Name());
        assertEquals("property1Name", e.getProperty1Name());
        assertEquals("selector2Name", e.getSelector2Name());
        assertEquals("property2Name", e.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qf.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qomFactory.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qf.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

    /**
     * Test case for {@link QueryObjectModelFactory#equiJoinCondition(String, String, String, String)}
     */
    public void testEquiJoinCondition() throws RepositoryException {
        EquiJoinCondition cond = qf.equiJoinCondition(SELECTOR_NAME1, propertyName1, SELECTOR_NAME2, propertyName2);
        assertEquals("Wrong selector name", SELECTOR_NAME1, cond.getSelector1Name());
        assertEquals("Wrong property name", propertyName1, cond.getProperty1Name());
        assertEquals("Wrong selector name", SELECTOR_NAME2, cond.getSelector2Name());
        assertEquals("Wrong property name", propertyName2, cond.getProperty2Name());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

        assertEquals("[selectorName].[propertyName] DESC", o.toString());
    }

    @Test
    public void equiJoinCondition() throws RepositoryException {
        EquiJoinCondition e = f.equiJoinCondition("selector1Name", "property1Name",
                "selector2Name", "property2Name");
        assertEquals("selector1Name", e.getSelector1Name());
        assertEquals("property1Name", e.getProperty1Name());
        assertEquals("selector2Name", e.getSelector2Name());
        assertEquals("property2Name", e.getProperty2Name());
        assertEquals("[selector1Name].[property1Name] = [selector2Name].[property2Name]",
                e.toString());
    }
View Full Code Here

Examples of javax.jcr.query.qom.EquiJoinCondition

        // FROM ...
        Join join = isJoin(query.source());
        assertThat(join.getLeft(), is((Source)namedSelector(selectorName("fincayra.Post"), selectorName("post"))));
        assertThat(join.getRight(), is((Source)namedSelector(selectorName("fincayra.User"), selectorName("u"))));
        assertThat(join.type(), is(JoinType.INNER));
        EquiJoinCondition joinCondition = isEquiJoinCondition(join.getJoinCondition());
        assertThat(joinCondition.getSelector1Name(), is("post"));
        assertThat(joinCondition.getSelector2Name(), is("u"));
        assertThat(joinCondition.getProperty1Name(), is("user"));
        assertThat(joinCondition.getProperty2Name(), is("jcr:uuid"));

        // WHERE ...
        assertThat(query.constraint(), is(nullValue()));
    }
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.