Search in sources :

Example 26 with QueryObjectModel

use of javax.jcr.query.qom.QueryObjectModel in project jackrabbit by apache.

the class EquiJoinConditionTest method testLeftOuterJoin1.

public void testLeftOuterJoin1() throws RepositoryException {
    JoinCondition c = qf.equiJoinCondition(LEFT, propertyName1, RIGHT, propertyName2);
    QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_LEFT_OUTER, c);
    checkQOM(qom, new Node[][] { { n1, n2 }, { n2, n2 } });
}
Also used : QueryObjectModel(javax.jcr.query.qom.QueryObjectModel) JoinCondition(javax.jcr.query.qom.JoinCondition)

Example 27 with QueryObjectModel

use of javax.jcr.query.qom.QueryObjectModel in project jackrabbit by apache.

the class EquiJoinConditionTest method testInnerJoin1.

public void testInnerJoin1() throws RepositoryException {
    JoinCondition c = qf.equiJoinCondition(LEFT, propertyName1, RIGHT, propertyName2);
    QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
    checkQOM(qom, new Node[][] { { n1, n2 }, { n2, n2 } });
}
Also used : QueryObjectModel(javax.jcr.query.qom.QueryObjectModel) JoinCondition(javax.jcr.query.qom.JoinCondition)

Example 28 with QueryObjectModel

use of javax.jcr.query.qom.QueryObjectModel in project jackrabbit by apache.

the class EquiJoinConditionTest method testInnerJoin2.

public void testInnerJoin2() throws RepositoryException {
    JoinCondition c = qf.equiJoinCondition(LEFT, propertyName2, RIGHT, propertyName1);
    QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_INNER, c);
    checkQOM(qom, new Node[][] { { n2, n1 }, { n2, n2 } });
}
Also used : QueryObjectModel(javax.jcr.query.qom.QueryObjectModel) JoinCondition(javax.jcr.query.qom.JoinCondition)

Example 29 with QueryObjectModel

use of javax.jcr.query.qom.QueryObjectModel in project jackrabbit by apache.

the class EquiJoinConditionTest method testRightOuterJoin1.

public void testRightOuterJoin1() throws RepositoryException {
    JoinCondition c = qf.equiJoinCondition(LEFT, propertyName1, RIGHT, propertyName2);
    QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_JOIN_TYPE_RIGHT_OUTER, c);
    checkQOM(qom, new Node[][] { { null, n1 }, { n1, n2 }, { n2, n2 } });
}
Also used : QueryObjectModel(javax.jcr.query.qom.QueryObjectModel) JoinCondition(javax.jcr.query.qom.JoinCondition)

Example 30 with QueryObjectModel

use of javax.jcr.query.qom.QueryObjectModel in project jackrabbit by apache.

the class NodeLocalNameTest method testWeakReferenceLiteral.

public void testWeakReferenceLiteral() throws RepositoryException, NotExecutableException {
    ensureMixinType(node1, mixReferenceable);
    superuser.save();
    Value literal = superuser.getValueFactory().createValue(node1, true);
    QueryObjectModel qom = createQuery(QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, literal);
    checkQOM(qom, new Node[] {});
}
Also used : Value(javax.jcr.Value) QueryObjectModel(javax.jcr.query.qom.QueryObjectModel)

Aggregations

QueryObjectModel (javax.jcr.query.qom.QueryObjectModel)77 Value (javax.jcr.Value)17 Node (javax.jcr.Node)16 JoinCondition (javax.jcr.query.qom.JoinCondition)13 Selector (javax.jcr.query.qom.Selector)9 RepositoryException (javax.jcr.RepositoryException)7 Query (javax.jcr.query.Query)7 Source (javax.jcr.query.qom.Source)7 Column (javax.jcr.query.qom.Column)6 Ordering (javax.jcr.query.qom.Ordering)6 PropertyExistence (javax.jcr.query.qom.PropertyExistence)6 RowIterator (javax.jcr.query.RowIterator)5 PropertyValue (javax.jcr.query.qom.PropertyValue)5 ArrayList (java.util.ArrayList)4 NodeType (javax.jcr.nodetype.NodeType)4 NodeTypeManager (javax.jcr.nodetype.NodeTypeManager)4 InvalidQueryException (javax.jcr.query.InvalidQueryException)4 QueryResult (javax.jcr.query.QueryResult)4 Constraint (javax.jcr.query.qom.Constraint)4 NodeTypeIterator (javax.jcr.nodetype.NodeTypeIterator)3