Class \Prado\Data\SqlMap\DataMapper\TSqlMapPagedList
TSqlMapPagedList implements a list with paging functionality that retrieves
data from a SqlMap statement.
The maximum number of records fetched is 3 times the page size. It fetches the current, the previous and the next page at a time. This allows the paged list to determine if the page is a the begin, the middle or the end of the list.
The paged list does not need to know about the total number of records.
Class hierarchy
- \Prado\Data\SqlMap\DataMapper\TSqlMapPagedList
- \Prado\Collections\TPagedList
- \Prado\Collections\TList implements IteratorAggregate, ArrayAccess, Countable
- \Prado\TComponent
Since: 3.1
public
|
__construct(IMappedStatement $statement, mixed $parameter, int $pageSize[, null|mixed $delegate = null ][, int $page = 0 ]) : mixed
Create a new SqlMap paged list.
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
fetchDataFromStatement(TSqlMapPagedList $sender, TPagedListFetchDataEventParameter $param) : mixed
Fetch data by executing the SqlMap statement.
|
protected
|
getOffsetAndLimit(TPagedListFetchDataEventParameter $param) : array<string|int, mixed>
Calculate the data fetch offsets and limits.
|
protected
|
initialize(IMappedStatement $statement, mixed $parameter, int $pageSize, int $page) : mixed
Initialize the paged list.
|
protected
|
populateData(TPagedListFetchDataEventParameter $param, array<string|int, mixed> $data) : mixed
Populate the list with the fetched data.
|
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |