Examples of containsNativeConstraint()


Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

    @Test @Ignore("As of OAK-622 this should no longer be used. Removing later.")
    public void costContainsNativeConstraints(){
        OrderedPropertyIndex index = new OrderedPropertyIndex();
        NodeState root = InitialContent.INITIAL_CONTENT;
        Filter filter = EasyMock.createNiceMock(Filter.class);
        EasyMock.expect(filter.containsNativeConstraint()).andReturn(true).anyTimes();
        EasyMock.replay(filter);

        assertEquals("If it contains Natives we don't serve", Double.POSITIVE_INFINITY,
            index.getCost(filter, root), 0);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
        restriction.first = PropertyValues.newDate("2013-01-01");
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertFalse("In ascending order we're expeting to serve this kind of queries",
            Double.POSITIVE_INFINITY == index.getCost(filter, root));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        restriction.first = PropertyValues.newDate("2013-01-01");
        restriction.firstIncluding = true;
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertFalse("In ascending order we're expeting to serve this kind of queries",
            Double.POSITIVE_INFINITY == index.getCost(filter, root));
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
        restriction.last = PropertyValues.newDate("2013-01-01");
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertEquals("in ascending index we're not expecting to serve '<' queries",
            Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        restriction.last = PropertyValues.newDate("2013-01-01");
        restriction.lastIncluding = true;
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertEquals("in ascending index we're not expecting to serve '<=' queries",
            Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
        restriction.first = PropertyValues.newDate("2013-01-01");
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertEquals("in descending index we're not expecting to serve '>' queries",
            Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        restriction.first = PropertyValues.newDate("2013-01-01");
        restriction.firstIncluding = true;
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertEquals("in descending index we're not expecting to serve '>' queries",
            Double.POSITIVE_INFINITY, index.getCost(filter, root), 0);
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        Filter.PropertyRestriction restriction = new Filter.PropertyRestriction();
        restriction.last = PropertyValues.newDate("2013-01-01");
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertFalse("In descending order we're expeting to serve this kind of queries",
            Double.POSITIVE_INFINITY == index.getCost(filter, root));
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        restriction.last = PropertyValues.newDate("2013-01-01");
        restriction.lastIncluding = true;
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertFalse("In descending order we're expeting to serve this kind of queries",
            Double.POSITIVE_INFINITY == index.getCost(filter, root));
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.query.Filter.containsNativeConstraint()

        restriction.firstIncluding = true;
        restriction.lastIncluding = true;
        restriction.propertyName = ORDERED_PROPERTY;
        expect(filter.getPropertyRestrictions()).andReturn(ImmutableList.of(restriction))
            .anyTimes();
        expect(filter.containsNativeConstraint()).andReturn(false).anyTimes();
        replay(filter);

        assertFalse("In descending order we're expeting to serve this kind of queries",
            Double.POSITIVE_INFINITY == index.getCost(filter, root));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.