Class Record

java.lang.Object
org.apache.maven.search.api.Record

public final class Record extends Object
A search response record.
  • Constructor Details

  • Method Details

    • getBackendId

      public String getBackendId()
      Returns SearchBackend.getBackendId() of originating search backend. Never null.
    • getRepositoryId

      public String getRepositoryId()
      Returns SearchBackend.getRepositoryId()) of originating search backend. Never null.
    • getUid

      public String getUid()
      Returns UID (unique if combined with getBackendId()) of search result record, if provided by backend. May be null if not provided.
    • getLastUpdated

      public Long getLastUpdated()
      Returns Long, representing "last updated" timestamp as epoch millis if provided by backend. May be null if not provided.
    • getFields

      public Map<Field,Object> getFields()
      Returns unmodifiable map of all values keyed by Field backing this record.
    • fieldSet

      public Set<Field> fieldSet()
      Returns unmodifiable set of present fields in this record, never null.
    • hasField

      public boolean hasField(Field field)
      Returns true if given field is present in this record.
    • getValue

      public String getValue(Field.StringField field)
      Returns the value belonging to given field in this record, or null if field not present.
    • getValue

      public Number getValue(Field.NumberField field)
      Returns the value belonging to given field in this record, or null if field not present.
    • getValue

      public Boolean getValue(Field.BooleanField field)
      Returns the value belonging to given field in this record, or null if field not present.