java.lang.Object
org.springframework.data.elasticsearch.core.query.SimpleField
All Implemented Interfaces:
Field

public class SimpleField extends Object implements Field
The most trivial implementation of a Field. The name is updatable, so it may be changed during query preparation by the MappingElasticsearchConverter.
Author:
Rizwan Idrees, Mohsin Husen, Peter-Josef Meisch
  • Constructor Details

    • SimpleField

      public SimpleField(String name)
  • Method Details

    • setName

      public void setName(String name)
      Specified by:
      setName in interface Field
    • getName

      public String getName()
      Specified by:
      getName in interface Field
    • setFieldType

      public void setFieldType(FieldType fieldType)
      Specified by:
      setFieldType in interface Field
      Parameters:
      fieldType - sets the field's type
    • getFieldType

      @Nullable public FieldType getFieldType()
      Specified by:
      getFieldType in interface Field
      Returns:
      The annotated FieldType of the field
    • setPath

      public void setPath(@Nullable String path)
      Description copied from interface: Field
      Sets the path if this field has a multi-part name that should be used in a nested query.
      Specified by:
      setPath in interface Field
      Parameters:
      path - the value to set
    • getPath

      @Nullable public String getPath()
      Specified by:
      getPath in interface Field
      Returns:
      the path if this is a field for a nested query
    • toString

      public String toString()
      Overrides:
      toString in class Object