Class CompareYearSolrDocWrapper

java.lang.Object
io.goobi.viewer.model.metadata.CompareYearSolrDocWrapper
All Implemented Interfaces:
Comparable<CompareYearSolrDocWrapper>

public class CompareYearSolrDocWrapper extends Object implements Comparable<CompareYearSolrDocWrapper>
Wraps a Solr document to provide year-based comparison and sorting for calendar display.
  • Constructor Details

    • CompareYearSolrDocWrapper

      public CompareYearSolrDocWrapper(org.apache.solr.common.SolrDocument doc)
      Creates a new CompareYearSolrDocWrapper instance.
      Parameters:
      doc - a SolrDocument object.
  • Method Details

    • compareTo

      public int compareTo(CompareYearSolrDocWrapper comp)
      Specified by:
      compareTo in interface Comparable<CompareYearSolrDocWrapper>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getSolrDocument

      public org.apache.solr.common.SolrDocument getSolrDocument()
      Getter for the field solrDocument.
      Returns:
      the Solr document wrapped by this comparator
    • setSolrDocument

      public void setSolrDocument(org.apache.solr.common.SolrDocument solrDocument)
      Setter for the field solrDocument.
      Parameters:
      solrDocument - a SolrDocument object.
    • getYear

      public long getYear()
      Getter for the field year.
      Returns:
      a long.
    • setYear

      public void setYear(long year)
      Setter for the field year.
      Parameters:
      year - a long.