Class StandardDataQueryBuilderImpl
java.lang.Object
com.flowable.indexing.query.builder.standard.StandardDataQueryBuilderImpl
- All Implemented Interfaces:
StandardDataQueryBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from interface com.flowable.indexing.query.builder.standard.StandardDataQueryBuilder
StandardDataQueryBuilder.AggregationList, StandardDataQueryBuilder.Filter, StandardDataQueryBuilder.FilterList
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<StandardDataQueryBuilder.FilterList>
protected boolean
protected Collection<String>
protected String
protected com.fasterxml.jackson.databind.ObjectMapper
protected List<StandardDataQueryBuilder.FilterList>
protected boolean
protected boolean
protected int
protected List<StandardDataQuerySortValue>
protected int
protected String
protected Collection<String>
-
Constructor Summary
ConstructorDescriptionStandardDataQueryBuilderImpl
(String index, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionDefine one or more aggregations for the results of this query.and()
Configures the root logical operator of the query to be AND.com.fasterxml.jackson.databind.node.ObjectNode
build()
Builds the query that is ready to be passed into Elasticsearch.protected void
buildAvgVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildCountActiveAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildCountByIdAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildCountCompletedAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildCountStartedAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildDistributionVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildGroupByDateCompletedAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildGroupByDateStartedAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildGroupByDefinitionKeyAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildGroupByDefinitionKeyAndStateAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildMaxVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildMinVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildSingleNumericVariableAggregation
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, String aggregationName, String aggregationOperator, String variableName) protected void
buildStddevVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected void
buildSumVariableValueAggregations
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected com.fasterxml.jackson.databind.node.ObjectNode
createFilteredVariableAggregation
(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, String aggregationName, String variableName) When results are returned, this will make sure only the fields in the passed list are returned.By default, when setting a size, the source won't be returned.protected String
protected String
getIndex()
protected String
groupIdentityLinks
(Collection<String> groupIds) If set, will limit the returned data to only return data that the users with given groups have access to.protected static boolean
hasFilters
(StandardDataQueryBuilder.FilterList filterList) protected static boolean
hasFilters
(StandardDataQueryBuilderImpl queryBuilder) protected boolean
or()
Configures the root logical operator of the query to be OR.pageSize
(int size) Queries built by this builder by default don't return any 'hits'.The query won't do any aggregations, even if they are configured.The query won't return any results, which is useful if only the aggregation is relevant.searchAfter
(List<Object> searchAfter) Use for alternative paging by providing from where the querying should start.sort
(List<StandardDataQuerySortValue> sortValues) Sorts the results given the field names and asc/desc in the provided parameter.start
(int start) When using paging, this sets the start number of the page.Sets the tenantId, which will limit what results are returned from the query.userIdentityLinks
(Collection<String> userIds) If set, will limit the returned data to only return data that the users with given ids have access to.When the results are returned, also these variables will be fetched.
-
Field Details
-
index
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper -
returnResults
protected boolean returnResults -
returnAggregations
protected boolean returnAggregations -
start
protected int start -
size
protected int size -
fields
-
variableNameAndTypes
-
tenantId
-
userIdentityLinks
-
groupIdentityLinks
-
forceSource
protected boolean forceSource -
andFilters
-
orFilters
-
sortValues
-
searchAfter
-
aggregationList
-
-
Constructor Details
-
StandardDataQueryBuilderImpl
public StandardDataQueryBuilderImpl(String index, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
returnResults
Description copied from interface:StandardDataQueryBuilder
The query won't return any results, which is useful if only the aggregation is relevant.- Specified by:
returnResults
in interfaceStandardDataQueryBuilder
-
returnNoAggregations
Description copied from interface:StandardDataQueryBuilder
The query won't do any aggregations, even if they are configured. This is useful when reusing a query for e.g. CSV export, where the agregation are irrelevant.- Specified by:
returnNoAggregations
in interfaceStandardDataQueryBuilder
-
forceSourceToBeReturned
Description copied from interface:StandardDataQueryBuilder
By default, when setting a size, the source won't be returned. If this method is called, this forces that the source is returned in the hits. It means no 'fields' will be returned though.- Specified by:
forceSourceToBeReturned
in interfaceStandardDataQueryBuilder
-
start
Description copied from interface:StandardDataQueryBuilder
When using paging, this sets the start number of the page.- Specified by:
start
in interfaceStandardDataQueryBuilder
-
pageSize
Queries built by this builder by default don't return any 'hits'. Hits, in context of Elasticsearch, are the full json documents of indexed data. If this method is called, the passed number of hits will be returned (if there are that many).- Specified by:
pageSize
in interfaceStandardDataQueryBuilder
-
fields
Description copied from interface:StandardDataQueryBuilder
When results are returned, this will make sure only the fields in the passed list are returned. By default, all fields are returned.- Specified by:
fields
in interfaceStandardDataQueryBuilder
-
variables
public StandardDataQueryBuilder variables(List<org.apache.commons.lang3.tuple.Pair<String, String>> variableNameAndTypes) Description copied from interface:StandardDataQueryBuilder
When the results are returned, also these variables will be fetched.- Specified by:
variables
in interfaceStandardDataQueryBuilder
-
tenantId
Description copied from interface:StandardDataQueryBuilder
Sets the tenantId, which will limit what results are returned from the query. If set, will add the tenantId as requirement and add an AND with any filter set on the root level of this query.- Specified by:
tenantId
in interfaceStandardDataQueryBuilder
-
userIdentityLinks
Description copied from interface:StandardDataQueryBuilder
If set, will limit the returned data to only return data that the users with given ids have access to. Flowable adds automatically the user identitylink for every type of user: assignee, owner, participant, watcher and candidate user to the index.- Specified by:
userIdentityLinks
in interfaceStandardDataQueryBuilder
-
groupIdentityLinks
Description copied from interface:StandardDataQueryBuilder
If set, will limit the returned data to only return data that the users with given groups have access to. Flowable adds automatically the group identitylink for every type of group: candidate group, watcher and participant group.- Specified by:
groupIdentityLinks
in interfaceStandardDataQueryBuilder
-
and
Description copied from interface:StandardDataQueryBuilder
Configures the root logical operator of the query to be AND.- Specified by:
and
in interfaceStandardDataQueryBuilder
-
or
Description copied from interface:StandardDataQueryBuilder
Configures the root logical operator of the query to be OR.- Specified by:
or
in interfaceStandardDataQueryBuilder
-
sort
Description copied from interface:StandardDataQueryBuilder
Sorts the results given the field names and asc/desc in the provided parameter.- Specified by:
sort
in interfaceStandardDataQueryBuilder
-
searchAfter
Description copied from interface:StandardDataQueryBuilder
Use for alternative paging by providing from where the querying should start.- Specified by:
searchAfter
in interfaceStandardDataQueryBuilder
-
aggregations
Description copied from interface:StandardDataQueryBuilder
Define one or more aggregations for the results of this query.- Specified by:
aggregations
in interfaceStandardDataQueryBuilder
-
getDefinitionKeyField
-
getDefinitionNameKeywordField
-
build
public com.fasterxml.jackson.databind.node.ObjectNode build()Builds the query that is ready to be passed into Elasticsearch.- Specified by:
build
in interfaceStandardDataQueryBuilder
-
buildCountByIdAggregations
protected void buildCountByIdAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildCountStartedAggregations
protected void buildCountStartedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildCountCompletedAggregations
protected void buildCountCompletedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildCountActiveAggregations
protected void buildCountActiveAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildGroupByDefinitionKeyAggregations
protected void buildGroupByDefinitionKeyAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildGroupByDefinitionKeyAndStateAggregations
protected void buildGroupByDefinitionKeyAndStateAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildGroupByDateStartedAggregations
protected void buildGroupByDateStartedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildGroupByDateCompletedAggregations
protected void buildGroupByDateCompletedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildMaxVariableValueAggregations
protected void buildMaxVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildMinVariableValueAggregations
protected void buildMinVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildAvgVariableValueAggregations
protected void buildAvgVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildStddevVariableValueAggregations
protected void buildStddevVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildSumVariableValueAggregations
protected void buildSumVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildDistributionVariableValueAggregations
protected void buildDistributionVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) -
buildSingleNumericVariableAggregation
-
createFilteredVariableAggregation
-
hasSafeQuerySettings
protected boolean hasSafeQuerySettings() -
getIndex
-
getAndFilters
-
getOrFilters
-
getStartTimeField
-
hasFilters
-
hasFilters
-