Class DefaultSchema

java.lang.Object
com.atlassian.jira.search.DefaultSchema
All Implemented Interfaces:
Schema

@ThreadSafe @Internal public class DefaultSchema extends Object implements Schema
Default implementation of Schema
  • Method Details

    • create

      public static Schema create(Collection<Field> fields)
    • getField

      public Optional<Field> getField(String path)
      Description copied from interface: Schema
      Obtains a field using name.
      Specified by:
      getField in interface Schema
      Parameters:
      path - field name
      Returns:
      Optional containing the field if it exists, empty otherwise
    • getFieldAt

      public Optional<Field> getFieldAt(String path)
      Description copied from interface: Schema
      Obtains a field by its path.
      Specified by:
      getFieldAt in interface Schema
      Parameters:
      path - the dot notated path to the field to retrieve, for example: "field", "field.subfield".
      Returns:
      Optional containing the field if it exists, empty otherwise
    • getFields

      public Collection<Field> getFields()
      Specified by:
      getFields in interface Schema
      Returns:
      the fields defined in the index schema excluding id and version.
    • isDefined

      public boolean isDefined(Field field)
      Specified by:
      isDefined in interface Schema
      Returns:
      whether the given field is defined in this index schema.
    • isDefined

      public boolean isDefined(String name)
      Specified by:
      isDefined in interface Schema
      Returns:
      whether the given field name is defined in this index schema.
    • toString

      public String toString()
      Overrides:
      toString in class Object