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

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

Introduction

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

Prototype

void add(Node node) 

Source Link

Usage

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

/**
 * Explicitly wrap {@link Criteria} inside not operation.
 * /*from w  w  w .  ja v a2 s  .  c o m*/
 * @since 1.4
 * @return
 */
public Criteria notOperator() {

    Crotch c = new Crotch();
    c.setNegating(true);
    c.add(this);

    return c;
}

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

/**
 * Explicitly connect {@link Criteria} with another one allows to create explicit bracketing.
 * /* w  w  w .  jav  a 2  s . c o  m*/
 * @since 1.4
 * @return
 */
public Criteria connect() {
    Crotch c = new Crotch();
    c.add(this);
    return c;
}

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

@SuppressWarnings("unchecked")
@Override/*www .j a v  a2 s  .  c  om*/
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");
    }/* ww w .ja  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;
}