@GwtCompatible
public class PagingInfo
extends java.lang.Object
CanonicalGridFieldValidator.java
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LOCAL_PART |
static javax.xml.namespace.QName |
QNAME |
static int |
UNLIMITED_BATCH_SIZE
Use as the value for the
batchSize parameter when the full result set
should be returned. |
Constructor and Description |
---|
PagingInfo()
Should not be used, only exposed for serializers that require a public
parameterless constructor.
|
PagingInfo(int startIndex,
int batchSize) |
PagingInfo(int startIndex,
int batchSize,
java.util.List<SortInfo> sort) |
PagingInfo(int startIndex,
int batchSize,
SortInfo... sort) |
PagingInfo(int startIndex,
int batchSize,
SortInfo sort) |
PagingInfo(int startIndex,
int batchSize,
java.lang.String sortField,
boolean ascending) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns a boolean value indicating whether the given object is equal to
this object.
|
int |
getBatchSize()
Returns the number of results to return in one page.
|
java.util.List<SortInfo> |
getSort()
Returns the sort expressions that are applied before paging.
|
int |
getStartIndex()
Returns the index from which to start paging.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
hasSort()
Returns
true if a sort is configured (ie, getSort() is non-empty). |
PagingInfo |
toOneBased() |
java.lang.String |
toString()
Returns a string representation of the
PagingInfo |
PagingInfo |
toZeroBased()
The caller assumes that this
pagingInfo has a 1-based start index. |
public static final java.lang.String LOCAL_PART
public static final javax.xml.namespace.QName QNAME
public static final int UNLIMITED_BATCH_SIZE
batchSize
parameter when the full result set
should be returned. Use sparingly, as it may have a performance impact on large
data sets.public PagingInfo()
public PagingInfo(int startIndex, int batchSize)
startIndex
- the index from which to start paging. This may be 0-based or
1-based depending on where this PagingInfo object will be used.batchSize
- the number of results to return in one page. If negative, the full
result set should be returned.public PagingInfo(int startIndex, int batchSize, java.util.List<SortInfo> sort)
startIndex
- the index from which to start paging. This may be 0-based or
1-based depending on where this PagingInfo object will be used.batchSize
- the number of results to return in one page. If negative, the full
result set should be returned.sort
- the sort expressions to apply before paging.public PagingInfo(int startIndex, int batchSize, SortInfo... sort)
startIndex
- the index from which to start paging. This may be 0-based or
1-based depending on where this PagingInfo object will be used.batchSize
- the number of results to return in one page. If negative, the full
result set should be returned.sort
- the sort expressions to apply before paging.public PagingInfo(int startIndex, int batchSize, java.lang.String sortField, boolean ascending)
startIndex
- the index from which to start paging. This may be 0-based or
1-based depending on where this PagingInfo object will be used.batchSize
- the number of results to return in one page. If negative, the full
result set should be returned.sort
- the sort expressions to apply before paging.sortField
- the field to sort by. May be a simple field name, or dot notation
to specify a subfield (e.g., "complexField.subField")ascending
- if true, indicates that the sort on sortField
should be in
ascending order. If false, indicates that the sort should be in
descending order.public PagingInfo(int startIndex, int batchSize, SortInfo sort)
startIndex
- the index from which to start paging. This may be 0-based or
1-based depending on where this PagingInfo object will be used.batchSize
- the number of results to return in one page. If negative, the full
result set should be returned.sort
- the sort expression to apply before paging.public int getStartIndex()
public int getBatchSize()
public java.util.List<SortInfo> getSort()
public boolean hasSort()
true
if a sort is configured (ie, getSort()
is non-empty).public java.lang.String toString()
PagingInfo
toString
in class java.lang.Object
public PagingInfo toZeroBased()
pagingInfo
has a 1-based start index.
This returns a new PagingInfo with the startIndex decremented by 1 to be
zero-based. No validation is performed to ensure that this
pagingInfo
was actually one- based.public PagingInfo toOneBased()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
o_
- the reference object with which to compare.true
if both objects are equal, otherwise
false
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.