summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/searchdefinition/DocumentReference.java
blob: 50e4b0d2f416c5d536ba07e67888301db14dc02a (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
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition;

import com.yahoo.document.Field;

/**
 * Represents a document reference. Contains the document reference field and the search instance of the referred document.
 *
 * @author bjorncs
 */
public class DocumentReference {

    private final Field referenceField;
    private final Search targetSearch;

    public DocumentReference(Field referenceField, Search targetSearch) {
        this.referenceField = referenceField;
        this.targetSearch = targetSearch;
    }

    public Field referenceField() {
        return referenceField;
    }

    public Search targetSearch() {
        return targetSearch;
    }
}