Class PlatformIndexQueryBuilder<REQ extends PlatformIndexQueryRequest>
- java.lang.Object
-
- com.flowable.platform.service.index.PlatformIndexQueryBuilder<REQ>
-
- Direct Known Subclasses:
CaseInstancesIndexQueryBuilder,ProcessInstancesIndexQueryBuilder,TasksIndexQueryBuilder,WorkInstancesIndexQueryBuilder
public abstract class PlatformIndexQueryBuilder<REQ extends PlatformIndexQueryRequest> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected com.fasterxml.jackson.databind.node.ObjectNodecustomQueryprotected Map<String,SortParameter>customSortParametersprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected Stringorderprotected Stringsort
-
Constructor Summary
Constructors Constructor Description PlatformIndexQueryBuilder(com.fasterxml.jackson.databind.ObjectMapper objectMapper)PlatformIndexQueryBuilder(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode customQuery, Map<String,SortParameter> customSortParameters)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Stringbuild(REQ request)protected StringdetermineOrder(PaginateRequest request)protected StringdetermineSort(PaginateRequest request, String defaultSort)com.fasterxml.jackson.databind.node.ObjectNodegetCustomQuery()Map<String,SortParameter>getCustomSortParameters()protected StringgetIndexSortName(String sort)Method that custom query builder can override to provide an alternative sort name for a particular sort.StringgetOrder()protected FilteredFullTextSearchQueryBuildergetQueryBuilder(REQ request, String defaultSort)StringgetSort()protected StringparameterTypeToIndexedProperty(SortParameter sortParameter)protected voidprocessSorting(PlatformIndexQueryRequest request, String defaultSort, FilteredFullTextSearchQueryBuilder queryBuilder)voidsetCustomQuery(com.fasterxml.jackson.databind.node.ObjectNode customQuery)voidsetCustomSortParameters(Map<String,SortParameter> customSortParameters)
-
-
-
Field Detail
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
customQuery
protected com.fasterxml.jackson.databind.node.ObjectNode customQuery
-
sort
protected String sort
-
customSortParameters
protected Map<String,SortParameter> customSortParameters
-
order
protected String order
-
-
Constructor Detail
-
PlatformIndexQueryBuilder
public PlatformIndexQueryBuilder(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
PlatformIndexQueryBuilder
public PlatformIndexQueryBuilder(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.fasterxml.jackson.databind.node.ObjectNode customQuery, Map<String,SortParameter> customSortParameters)
-
-
Method Detail
-
getQueryBuilder
protected FilteredFullTextSearchQueryBuilder getQueryBuilder(REQ request, String defaultSort)
-
processSorting
protected void processSorting(PlatformIndexQueryRequest request, String defaultSort, FilteredFullTextSearchQueryBuilder queryBuilder)
-
getIndexSortName
protected String getIndexSortName(String sort)
Method that custom query builder can override to provide an alternative sort name for a particular sort. For example when sorting by name the sort should be done by nameKeyword instead.- Parameters:
sort- the requested sort- Returns:
- the sort that should be used
-
determineSort
protected String determineSort(PaginateRequest request, String defaultSort)
-
determineOrder
protected String determineOrder(PaginateRequest request)
-
getOrder
public String getOrder()
-
getSort
public String getSort()
-
parameterTypeToIndexedProperty
protected String parameterTypeToIndexedProperty(SortParameter sortParameter)
-
getCustomQuery
public com.fasterxml.jackson.databind.node.ObjectNode getCustomQuery()
-
setCustomQuery
public void setCustomQuery(com.fasterxml.jackson.databind.node.ObjectNode customQuery)
-
getCustomSortParameters
public Map<String,SortParameter> getCustomSortParameters()
-
setCustomSortParameters
public void setCustomSortParameters(Map<String,SortParameter> customSortParameters)
-
-