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 name)
      Description copied from interface: Schema
      Obtains a field using name.
      Specified by:
      getField in interface Schema
      Parameters:
      name - field name
      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 fieldName)
      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