use of javax.jcr.query.qom.ChildNodeJoinCondition in project jackrabbit-oak by apache.
the class QomTest method join.
@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());
}
use of javax.jcr.query.qom.ChildNodeJoinCondition in project jackrabbit by apache.
the class QueryObjectModelFactoryTest method testChildNodeJoinCondition.
/**
* 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);
}
use of javax.jcr.query.qom.ChildNodeJoinCondition in project jackrabbit-oak by apache.
the class QomTest method childNodeJoinCondition.
@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());
}
Aggregations