Package org.modeshape.jcr.spi.index

Examples of org.modeshape.jcr.spi.index.ResultWriter


    public <T> void assertMatch( LocalUniqueIndex<T> index,
                                 Operator op,
                                 T value,
                                 LinkedList<String> expectedValues ) {
        Filter.Results results = index.filter(constraints(propertyName, op, value));
        ResultWriter writer = verify(expectedValues);
        for (;;) {
            if (!results.getNextBatch(writer, Integer.MAX_VALUE)) break;
        }
        assertTrue("Not all expected values were found in results: " + expectedValues, expectedValues.isEmpty());
    }
View Full Code Here


    public <T> void assertMatch( LocalDuplicateIndex<T> index,
                                 Operator op,
                                 T value,
                                 LinkedList<String> expectedValues ) {
        Filter.Results results = index.filter(constraints(propertyName, op, value));
        ResultWriter writer = verify(expectedValues);
        for (;;) {
            if (!results.getNextBatch(writer, Integer.MAX_VALUE)) break;
        }
        assertTrue("Not all expected values were found in results: " + expectedValues, expectedValues.isEmpty());
    }
View Full Code Here

        }
        return expected;
    }

    protected ResultWriter verify( final LinkedList<String> keys ) {
        return new ResultWriter() {
            @Override
            public void add( Iterable<NodeKey> nodeKeys,
                             float score ) {
                for (NodeKey actual : nodeKeys) {
                    assertTrue("Got actual result '" + actual + "' but expected nothing", !keys.isEmpty());
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.spi.index.ResultWriter

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.