Package org.apache.jackrabbit.core.query.jsr283.qom

Examples of org.apache.jackrabbit.core.query.jsr283.qom.PropertyValue


    /**
     * Test case for {@link QueryObjectModelFactory#fullTextSearchScore(String)}
     */
    public void testFullTextSearchScoreWithSelector() throws RepositoryException {
        FullTextSearchScore score = qomFactory.fullTextSearchScore(SELECTOR_NAME1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, score.getSelectorName());
    }
View Full Code Here


        Selector s1 = qomFactory.selector(ntBase);
        Selector s2 = qomFactory.selector(testNodeType);
        JoinCondition cond = qomFactory.equiJoinCondition(ntBase, jcrPrimaryType, testNodeType, jcrPrimaryType);
        for (Iterator it = JOIN_TYPES.iterator(); it.hasNext(); ) {
            int joinType = ((Integer) it.next()).intValue();
            Join join = qomFactory.join(s1, s2, joinType, cond);
            assertTrue("Not a selector source", join.getLeft() instanceof Selector);
            assertTrue("Not a selector source", join.getRight() instanceof Selector);
            assertEquals("Wrong join type", joinType, join.getJoinType());
            assertTrue("Not an EquiJoinCondition", join.getJoinCondition() instanceof EquiJoinCondition);
        }
    }
View Full Code Here

     * Test case for {@link QueryObjectModelFactory#join(Source, Source, int, JoinCondition)}
     */
    public void testJoin() throws RepositoryException {
        Selector s1 = qomFactory.selector(ntBase);
        Selector s2 = qomFactory.selector(testNodeType);
        JoinCondition cond = qomFactory.equiJoinCondition(ntBase, jcrPrimaryType, testNodeType, jcrPrimaryType);
        for (Iterator it = JOIN_TYPES.iterator(); it.hasNext(); ) {
            int joinType = ((Integer) it.next()).intValue();
            Join join = qomFactory.join(s1, s2, joinType, cond);
            assertTrue("Not a selector source", join.getLeft() instanceof Selector);
            assertTrue("Not a selector source", join.getRight() instanceof Selector);
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#length(PropertyValue)}
     */
    public void testLength() throws RepositoryException {
        PropertyValue propValue = qomFactory.propertyValue(propertyName1);
        Length len = qomFactory.length(propValue);
        assertNotNull("Property value must not be null", len.getPropertyValue());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#lowerCase(DynamicOperand)}
     */
    public void testLowerCase() throws RepositoryException {
        PropertyValue propValue = qomFactory.propertyValue(propertyName1);
        LowerCase lower = qomFactory.lowerCase(propValue);
        assertTrue("Not a property value operand", lower.getOperand() instanceof PropertyValue);
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#nodeLocalName()}
     */
    public void testNodeLocalName() throws RepositoryException {
        NodeLocalName localName = qomFactory.nodeLocalName();
        assertNull("Selector name must be null", localName.getSelectorName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#nodeLocalName(String)}
     */
    public void testNodeLocalNameWithSelector() throws RepositoryException {
        NodeLocalName localName = qomFactory.nodeLocalName(SELECTOR_NAME1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, localName.getSelectorName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#nodeName()}
     */
    public void testNodeName() throws RepositoryException {
        NodeName nodeName = qomFactory.nodeName();
        assertNull("Selector name must be null", nodeName.getSelectorName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#nodeName(String)}
     */
    public void testNodeNameWithSelector() throws RepositoryException {
        NodeName nodeName = qomFactory.nodeName(SELECTOR_NAME1);
        assertEquals("Wrong selector name", SELECTOR_NAME1, nodeName.getSelectorName());
    }
View Full Code Here

    /**
     * Test case for {@link QueryObjectModelFactory#not(Constraint)}
     */
    public void testNot() throws RepositoryException {
        PropertyExistence propExist = qomFactory.propertyExistence(propertyName1);
        Not not = qomFactory.not(propExist);
        assertTrue("Not a property existence constraint", not.getConstraint() instanceof PropertyExistence);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.query.jsr283.qom.PropertyValue

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.