public class MySearchTool extends AbstractSearchTool
AbstractSearchTool.StoredResults
DEFAULT_CRITERIA_KEY, STORED_RESULTS_KEY
DEFAULT_INDEX_KEY, DEFAULT_ITEMS_PER_PAGE, DEFAULT_ITEMS_PER_PAGE_KEY, DEFAULT_NEW_ITEMS_KEY, DEFAULT_SLIP_SIZE, DEFAULT_SLIP_SIZE_KEY, session, STORED_ITEMS_KEY
LOCK_CONFIG_KEY, log, LOGGER_NAME_KEY, SAFE_MODE_KEY, USE_CLASS_LOGGER_KEY
Constructor and Description |
---|
MySearchTool() |
Modifier and Type | Method and Description |
---|---|
protected List |
executeQuery(Object crit)
This is a very simplistic implementation that looks for the
string value of the criteria in the string value of every item
in our stupid static database.
|
boolean |
getCreateSession()
Override to create a session in which to store search results.
|
void |
store(Collection items)
Adds the specified items to our static "database".
|
void |
store(Map items)
Adds the entries of the specified map to our static "database".
|
void |
store(Object item)
Adds the specified item to our static "database".
|
getCriteria, getCriteriaKey, getItems, getStoredItems, getStoredResults, reset, setCriteria, setCriteriaKey, setStoredItems, setStoredResults, setup
getFirstIndex, getIndex, getIndexKey, getItemsPerPage, getItemsPerPageKey, getLastIndex, getNewItemsKey, getNextIndex, getPage, getPageDescription, getPageNumber, getPageNumber, getPagesAvailable, getPrevIndex, getSlip, getSlipSize, getSlipSizeKey, getTotal, hasItems, setCreateSession, setIndex, setIndexKey, setItems, setItemsPerPage, setItemsPerPageKey, setNewItemsKey, setRequest, setSlipSize, setSlipSizeKey
configure, configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig, setSafeMode
public void store(Object item)
public void store(Map items)
public void store(Collection items)
public boolean getCreateSession()
getCreateSession
in class PagerTool
protected List executeQuery(Object crit)
executeQuery
in class AbstractSearchTool
crit
- search criteriaList
of results for this queryCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.