|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScrollerBean
Base class for scrolling searches.
Method Summary | |
---|---|
String |
commandKey()
Returns the String to use to retrieve the appropriate query for this search. |
String |
countKey()
Returns the String to use to retrieve the appropriate query to count the entries matching this search. |
int |
entryCount()
The total number of entries in search list. |
boolean |
failsOnEmpty()
Whether to branch to "failure" if list returns zero entries. |
Integer |
getScrollFrom()
The relative position of the first entry in this set. |
boolean |
hasParameter()
Returns whether this search takes a parameter (eg primary key) [false]. |
boolean |
isLike()
Returns whether this search uses the LIKE operator so that other methods know to wrap searchValue in a call to
like [false]. |
void |
listLegend(ResultList list)
Setup the legend for the result list. |
Scroller |
newScroller(int entries)
Return new scroller using the current starting point (getScrollFrom), the default limit (set.SCROLL_ROWS), and current count from Access (countCurrent). |
Collection |
result(Object target,
Object parameter)
Returns the collection representing the result of the Search [null]. |
Object[] |
scrollerParams(String parameter)
Return the array of parameters needed to select the entries for this set. |
ProcessResult |
scrollerSearch()
Invoke business logic; return result. |
Integer |
scrollOffset()
The number of entries before the first entry in the set (One less than scrollFrom) [0]. |
int |
scrollRows()
The number of entries to return [Scroller.SCROLL_ROWS]. |
String |
searchLabel()
Returns a label to the property being searched. |
String |
searchProperty()
Returns the name of the property being matched with the searchValue . |
Object |
searchValue()
Returns the value used in the search [null]. |
void |
setScrollFrom(Integer scrollFrom)
|
String |
tokenEmptyDispatch()
Returns the dispatch token for an empty result [Tokens.FAILURE]. |
String |
tokenEmptyMessage()
Returns the message token for an empty result [Tokens.DATA_ACCESS_EMPTY]. |
Method Detail |
---|
Integer getScrollFrom()
void setScrollFrom(Integer scrollFrom)
Integer scrollOffset()
int scrollRows()
String countKey()
boolean hasParameter()
getParameter
to return the
required parameter.
Object searchValue()
boolean isLike()
searchValue
in a call to
like
[false].
int entryCount() throws ResourceException
May
- throw an exception on data access error
ResourceException
String commandKey()
String searchProperty()
searchValue
.
Default method returns null.
Must be overridden or provide functionality.
String searchLabel()
searchProperty
.
Must be overridden or provide functionality.
boolean failsOnEmpty()
String tokenEmptyMessage()
String tokenEmptyDispatch()
Object[] scrollerParams(String parameter)
parameter
- The additional parameter needed to select
this set, if any.Collection result(Object target, Object parameter) throws ResourceException
isParameter
is false.
target
- Bean to use for entriesparameter
- Value to use to match entries
ResourceException
Scroller newScroller(int entries) throws ResourceException
ResourceException
- on data access errorvoid listLegend(ResultList list)
searchLabel
and searchValue
(if any).
ProcessResult scrollerSearch() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |