Class StandardDataQueryBuilderImpl
java.lang.Object
com.flowable.indexing.query.builder.standard.StandardDataQueryBuilderImpl
- All Implemented Interfaces:
StandardDataQueryBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classNested classes/interfaces inherited from interface com.flowable.indexing.query.builder.standard.StandardDataQueryBuilder
StandardDataQueryBuilder.AggregationList, StandardDataQueryBuilder.Filter, StandardDataQueryBuilder.FilterList -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<StandardDataQueryBuilder.FilterList>protected static intprotected booleanprotected Collection<String>protected Stringprotected com.fasterxml.jackson.databind.ObjectMapperprotected List<StandardDataQueryBuilder.FilterList>protected booleanprotected booleanprotected intprotected List<StandardDataQuerySortValue>protected intprotected Stringprotected Collection<String> -
Constructor Summary
ConstructorsConstructorDescriptionStandardDataQueryBuilderImpl(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.ObjectNodebuild()Builds the query that is ready to be passed into Elasticsearch.protected voidbuildAvgVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildCountActiveAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildCountByIdAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildCountCompletedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildCountStartedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildDistributionVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildGroupByDateCompletedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildGroupByDateStartedAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildGroupByDefinitionKeyAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildGroupByDefinitionKeyAndStateAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildMaxVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildMinVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildSingleNumericVariableAggregation(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, String aggregationName, String aggregationOperator, String variableName) protected voidbuildStddevVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected voidbuildSumVariableValueAggregations(com.fasterxml.jackson.databind.node.ObjectNode aggsNode, StandardDataQueryBuilderImpl.AggregationListImpl aggregationList) protected com.fasterxml.jackson.databind.node.ObjectNodecreateFilteredVariableAggregation(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 Stringprotected StringgetIndex()protected StringgroupIdentityLinks(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 booleanhasFilters(StandardDataQueryBuilder.FilterList filterList) protected static booleanhasFilters(StandardDataQueryBuilderImpl queryBuilder) protected booleanprotected booleanprotected booleanprotected booleanprotected booleanor()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 -
DEFAULT_SIZE
protected static int DEFAULT_SIZE -
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:StandardDataQueryBuilderThe query won't return any results, which is useful if only the aggregation is relevant.- Specified by:
returnResultsin interfaceStandardDataQueryBuilder
-
returnNoAggregations
Description copied from interface:StandardDataQueryBuilderThe 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:
returnNoAggregationsin interfaceStandardDataQueryBuilder
-
forceSourceToBeReturned
Description copied from interface:StandardDataQueryBuilderBy 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:
forceSourceToBeReturnedin interfaceStandardDataQueryBuilder
-
start
Description copied from interface:StandardDataQueryBuilderWhen using paging, this sets the start number of the page.- Specified by:
startin 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:
pageSizein interfaceStandardDataQueryBuilder
-
fields
Description copied from interface:StandardDataQueryBuilderWhen results are returned, this will make sure only the fields in the passed list are returned. By default, all fields are returned.- Specified by:
fieldsin interfaceStandardDataQueryBuilder
-
variables
public StandardDataQueryBuilder variables(List<org.apache.commons.lang3.tuple.Pair<String, String>> variableNameAndTypes) Description copied from interface:StandardDataQueryBuilderWhen the results are returned, also these variables will be fetched.- Specified by:
variablesin interfaceStandardDataQueryBuilder
-
tenantId
Description copied from interface:StandardDataQueryBuilderSets 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:
tenantIdin interfaceStandardDataQueryBuilder
-
userIdentityLinks
Description copied from interface:StandardDataQueryBuilderIf 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:
userIdentityLinksin interfaceStandardDataQueryBuilder
-
groupIdentityLinks
Description copied from interface:StandardDataQueryBuilderIf 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:
groupIdentityLinksin interfaceStandardDataQueryBuilder
-
and
Description copied from interface:StandardDataQueryBuilderConfigures the root logical operator of the query to be AND.- Specified by:
andin interfaceStandardDataQueryBuilder
-
or
Description copied from interface:StandardDataQueryBuilderConfigures the root logical operator of the query to be OR.- Specified by:
orin interfaceStandardDataQueryBuilder
-
sort
Description copied from interface:StandardDataQueryBuilderSorts the results given the field names and asc/desc in the provided parameter.- Specified by:
sortin interfaceStandardDataQueryBuilder
-
searchAfter
Description copied from interface:StandardDataQueryBuilderUse for alternative paging by providing from where the querying should start.- Specified by:
searchAfterin interfaceStandardDataQueryBuilder
-
aggregations
Description copied from interface:StandardDataQueryBuilderDefine one or more aggregations for the results of this query.- Specified by:
aggregationsin 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:
buildin 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
-
isTaskQuery
protected boolean isTaskQuery() -
isWorkQuery
protected boolean isWorkQuery() -
isProcessInstanceQuery
protected boolean isProcessInstanceQuery() -
isCaseInstanceQuery
protected boolean isCaseInstanceQuery()
-