public final class ResultSet<T extends ResultSetItem>
extends java.lang.Object
A result set usually consists of a list of items and additional result set information (e.g. to mark first and last items).
This class is immutable.
Modifier and Type | Method and Description |
---|---|
static <T extends ResultSetItem> |
create(ResultSetProvider<T> resultSetProvider,
ResultSetManagement resultSetManagement)
Creates a result set from a result set provider and a result set management.
|
java.util.List<T> |
getItems()
Gets the items.
|
ResultSetManagement |
getResultSetManagement()
Gets the result set info.
|
public final java.util.List<T> getItems()
Gets the items.
public final ResultSetManagement getResultSetManagement()
Gets the result set info.
public static <T extends ResultSetItem> ResultSet<T> create(ResultSetProvider<T> resultSetProvider, ResultSetManagement resultSetManagement)
Creates a result set from a result set provider and a result set management.
If the result set management asks for a limited result set (e.g. starting at a specific index and a maximum size), this method takes care, that the result set provider returns the appropriate results.
The returned result set contains the limited result set as well as a result set management, which contains the total item count and which can be used by the requester to navigate through the results, e.g. by asking for the previous or next page.
T
- The type of the result set.resultSetProvider
- The result set provider.resultSetManagement
- The result set management.Copyright © 2014–2019 XMPP.rocks. All rights reserved.