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

org.nustaq.reallive.query.CompiledQuery Maven / Gradle / Ivy

There is a newer version: 5.2.1
Show newest version
package org.nustaq.reallive.query;

import org.nustaq.reallive.api.RLHashIndexPredicate;

import java.io.Serializable;

/**
 * Created by ruedi on 28/08/15.
 */
public class CompiledQuery implements Serializable {

    RLSupplier compiled;
    EvalContext[] ref;
    RLHashIndexPredicate hashIndex;

    public CompiledQuery(RLSupplier compiled, EvalContext[] ref) {
        this.compiled = compiled;
        this.ref = ref;
    }

    public Value evaluate( EvalContext rec ) {
        ref[0] = rec;
        return compiled.get();
    }

    public RLHashIndexPredicate getHashIndex() {
        return hashIndex;
    }

    public CompiledQuery hashIndex(RLHashIndexPredicate h) {
        hashIndex = h;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy