public final class ResultSetManagement
extends java.lang.Object
The implementation of the <set/>
element in the http://jabber.org/protocol/rsm
namespace.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE
|
Modifier and Type | Method and Description |
---|---|
static ResultSetManagement |
forCount(int count)
Deprecated.
|
static ResultSetManagement |
forCount(java.lang.Integer count,
java.lang.Integer index,
java.lang.String first,
java.lang.String last)
Deprecated.
|
static ResultSetManagement |
forCountResponse(int count)
Gets a result set, which has a count information.
|
static ResultSetManagement |
forFirstPage(int max)
Gets a result set, which requests the first page.
|
static ResultSetManagement |
forItemCount()
Gets a result set, which gets the item count of a result without retrieving the items themselves.
|
static ResultSetManagement |
forLastPage(int max)
Gets a result set, which requests the last page.
|
static ResultSetManagement |
forLimit(int limit)
Deprecated.
|
static ResultSetManagement |
forLimit(int limit,
int index)
Gets a result set, which starts at a particular index.
|
static ResultSetManagement |
forNextPage(int max,
java.lang.String id)
Gets a result set, which requests the next page after a specified item.
|
static ResultSetManagement |
forPreviousPage(int max,
java.lang.String id)
Gets a result set, which requests the previous page before a specified item.
|
static ResultSetManagement |
forResponse(java.lang.Integer count,
java.lang.Integer index,
java.lang.String first,
java.lang.String last)
Gets a result set, which has a count information, including first and last item.
|
java.lang.String |
getAfter()
Gets the ‘after’ element.
|
java.lang.String |
getBefore()
Gets the ‘before’ element.
|
java.lang.String |
getFirstItem()
Gets the first item.
|
java.lang.Integer |
getFirstItemIndex()
Gets the first item’s index.
|
java.lang.Integer |
getIndex()
Gets the index.
|
java.lang.Integer |
getItemCount()
Gets the item count of a result set.
|
java.lang.String |
getLastItem()
Gets the last item.
|
java.lang.Integer |
getMaxSize()
Gets the max size.
|
boolean |
isRequestingCount()
Indicates, whether this RSM is used for requesting the item count.
|
ResultSetManagement |
nextPage(int max)
Creates the result set request for the next page.
|
ResultSetManagement |
previousPage(int max)
Creates the result set request for the previous page.
|
public static final java.lang.String NAMESPACE
public final ResultSetManagement nextPage(int max)
Creates the result set request for the next page. It requires that this result set management has a “last item” set, otherwise the last page is requested.
max
- The number of items in the page.public final ResultSetManagement previousPage(int max)
Creates the result set request for the previous page. It requires that this result set management has a “first item” set, otherwise the first page is requested.
max
- The number of items in the page.@Deprecated public static ResultSetManagement forLimit(int limit)
forFirstPage(int)
Gets a result set, which limits the number of items of a result to be returned.
limit
- The limit, i.e. the maximum number of items.public static ResultSetManagement forFirstPage(int max)
Gets a result set, which requests the first page.
max
- The item count per page.public static ResultSetManagement forNextPage(int max, java.lang.String id)
Gets a result set, which requests the next page after a specified item.
max
- The item count per page.id
- The id of the last item of the previous page. This should be the getLastItem()
()} of the previous page.public static ResultSetManagement forPreviousPage(int max, java.lang.String id)
Gets a result set, which requests the previous page before a specified item.
max
- The item count per page.id
- The id of the first item of the next page. This should be the getFirstItem()
of the next page.public static ResultSetManagement forLastPage(int max)
Gets a result set, which requests the last page.
max
- The item count per page.public static ResultSetManagement forLimit(int limit, int index)
Gets a result set, which starts at a particular index.
limit
- The item count per page.index
- The index to start from.@Deprecated public static ResultSetManagement forCount(int count)
forCountResponse(int)
Gets a result set, which has a count information.
count
- The item count per page.public static ResultSetManagement forCountResponse(int count)
Gets a result set, which has a count information. The result set is intended for the response.
count
- The item count per page.@Deprecated public static ResultSetManagement forCount(java.lang.Integer count, java.lang.Integer index, java.lang.String first, java.lang.String last)
forResponse(Integer, Integer, String, String)
Gets a result set, which has a count information, including first and last item.
count
- The item count per page.index
- The index of the first item.first
- The first item.last
- The last item.public static ResultSetManagement forResponse(java.lang.Integer count, java.lang.Integer index, java.lang.String first, java.lang.String last)
Gets a result set, which has a count information, including first and last item. The result set is intended for the response.
count
- The item count per page.index
- The index of the first item.first
- The first item.last
- The last item.public static ResultSetManagement forItemCount()
Gets a result set, which gets the item count of a result without retrieving the items themselves.
public final java.lang.Integer getItemCount()
Gets the item count of a result set.
public final java.lang.String getFirstItem()
Gets the first item.
public final java.lang.Integer getFirstItemIndex()
Gets the first item’s index.
public final java.lang.String getLastItem()
Gets the last item.
public final java.lang.Integer getMaxSize()
Gets the max size.
public final java.lang.String getAfter()
Gets the ‘after’ element.
public final java.lang.String getBefore()
Gets the ‘before’ element.
public final java.lang.Integer getIndex()
Gets the index.
public final boolean isRequestingCount()
Indicates, whether this RSM is used for requesting the item count.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.