Examples of OrderDirection


Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

        IndexUtils.createIndexDefinition(root.child(IndexConstants.INDEX_DEFINITIONS_NAME),
            TEST_INDEX_NAME, false, ImmutableList.of(ORDERED_PROPERTY), null, OrderedIndex.TYPE,
            ImmutableMap.<String, String> of());

        NodeState before = root.getNodeState();
        final OrderDirection direction = OrderDirection.ASC;
        final QueryIndex.OrderEntry.Order order = OrderDirection.ASC.equals(direction) ? QueryIndex.OrderEntry.Order.ASCENDING
                                                                                      : QueryIndex.OrderEntry.Order.DESCENDING;

        List<String> values = generateOrderedValues(NUMBER_OF_NODES, direction);
        addChildNodes(values, root, Type.STRING);
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

        IndexUtils.createIndexDefinition(root.child(IndexConstants.INDEX_DEFINITIONS_NAME),
            TEST_INDEX_NAME, false, ImmutableList.of(ORDERED_PROPERTY), null, OrderedIndex.TYPE,
            ImmutableMap.<String, String> of());

        NodeState before = root.getNodeState();
        final OrderDirection direction = OrderDirection.ASC;
        final QueryIndex.OrderEntry.Order order = OrderDirection.ASC.equals(direction) ? QueryIndex.OrderEntry.Order.ASCENDING
                                                                                      : QueryIndex.OrderEntry.Order.DESCENDING;
        List<String> values = generateOrderedValues(NUMBER_OF_NODES, direction);
        addChildNodes(values, root, Type.STRING);
        NodeState after = root.getNodeState();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

        IndexUtils.createIndexDefinition(root.child(IndexConstants.INDEX_DEFINITIONS_NAME),
            TEST_INDEX_NAME, false, ImmutableList.of(ORDERED_PROPERTY), null, OrderedIndex.TYPE,
            ImmutableMap.<String, String> of());

        NodeState before = root.getNodeState();
        final OrderDirection direction = OrderDirection.ASC;
        final QueryIndex.OrderEntry.Order order = OrderDirection.ASC.equals(direction) ? QueryIndex.OrderEntry.Order.ASCENDING
                                                                                      : QueryIndex.OrderEntry.Order.DESCENDING;
        List<String> values = generateOrderedValues(NUMBER_OF_NODES, direction);
        addChildNodes(values, root, Type.STRING);
        NodeState after = root.getNodeState();
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

    @Test
    public void queryGreaterThenWithCast() throws CommitFailedException, ParseException {

        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] WHERE " + ORDERED_PROPERTY
                             + "> cast('%s' as date)";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

    @Test
    public void queryBetweenNoIncludes() throws Exception {
        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] WHERE " + ORDERED_PROPERTY + "> $start AND "
                             + ORDERED_PROPERTY + " < $end";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

    @Test
    public void queryBetweenIncludeLower() throws Exception {
        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] WHERE " + ORDERED_PROPERTY + ">= $start AND "
                             + ORDERED_PROPERTY + " < $end";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

   
    @Test
    public void queryBetweenIncludeHigher() throws Exception {
        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] WHERE " + ORDERED_PROPERTY + "> $start AND "
                             + ORDERED_PROPERTY + " <= $end";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

    @Test
    public void queryBetweenIncludeBoth() throws Exception {
        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] WHERE " + ORDERED_PROPERTY + ">= $start AND "
                             + ORDERED_PROPERTY + " <= $end";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

        // configuring direction
        String propertyDirection = definition.getString(OrderedIndex.DIRECTION);
        if (propertyDirection == null) {
            // LOG.debug("Using default direction for sorting: {}", this.direction);
        } else {
            OrderDirection dir = OrderDirection.fromString(propertyDirection);
            if (dir == null) {
                LOG.warn("An unknown direction has been specified for sorting: '{}'. Using default one. {}",
                         propertyDirection, this.direction);
            } else {
                this.direction = dir;
View Full Code Here

Examples of org.apache.jackrabbit.oak.plugins.index.property.OrderedIndex.OrderDirection

    @Test
    public void queryGreaterThan() throws Exception {
        initWithProperProvider();
        setTravesalEnabled(false);

        final OrderDirection direction = OrderDirection.ASC;
        final String query = "SELECT * FROM [nt:base] AS n WHERE n.%s > $%s";

        // index automatically created by the framework:
        // {@code createTestIndexNode()}

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.