Package org.apache.jackrabbit.oak.query

Examples of org.apache.jackrabbit.oak.query.CoreValueFactory


*/
public class FilterTest {

    @Test
    public void propertyRestriction() {
        CoreValue one = new CoreValueFactory().createValue("1");
        CoreValue two = new CoreValueFactory().createValue("2");

        Filter f = new Filter(null);
        assertTrue(null == f.getPropertyRestriction("x"));
        f.restrictProperty("x", Operator.LESS_OR_EQUAL, two);
        assertEquals("..2]", f.getPropertyRestriction("x").toString());
View Full Code Here


                String lowerBound = p.getLowerBound();
                String upperBound = p.getUpperBound();
                if (lowerBound == null && upperBound == null) {
                    // ignore
                } else {
                    CoreValueFactory vf = query.getValueFactory();
                    if (lowerBound != null) {
                        operand1.apply(f, Operator.GREATER_OR_EQUAL, vf.createValue(lowerBound));
                    }
                    if (upperBound != null) {
                        operand1.apply(f, Operator.LESS_OR_EQUAL, vf.createValue(upperBound));
                    }
                }
            } else {
                operand1.apply(f, operator, v);
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.query.CoreValueFactory

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.