Class AbstractGraphQuery<T extends org.flowable.common.engine.api.query.Query<?,?>,U>
java.lang.Object
org.flowable.common.engine.impl.db.ListQueryParameterObject
org.flowable.common.engine.impl.query.AbstractQuery<T,U>
com.flowable.microsoft.graph.impl.AbstractGraphQuery<T,U>
- All Implemented Interfaces:
Serializable,org.flowable.common.engine.api.query.Query<T,,U> org.flowable.common.engine.impl.interceptor.Command<Object>
- Direct Known Subclasses:
GraphGroupQuery,GraphUserQuery
public abstract class AbstractGraphQuery<T extends org.flowable.common.engine.api.query.Query<?,?>,U>
extends org.flowable.common.engine.impl.query.AbstractQuery<T,U>
- Author:
- Roger Villars, Filip Hrisafov
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordprotected static final recordNested classes/interfaces inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
org.flowable.common.engine.impl.db.ListQueryParameterObject.OrderBy, org.flowable.common.engine.impl.db.ListQueryParameterObject.ResultTypeNested classes/interfaces inherited from interface org.flowable.common.engine.api.query.Query
org.flowable.common.engine.api.query.Query.NullHandlingOnOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected LongWe store the last count, since we can get the count when doing the list query.protected final org.slf4j.Loggerprotected final com.fasterxml.jackson.databind.ObjectMapperFields inherited from class org.flowable.common.engine.impl.query.AbstractQuery
commandContext, commandExecutorFields inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
databaseType, DEFAULT_ORDER_BY, defaultOrderBy, firstResult, ignoreOrderBy, maxResults, nullHandlingColumn, nullHandlingOnOrder, orderByCollection, orderProperty, parameter, resultType, SORTORDER_ASC, SORTORDER_DESC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGraphQuery(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String baseUrl) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToUriBuilder(AbstractGraphQuery.GraphQuery graphQuery, UriComponentsBuilder uriBuilder, Filter additionalFilter) protected longcountByPath(org.flowable.http.common.api.HttpRequest request, AbstractGraphQuery.GraphQueryPath queryPath, AbstractGraphQuery.GraphQuery graphQuery) protected <V> OrFiltercreateFilter(Collection<String> attributeNames, V value, BiFunction<String, V, Filter> filterCreator) protected org.flowable.http.common.api.HttpRequestprotected OrSearchcreateSearch(Collection<String> attributeNames, String value, BiFunction<String, String, Search> searchCreator) longexecuteCount(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) executeList(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) protected AbstractGraphQuery.QueryResult<U> executeRemoteQuery(org.flowable.http.common.api.HttpRequest request) protected abstract Stringprotected abstract intprotected abstract Stringprotected abstract org.flowable.http.common.api.client.FlowableHttpClientprotected abstract Stringprotected abstract Collection<String> protected abstract Collection<String> getSortAttributes(String sortProperty) protected abstract StringgetSortProperty(String columnName) protected abstract Collection<String> protected abstract TgetThis()protected org.flowable.common.engine.api.FlowableExceptionhandleInvalidStatusException(String action, org.flowable.http.common.api.HttpResponse response) Handle an invalid status code exception.protected abstract AbstractGraphQuery.GraphQueryprotected AbstractGraphQuery.QueryResult<U> queryByPath(org.flowable.http.common.api.HttpRequest request, AbstractGraphQuery.GraphQueryPath queryPath, AbstractGraphQuery.GraphQuery graphQuery, MultiValueMap<String, String> defaultQueryParams) protected com.fasterxml.jackson.databind.JsonNodereadResponseBodyAsJson(org.flowable.http.common.api.HttpResponse response) protected TwithFilter(String filterKey, Filter query) protected TwithSearch(String searchKey, Search search) Methods inherited from class org.flowable.common.engine.impl.query.AbstractQuery
asc, checkQueryOk, count, desc, direction, execute, executeSingleResult, getSafeList, list, listPage, orderBy, orderBy, setCommandExecutor, singleResultMethods inherited from class org.flowable.common.engine.impl.db.ListQueryParameterObject
addOrder, buildOrderBy, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getNullHandlingColumn, getOrderBy, getOrderByCollectionSafe, getOrderByForWindow, getOuterJoinOrderBy, getParameter, hasOrderBy, hasOrderByForColumn, isNeedsPaging, mapOrderByToSql, setDatabaseType, setFirstResult, setIgnoreOrderBy, setMaxResults, setNullHandlingColumn, setParameter
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
baseUrl
-
filtersMap
-
searchMap
-
lastCount
We store the last count, since we can get the count when doing the list query. Storing it allows us to avoid doing the count query twice.
-
-
Constructor Details
-
AbstractGraphQuery
protected AbstractGraphQuery(com.fasterxml.jackson.databind.ObjectMapper objectMapper, String baseUrl)
-
-
Method Details
-
executeCount
public long executeCount(org.flowable.common.engine.impl.interceptor.CommandContext commandContext) -
executeList
-
queryByPath
protected AbstractGraphQuery.QueryResult<U> queryByPath(org.flowable.http.common.api.HttpRequest request, AbstractGraphQuery.GraphQueryPath queryPath, AbstractGraphQuery.GraphQuery graphQuery, MultiValueMap<String, String> defaultQueryParams) -
executeRemoteQuery
protected AbstractGraphQuery.QueryResult<U> executeRemoteQuery(org.flowable.http.common.api.HttpRequest request) -
countByPath
protected long countByPath(org.flowable.http.common.api.HttpRequest request, AbstractGraphQuery.GraphQueryPath queryPath, AbstractGraphQuery.GraphQuery graphQuery) -
handleInvalidStatusException
protected org.flowable.common.engine.api.FlowableException handleInvalidStatusException(String action, org.flowable.http.common.api.HttpResponse response) Handle an invalid status code exception.- Returns:
- the
FlowableExceptionto throw ornullif the response actually means nothing was found.
-
readResponseBodyAsJson
protected com.fasterxml.jackson.databind.JsonNode readResponseBodyAsJson(org.flowable.http.common.api.HttpResponse response) -
addToUriBuilder
protected void addToUriBuilder(AbstractGraphQuery.GraphQuery graphQuery, UriComponentsBuilder uriBuilder, Filter additionalFilter) -
withSearch
-
withFilter
-
createFilter
protected <V> OrFilter createFilter(Collection<String> attributeNames, V value, BiFunction<String, V, Filter> filterCreator) -
createSearch
protected OrSearch createSearch(Collection<String> attributeNames, String value, BiFunction<String, String, Search> searchCreator) -
createHttpRequest
protected org.flowable.http.common.api.HttpRequest createHttpRequest() -
getFlowableHttpClient
protected abstract org.flowable.http.common.api.client.FlowableHttpClient getFlowableHttpClient() -
getAccessToken
-
createOrderByClauses
-
prepareGraphQuery
-
getValueMapper
-
getId
-
getSortProperty
-
getSortAttributes
-
getSupportedSortAttributes
-
getSelectAttributes
-
getExpand
-
getComplexQueryMaxResultsLimit
protected abstract int getComplexQueryMaxResultsLimit() -
getThis
-