public class QueryBounds extends Object
offset and limit, which are supported by many queries.| Modifier and Type | Method and Description |
|---|---|
static QueryBounds |
defaultBounds()
|
Iterable<String> |
describe() |
static QueryBounds |
empty()
Returns a
QueryBounds instance with limit set to some(0), so that the
result set will always be empty. |
boolean |
equals(Object other) |
com.atlassian.fugue.Option<Integer> |
getLimit()
The maximum number of items that the client wants to receive in the result set.
|
int |
getOffset()
The number of items that the client wants to skip past at the start of the result set.
|
int |
hashCode() |
static QueryBounds |
limit(com.atlassian.fugue.Option<Integer> limit)
Constructs a new
QueryBounds instance that optionally specifies the maximum number of items
to be included in each page of the result set. |
static QueryBounds |
offset(int offset)
Constructs a new
QueryBounds instance that specifies some number of items to skip past at the
start of the result set. |
QueryBounds |
withLimit(com.atlassian.fugue.Option<Integer> limit)
Returns a copy of this QueryBounds instance with the limit property changed.
|
QueryBounds |
withOffset(int offset)
Returns a copy of this QueryBounds instance with the offset property changed.
|
public static QueryBounds offset(int offset)
QueryBounds instance that specifies some number of items to skip past at the
start of the result set.offset - the number of items to skipQueryBounds instancepublic static QueryBounds limit(com.atlassian.fugue.Option<Integer> limit)
QueryBounds instance that optionally specifies the maximum number of items
to be included in each page of the result set. Note that the server may choose to impose a
smaller maximum limit.limit - the maximum number of items per result page, or Option.none() to leave this unspecifiedQueryBounds instancepublic static QueryBounds defaultBounds()
public static QueryBounds empty()
QueryBounds instance with limit set to some(0), so that the
result set will always be empty. This is useful if you want to query a collection resource
simply to find out the total number of items it contains, or to look at its links, without
actually accessing the items.public int getOffset()
public com.atlassian.fugue.Option<Integer> getLimit()
public QueryBounds withOffset(int offset)
offsetpublic QueryBounds withLimit(com.atlassian.fugue.Option<Integer> limit)
limitCopyright © 2016 Atlassian. All rights reserved.