Example usage for org.springframework.data.elasticsearch.core.query Field getName

List of usage examples for org.springframework.data.elasticsearch.core.query Field getName

Introduction

In this page you can find the example usage for org.springframework.data.elasticsearch.core.query Field getName.

Prototype

String getName();

Source Link

Document

Get the name of the field used in schema.xml of elasticsearch server

Usage

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

/**
 * Creates a new Criteria for the given field
 * // w  w  w .  j  a va2 s  .  co m
 * @param field
 */
public Criteria(Field field) {
    Assert.notNull(field, "Field for criteria must not be null");
    Assert.hasText(field.getName(), "Field.name for criteria must not be null/empty");

    this.criteriaChain.add(this);
    this.field = field;
}

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

protected Criteria(List<Criteria> criteriaChain, Field field) {
    Assert.notNull(criteriaChain, "CriteriaChain must not be null");
    Assert.notNull(field, "Field for criteria must not be null");
    Assert.hasText(field.getName(), "Field.name for criteria must not be null/empty");

    this.criteriaChain.addAll(criteriaChain);
    this.criteriaChain.add(this);
    this.field = field;
}