public class MySearchTool extends AbstractSearchTool
AbstractSearchTool.StoredResultsDEFAULT_CRITERIA_KEY, STORED_RESULTS_KEYDEFAULT_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_KEYLOCK_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, setupgetFirstIndex, 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, setSlipSizeKeyconfigure, configure, getLog, initLogger, isConfigLocked, isSafeMode, setLockConfig, setSafeModepublic void store(Object item)
public void store(Map items)
public void store(Collection items)
public boolean getCreateSession()
getCreateSession in class PagerToolprotected List executeQuery(Object crit)
executeQuery in class AbstractSearchToolcrit - search criteriaList of results for this queryCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.