aboutsummaryrefslogtreecommitdiffstats
path: root/client/src/main/java/ai/vespa/client/dsl/QueryChain.java
blob: 58b1563a222be03e941c59e68c406f3d7f9062ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.client.dsl;

public abstract class QueryChain {

    String op;
    Sources sources;
    Select select;
    Query query;
    boolean nonEmpty;

    void setOp(String op) {
        this.op = op;
    }

    String getOp() {
        return op;
    }

    Sources getSources() {
        return sources;
    }

    void setSources(Sources sources) {
        this.sources = sources;
    }

    Select getSelect() {
        return select;
    }

    Query getQuery() {
        return query;
    }

    boolean nonEmpty() {
        return nonEmpty;
    }

    abstract boolean hasPositiveSearchField(String fieldName);

    abstract boolean hasPositiveSearchField(String fieldName, Object value);

    abstract boolean hasNegativeSearchField(String fieldName);

    abstract boolean hasNegativeSearchField(String fieldName, Object value);

}