Example usage for org.springframework.data.solr.core.query Crotch setParent

List of usage examples for org.springframework.data.solr.core.query Crotch setParent

Introduction

In this page you can find the example usage for org.springframework.data.solr.core.query Crotch setParent.

Prototype

protected void setParent(@Nullable Node parent) 

Source Link

Usage

From source file:org.springframework.data.solr.core.query.Criteria.java

@SuppressWarnings("unchecked")
@Override//from w w w. j  ava2 s .c  o  m
public Crotch and(Node node) {

    if (!(node instanceof Criteria)) {
        throw new IllegalArgumentException("Can only add instances of Criteria");
    }

    Crotch crotch = new Crotch();
    crotch.setParent(this.getParent());
    crotch.add(this);
    crotch.add((Criteria) node);
    return crotch;
}

From source file:org.springframework.data.solr.core.query.Criteria.java

@SuppressWarnings("unchecked")
public Crotch or(Node node) {

    if (!(node instanceof Criteria)) {
        throw new IllegalArgumentException("Can only add instances of Criteria");
    }//w w w.j a v a  2  s  .c o  m

    node.setPartIsOr(true);

    Crotch crotch = new Crotch();
    crotch.setParent(this.getParent());
    crotch.add(this);
    crotch.add((Criteria) node);
    return crotch;
}