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:
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
    • objectMapper

      protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
    • baseUrl

      protected final String baseUrl
    • filtersMap

      protected Map<String,Filter> filtersMap
    • searchMap

      protected Map<String,Search> searchMap
    • lastCount

      protected Long 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)
      Specified by:
      executeCount in class org.flowable.common.engine.impl.query.AbstractQuery<T extends org.flowable.common.engine.api.query.Query<?,?>,U>
    • executeList

      public List<U> executeList(org.flowable.common.engine.impl.interceptor.CommandContext commandContext)
      Specified by:
      executeList in class org.flowable.common.engine.impl.query.AbstractQuery<T extends org.flowable.common.engine.api.query.Query<?,?>,U>
    • 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 FlowableException to throw or null if 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

      protected T withSearch(String searchKey, Search search)
    • withFilter

      protected T withFilter(String filterKey, Filter query)
    • 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

      protected abstract String getAccessToken()
    • createOrderByClauses

      protected List<String> createOrderByClauses()
    • prepareGraphQuery

      protected abstract AbstractGraphQuery.GraphQuery prepareGraphQuery()
    • getValueMapper

      protected abstract Function<com.fasterxml.jackson.databind.JsonNode,U> getValueMapper()
    • getId

      protected abstract String getId(U entity)
    • getSortProperty

      protected abstract String getSortProperty(String columnName)
    • getSortAttributes

      protected abstract Collection<String> getSortAttributes(String sortProperty)
    • getSupportedSortAttributes

      protected abstract Collection<String> getSupportedSortAttributes()
    • getSelectAttributes

      protected abstract Collection<String> getSelectAttributes()
    • getExpand

      protected abstract String getExpand()
    • getComplexQueryMaxResultsLimit

      protected abstract int getComplexQueryMaxResultsLimit()
    • getThis

      protected abstract T getThis()