public class RecordList
extends java.lang.Object
Constructor and Description |
---|
RecordList()
Constructor for the RecordList object
|
RecordList(ResultDocList resultDocs,
SimpleLuceneIndex index)
Constructor for the RecordList object given a ResultDocList and a
SimpleLuceneIndex.
|
RecordList(SimpleLuceneIndex index)
Constructor for the RecordList object
|
RecordList(java.lang.String[] ids,
SimpleLuceneIndex index)
Constructor for the RecordList object given an array of ids
|
RecordList(java.lang.String query,
SimpleLuceneIndex index)
Contructor for the RecordList object given a query string and a lucene
index
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String id)
Add the id to this RecordLists's items
|
boolean |
contains(java.lang.String id)
returns true of the provided id is managed by this RecordList
|
java.lang.String |
getCurrentRecId()
Id of the current record.
|
int |
getCurrentRecIndex()
Index of the current record in the result list.
|
ResultDoc |
getCurrentResult()
Gets the current record as a ResultDoc instance.
|
java.util.List |
getHits()
Returns the records as a list of ResultDocs
|
java.util.List |
getHits(int start,
int length)
Returns a list of recordDocs for the specified range.
|
int |
getIndexOf(java.lang.String id)
Returns the index of the specified id, or -1 if it is not managed by this
RecordList
|
boolean |
getIsEmpty()
Gets the isEmpty attribute of the RecordList object
|
java.util.List |
getItems()
List of record ids returned by the last query.
|
java.lang.String |
getRecId(int recIndex)
Gets the recId attribute of the RecordList object
|
ResultDoc |
getResultDoc(java.lang.String id)
Gets the ResultDoc given a record id via the index.
|
ResultDoc |
getResultDoc(java.lang.String id,
SimpleLuceneIndex index)
Gets the resultDoc for a particular record by searching the index.
|
int |
getSize()
Gets the size attribute of the RecordList object
|
boolean |
isEmpty()
Gets the empty attribute of the RecordList object
|
java.util.Iterator |
iterator()
Returns an iterator for the current record list.
|
void |
setCurrentRecId(java.lang.String id)
Sets the currentRecId attribute of the RecordList object
|
void |
setIndex(SimpleLuceneIndex index)
Sets the index attribute of the RecordList object
|
int |
size()
The number of items
|
public RecordList()
public RecordList(SimpleLuceneIndex index)
index
- the indexpublic RecordList(java.lang.String query, SimpleLuceneIndex index)
query
- the queryindex
- a lucene indexpublic RecordList(ResultDocList resultDocs, SimpleLuceneIndex index)
resultDocs
- the resultDocListindex
- the indexpublic RecordList(java.lang.String[] ids, SimpleLuceneIndex index)
BatchOperations.handleRemoveRecords() uses this method for the values returned by request.getParameterValues().
ids
- An array of RecordIdsindex
- the indexpublic int size()
public int getSize()
public java.util.Iterator iterator()
public boolean contains(java.lang.String id)
id
- id to check against itemspublic void add(java.lang.String id)
id
- id to addpublic boolean isEmpty()
public boolean getIsEmpty()
public int getIndexOf(java.lang.String id)
id
- a record id to find the index of in this ResultListpublic java.util.List getItems()
public void setIndex(SimpleLuceneIndex index)
index
- The new index valuepublic java.util.List getHits()
public java.util.List getHits(int start, int length)
start
- beginning indexlength
- length of rangepublic java.lang.String getCurrentRecId()
public void setCurrentRecId(java.lang.String id)
id
- The new currentRecId valuepublic int getCurrentRecIndex()
public ResultDoc getCurrentResult()
public ResultDoc getResultDoc(java.lang.String id)
id
- the id for which to obtain a ResultDocpublic ResultDoc getResultDoc(java.lang.String id, SimpleLuceneIndex index)
id
- record idindex
- the indexpublic java.lang.String getRecId(int recIndex)
recIndex
- NOT YET DOCUMENTED