|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.search.LuceneCocoonPager
public class LuceneCocoonPager
This class should help you to manage paging of hits.
Nested Class Summary | |
---|---|
static class |
LuceneCocoonPager.HitWrapper
A helper class encapsulating found document, and its score |
Field Summary | |
---|---|
static int |
COUNT_OF_HITS_PER_PAGE_DEFAULT
Default count of hits per page. |
static int |
HITS_INDEX_START_DEFAULT
Default starting index |
Constructor Summary | |
---|---|
LuceneCocoonPager()
Constructor for the LuceneCocoonPager object |
|
LuceneCocoonPager(org.apache.lucene.search.Hits hits)
|
Method Summary | |
---|---|
void |
add(Object o)
Inserts the specified element into the list (optional operation). |
int |
getCountOfHits()
Get count of hits |
int |
getCountOfHitsPerPage()
Get count of hits displayed per single page |
int |
getCountOfPages()
Caluclate count of pages for displaying all hits |
int |
getStartIndex()
Set starting index for retrieving hits |
boolean |
hasNext()
Returns true if this list iterator has more elements when traversing the list in the forward direction. |
boolean |
hasPrevious()
Returns true if this list iterator has more elements when traversing the list in the reverse direction. |
Object |
next()
Returns the next element in the list. |
int |
nextIndex()
Returns the index of the element that would be returned by a subsequent call to next. |
Object |
previous()
Returns the previous element in the list. |
int |
previousIndex()
Returns the index of the element that would be returned by a subsequent call to previous. |
void |
remove()
Removes from the list the last element that was returned by next or previous (optional operation). |
void |
set(Object o)
Replaces the last element returned by next or previous with the specified element (optional operation). |
void |
setCountOfHitsPerPage(int countOfHitsPerPage)
Set count of hits displayed per single page |
void |
setHits(org.apache.lucene.search.Hits hits)
Sets the hits attribute of the LuceneCocoonPager object |
void |
setStartIndex(int start_index)
Get starting index for retrieving hits |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COUNT_OF_HITS_PER_PAGE_DEFAULT
public static final int HITS_INDEX_START_DEFAULT
Constructor Detail |
---|
public LuceneCocoonPager(org.apache.lucene.search.Hits hits)
hits
- Description of Parameterpublic LuceneCocoonPager()
Method Detail |
---|
public void setHits(org.apache.lucene.search.Hits hits)
hits
- The new hits valuepublic void setCountOfHitsPerPage(int countOfHitsPerPage)
countOfHitsPerPage
- The new countOfHitsPerPage valuepublic void setStartIndex(int start_index)
start_index
- The new startIndex valuepublic void set(Object o)
set
in interface ListIterator
o
- Description of Parameterpublic int getCountOfHits()
public int getCountOfHitsPerPage()
public int getCountOfPages()
public int getStartIndex()
public void add(Object o) throws UnsupportedOperationException
add
in interface ListIterator
o
- Description of Parameter
UnsupportedOperationException
- Description of Exceptionpublic boolean hasNext()
hasNext
in interface Iterator
hasNext
in interface ListIterator
public boolean hasPrevious()
hasPrevious
in interface ListIterator
public Object next()
next
in interface Iterator
next
in interface ListIterator
public int nextIndex()
nextIndex
in interface ListIterator
public Object previous()
previous
in interface ListIterator
public int previousIndex()
previousIndex
in interface ListIterator
public void remove()
remove
in interface Iterator
remove
in interface ListIterator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |