Package io.goobi.viewer.model.metadata
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 Summary
ConstructorsConstructorDescriptionCompareYearSolrDocWrapper(org.apache.solr.common.SolrDocument doc) Creates a new CompareYearSolrDocWrapper instance. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanorg.apache.solr.common.SolrDocumentGetter for the fieldsolrDocument.longgetYear()Getter for the fieldyear.inthashCode()voidsetSolrDocument(org.apache.solr.common.SolrDocument solrDocument) Setter for the fieldsolrDocument.voidsetYear(long year) Setter for the fieldyear.
-
Constructor Details
-
CompareYearSolrDocWrapper
public CompareYearSolrDocWrapper(org.apache.solr.common.SolrDocument doc) Creates a new CompareYearSolrDocWrapper instance.- Parameters:
doc- aSolrDocumentobject.
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<CompareYearSolrDocWrapper>
-
hashCode
public int hashCode() -
equals
-
getSolrDocument
public org.apache.solr.common.SolrDocument getSolrDocument()Getter for the fieldsolrDocument.- Returns:
- the Solr document wrapped by this comparator
-
setSolrDocument
public void setSolrDocument(org.apache.solr.common.SolrDocument solrDocument) Setter for the fieldsolrDocument.- Parameters:
solrDocument- aSolrDocumentobject.
-
getYear
public long getYear()Getter for the fieldyear.- Returns:
- a long.
-
setYear
public void setYear(long year) Setter for the fieldyear.- Parameters:
year- a long.
-