Search in sources :

Example 16 with Selector

use of javax.jcr.query.qom.Selector in project jackrabbit-oak by apache.

the class QomTest method selector.

@Test
public void selector() throws RepositoryException {
    Selector s = f.selector("nodeTypeName", "selectorName");
    assertEquals("nodeTypeName", s.getNodeTypeName());
    assertEquals("selectorName", s.getSelectorName());
    assertEquals("[nodeTypeName] AS [selectorName]", s.toString());
    assertEquals("[n]", f.selector("n", null).toString());
}
Also used : Selector(javax.jcr.query.qom.Selector) Test(org.junit.Test) AbstractRepositoryTest(org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest)

Aggregations

Selector (javax.jcr.query.qom.Selector)16 QueryObjectModel (javax.jcr.query.qom.QueryObjectModel)9 Ordering (javax.jcr.query.qom.Ordering)6 PropertyExistence (javax.jcr.query.qom.PropertyExistence)6 Source (javax.jcr.query.qom.Source)6 Column (javax.jcr.query.qom.Column)5 PropertyValue (javax.jcr.query.qom.PropertyValue)5 Constraint (javax.jcr.query.qom.Constraint)3 BindVariableValue (javax.jcr.query.qom.BindVariableValue)2 JoinCondition (javax.jcr.query.qom.JoinCondition)2 AbstractRepositoryTest (org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 ChildNodeJoinCondition (javax.jcr.query.qom.ChildNodeJoinCondition)1 DescendantNodeJoinCondition (javax.jcr.query.qom.DescendantNodeJoinCondition)1 EquiJoinCondition (javax.jcr.query.qom.EquiJoinCondition)1 Join (javax.jcr.query.qom.Join)1 SameNodeJoinCondition (javax.jcr.query.qom.SameNodeJoinCondition)1 JoinType (org.apache.jackrabbit.commons.query.qom.JoinType)1