R
- Class associated with a row in tablepublic abstract class AbstractPaginatedListSelector<R> extends PaginatedSelector<R,java.util.List<R>>
PaginatedSelector
that implements ListSelectOperation
features. Implement
createListSelectOperation()
for the specific kind of select operation to use.Constructor and Description |
---|
AbstractPaginatedListSelector(int pageSize,
Table<R> table)
Constructs for a page size and table.
|
AbstractPaginatedListSelector(int pageSize,
Table<R> table,
boolean scrollSensitive)
Constructs for a page size, table and scroll sensitivity.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ListSelectOperation<R> |
createListSelectOperation() |
java.lang.String |
getOrderByName()
Gets order by name that was set with
setOrderByName(String) . |
java.lang.Object |
getParameter(java.lang.String name)
Gets value of named parameter set with
setParameter(String, Object) . |
java.lang.Object[] |
getParameters()
Gets the parameters that were set by
setParameters(Object...) . |
Table<R> |
getTable() |
java.lang.String |
getWhereConditionName()
Gets where condition name supplied in
setWhere(String) |
void |
setOrderByName(java.lang.String orderByName)
Sets the order for the rows returned by
PaginatedSelector.selectPage() and PaginatedSelector.selectRow() . |
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets a named parameter for a
Where . |
void |
setParameters(java.lang.Object... parameters)
Sets the parameters that correspond to
WhereField.operand() that are "?". |
void |
setWhere(java.lang.String whereConditionName)
Sets the name of the
Where condition to filter the rows that are returned
by PaginatedSelector.selectPage() and PaginatedSelector.selectRow() . |
close, confirmExecuted, execute, getPageNumber, getPageSize, init, isScrollSensitive, nextPage, previousPage, selectPage, selectRow, setPageNumber, topOfPage
public AbstractPaginatedListSelector(int pageSize, Table<R> table) throws SelectorException
pageSize
- rows per pagetable
- select rows from this tableSelectorException
- if errorpublic AbstractPaginatedListSelector(int pageSize, Table<R> table, boolean scrollSensitive) throws SelectorException
pageSize
- rows per pagetable
- select rows from this tablescrollSensitive
- true to use result set type of ResultSet.TYPE_SCROLL_SENSITIVE
,
false to use ResultSet.TYPE_SCROLL_INSENSITIVE
SelectorException
- if errorprotected abstract ListSelectOperation<R> createListSelectOperation() throws java.lang.Exception
java.lang.Exception
public java.lang.String getOrderByName()
setOrderByName(String)
.ScalarSelectOperation.getOrderByName()
public void setOrderByName(java.lang.String orderByName) throws SelectorException
PaginatedSelector.selectPage()
and PaginatedSelector.selectRow()
.
The default is empty string which indicates no ordering.orderByName
- the name of the OrderBy
to useSelectorException
- if errorScalarSelectOperation.setOrderBy(String)
public java.lang.String getWhereConditionName()
setWhere(String)
SqlOperation.getWhereConditionName()
public void setWhere(java.lang.String whereConditionName) throws SelectorException
Where
condition to filter the rows that are returned
by PaginatedSelector.selectPage()
and PaginatedSelector.selectRow()
. The default is empty string which
indicates that all rows will be returned.whereConditionName
- the name of the Where
to useSelectorException
- if errorSqlOperation.setWhere(String)
public java.lang.Object[] getParameters()
setParameters(Object...)
.SqlOperation.getParameters()
public void setParameters(java.lang.Object... parameters)
WhereField.operand()
that are "?". The
default is empty array which indicates no parameters.parameters
- values to use for Where
that was specified by setWhere(String)
SqlOperation.setParameters(Object...)
public java.lang.Object getParameter(java.lang.String name)
setParameter(String, Object)
.name
- name of parameter within a Where
that begins with $SqlOperation.getParameter(String)
public void setParameter(java.lang.String name, java.lang.Object value)
Where
.name
- name of parameter within a Where
that begins with $value
- value of parameter to use in prepared statementSqlOperation.setParameter(String, Object)