com.atlassian.jira.issue.search.parameters.lucene.sort
Class DocumentSortComparatorSource

java.lang.Object
  extended by org.apache.lucene.search.FieldComparatorSource
      extended by com.atlassian.jira.issue.search.parameters.lucene.sort.DocumentSortComparatorSource
All Implemented Interfaces:
Serializable

public class DocumentSortComparatorSource
extends org.apache.lucene.search.FieldComparatorSource

This uses an Issue Sort Comparator to retrive the issue and then calls IssueSortComparator.compare(Issue, Issue) for each document it encounters.

Whilst slower than the MappedSortComparator, it is used by some custom field implementations.

See Also:
Serialized Form

Nested Class Summary
 class DocumentSortComparatorSource.InternalFieldComparator
          This compares whole issues using the Issue Comparator passed in.
 
Constructor Summary
DocumentSortComparatorSource(IssueSortComparator sortComparator)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 org.apache.lucene.search.FieldComparator newComparator(String fieldname, int numHits, int sortPos, boolean reversed)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentSortComparatorSource

public DocumentSortComparatorSource(IssueSortComparator sortComparator)
Method Detail

newComparator

public org.apache.lucene.search.FieldComparator newComparator(String fieldname,
                                                              int numHits,
                                                              int sortPos,
                                                              boolean reversed)
                                                       throws IOException
Specified by:
newComparator in class org.apache.lucene.search.FieldComparatorSource
Throws:
IOException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.