All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.blueprints.util.wrappers.WrappedGraphQuery Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.blueprints.util.wrappers;

import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Vertex;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public abstract class WrappedGraphQuery implements GraphQuery {

    protected GraphQuery query;

    public WrappedGraphQuery(final GraphQuery query) {
        this.query = query;
    }

    public GraphQuery has(final String key, final Object value) {
        this.query = this.query.has(key, value);
        return this;
    }

    public > GraphQuery has(final String key, final T value, final Compare compare) {
        this.query = this.query.has(key, value, compare);
        return this;
    }

    public > GraphQuery interval(final String key, final T startValue, final T endValue) {
        this.query = this.query.interval(key, startValue, endValue);
        return this;
    }

    public GraphQuery limit(final long max) {
        this.query = this.query.limit(max);
        return this;
    }

    public abstract Iterable edges();

    public abstract Iterable vertices();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy