| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LIMIT |
static Pagination |
DEFAULT_PAGINATION
The default pagination used for
PageQuery's with a limit set to DEFAULT_LIMIT |
| Constructor and Description |
|---|
PageQuery.Builder() |
| Modifier and Type | Method and Description |
|---|---|
PageQuery |
build()
Creates a new
PageQuery object represented by the state of this builder |
PageQuery.Builder |
from(PageQuery query)
Creates a new builder from an existing
PageQuery. |
PageQuery.Builder |
withDisplayName(String displayName)
Sets the display name for this builder to be used to query all sites that have the displayName.
|
PageQuery.Builder |
withFilter(Filter<Page> filter)
Sets the filter for this builder
|
PageQuery.Builder |
withNextPage()
Sets the pagination of this builder to
pagination.getNext() if it's not null. |
PageQuery.Builder |
withPagination(int offset,
int limit)
Sets the pagination object of this builder to use the specified offset and limit.
|
PageQuery.Builder |
withPagination(Pagination pagination)
Sets the pagination object of this builder
|
PageQuery.Builder |
withPreviousPage()
Sets the pagination of this builder to
pagination.getPrevious() if it's not null. |
PageQuery.Builder |
withSiteId(SiteId siteId)
Convenience method for setting both the site type and site name.
|
PageQuery.Builder |
withSiteName(String siteName)
Sets the siteName for this builder to be used to query all sites that have the name.
|
PageQuery.Builder |
withSiteType(SiteType siteType)
Sets the siteType for this builder to be used to query all sites that have the
SiteType. |
public static final int DEFAULT_LIMIT
public static final Pagination DEFAULT_PAGINATION
PageQuery's with a limit set to DEFAULT_LIMITpublic PageQuery.Builder withSiteId(SiteId siteId)
siteId - the site idpublic PageQuery.Builder withSiteType(SiteType siteType)
SiteType.siteType - the site typepublic PageQuery.Builder withSiteName(String siteName)
siteName - the site namepublic PageQuery.Builder withDisplayName(String displayName)
displayName - the display namepublic PageQuery.Builder withPagination(int offset, int limit)
offset - the offset of the paginationlimit - the limit of the paginationpublic PageQuery.Builder withPagination(Pagination pagination)
pagination - the pagination objectpublic PageQuery.Builder withNextPage()
pagination.getNext() if it's not null.public PageQuery.Builder withPreviousPage()
pagination.getPrevious() if it's not null.public PageQuery.Builder withFilter(Filter<Page> filter)
filter - the filterpublic PageQuery build()
PageQuery object represented by the state of this builderPageQuery objectpublic PageQuery.Builder from(PageQuery query)
PageQuery.query - the query used to build the initial state of the builderCopyright © 2013 JBoss by Red Hat. All Rights Reserved.