public class BaseQueryRequestInfo extends java.lang.Object implements QueryRequestInfo
QueryRequestInfo.QueryRequestInfoFactory
Modifier and Type | Field and Description |
---|---|
static QueryRequestInfo |
DEFAULT_QUERY_REQUEST |
DEFAULT_QUERY_INFO_FACTORY, GET, SCF_SELECTORS
Constructor and Description |
---|
BaseQueryRequestInfo(boolean isQueryRequest,
java.util.Map<java.lang.String,java.lang.String[]> predicates,
CollectionPagination pagination)
Constructor.
|
BaseQueryRequestInfo(boolean isQueryRequest,
java.util.Map<java.lang.String,java.lang.String[]> predicates,
CollectionPagination pagination,
boolean isTranslateRequest)
Constructor.
|
BaseQueryRequestInfo(boolean isQueryRequest,
java.util.Map<java.lang.String,java.lang.String[]> predicates,
CollectionPagination pagination,
CollectionSortedOrder order)
Constructor.
|
BaseQueryRequestInfo(boolean isQueryRequest,
java.util.Map<java.lang.String,java.lang.String[]> predicates,
CollectionPagination pagination,
CollectionSortedOrder order,
java.util.List<java.lang.String> sortBy)
Constructor.
|
BaseQueryRequestInfo(SlingHttpServletRequest request)
Constructor which parses the info from the specified
SlingHttpServletRequest . |
BaseQueryRequestInfo(SlingHttpServletRequest request,
boolean isFilterQuery)
Constructor which parses the info from the specified
SlingHttpServletRequest . |
Modifier and Type | Method and Description |
---|---|
CollectionPagination |
getPagination()
Get the request paging specification
|
java.util.Map<java.lang.String,java.lang.String[]> |
getPredicates()
Get the query predicates.
|
java.lang.String |
getQueryString()
Gets the query params.
|
java.util.List<java.lang.String> |
getSortBy() |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> |
getSortFields()
Gets the sort fields.
|
CollectionSortedOrder |
getSortOrder() |
boolean |
isQuery()
Is the request a query request
|
boolean |
isSortRequest()
Is the request a sort request
|
boolean |
isTranslationRequest()
Is the request a translate request
|
void |
setPagination(CollectionPagination pagination)
Set the pagination
|
void |
setSortBy(java.util.List<java.lang.String> sortBy) |
void |
setSortFields(java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> sortFields)
Sets the sort fields.
|
void |
setSortOrder(CollectionSortedOrder order) |
void |
setSortRequest(boolean isSortRequest)
Sets the property that identifies if the QueryRequest is a sort request.
|
void |
setTranslationRequest(boolean isTranslationRequest)
Set the translation request
|
public static QueryRequestInfo DEFAULT_QUERY_REQUEST
public BaseQueryRequestInfo(SlingHttpServletRequest request)
SlingHttpServletRequest
.request
- the http servlet request.public BaseQueryRequestInfo(SlingHttpServletRequest request, boolean isFilterQuery)
SlingHttpServletRequest
.request
- the http servlet request.isFilterQuery
- true, if a query in the request is defined by the 'filter' parameter, false otherwisepublic BaseQueryRequestInfo(boolean isQueryRequest, java.util.Map<java.lang.String,java.lang.String[]> predicates, CollectionPagination pagination)
isQueryRequest
- booleanpredicates
- Mappagination
- CollectionPaginationpublic BaseQueryRequestInfo(boolean isQueryRequest, java.util.Map<java.lang.String,java.lang.String[]> predicates, CollectionPagination pagination, boolean isTranslateRequest)
isQueryRequest
- booleanpredicates
- Mappagination
- CollectionPaginationisTranslateRequest
- booleanpublic BaseQueryRequestInfo(boolean isQueryRequest, java.util.Map<java.lang.String,java.lang.String[]> predicates, CollectionPagination pagination, CollectionSortedOrder order)
isQueryRequest
- booleanpredicates
- Mappagination
- CollectionPaginationorder
- CollectionSortedOrderpublic BaseQueryRequestInfo(boolean isQueryRequest, java.util.Map<java.lang.String,java.lang.String[]> predicates, CollectionPagination pagination, CollectionSortedOrder order, java.util.List<java.lang.String> sortBy)
isQueryRequest
- booleanpredicates
- Mappagination
- CollectionPaginationorder
- CollectionSortedOrdersortBy
- Listpublic boolean isQuery()
QueryRequestInfo
isQuery
in interface QueryRequestInfo
public java.util.Map<java.lang.String,java.lang.String[]> getPredicates()
QueryRequestInfo
getPredicates
in interface QueryRequestInfo
public CollectionPagination getPagination()
QueryRequestInfo
getPagination
in interface QueryRequestInfo
public void setPagination(CollectionPagination pagination)
QueryRequestInfo
setPagination
in interface QueryRequestInfo
pagination
- the pagination setting.public void setSortBy(java.util.List<java.lang.String> sortBy)
setSortBy
in interface QueryRequestInfo
sortBy
- list of indexes to use to sort the list bypublic java.util.List<java.lang.String> getSortBy()
getSortBy
in interface QueryRequestInfo
public void setSortOrder(CollectionSortedOrder order)
setSortOrder
in interface QueryRequestInfo
order
- for the listpublic CollectionSortedOrder getSortOrder()
getSortOrder
in interface QueryRequestInfo
public boolean isTranslationRequest()
QueryRequestInfo
isTranslationRequest
in interface QueryRequestInfo
public void setTranslationRequest(boolean isTranslationRequest)
QueryRequestInfo
setTranslationRequest
in interface QueryRequestInfo
isTranslationRequest
- request valuepublic java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> getSortFields()
QueryRequestInfo
getSortFields
in interface QueryRequestInfo
public void setSortFields(java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> sortFields)
QueryRequestInfo
setSortFields
in interface QueryRequestInfo
sortFields
- the sort fieldspublic boolean isSortRequest()
QueryRequestInfo
isSortRequest
in interface QueryRequestInfo
public void setSortRequest(boolean isSortRequest)
QueryRequestInfo
setSortRequest
in interface QueryRequestInfo
isSortRequest
- the new sort requestpublic java.lang.String getQueryString()
QueryRequestInfo
getQueryString
in interface QueryRequestInfo
Copyright © 2010 - 2020 Adobe. All Rights Reserved