Class AbstractQuery<T extends Query<?,?>,U>

java.lang.Object
org.flowable.common.engine.impl.db.ListQueryParameterObject
org.flowable.common.engine.impl.query.AbstractQuery<T,U>
All Implemented Interfaces:
Serializable, Query<T,U>, Command<Object>
Direct Known Subclasses:
AbstractVariableQueryImpl, ActivityInstanceQueryImpl, BatchPartQueryImpl, BatchQueryImpl, CaseDefinitionQueryImpl, ChannelDefinitionQueryImpl, CmmnDeploymentQueryImpl, DeadLetterJobQueryImpl, DecisionQueryImpl, DeploymentQueryImpl, DmnDeploymentQueryImpl, EventDefinitionQueryImpl, EventDeploymentQueryImpl, EventSubscriptionQueryImpl, ExternalWorkerJobQueryImpl, GroupQueryImpl, HistoricActivityInstanceQueryImpl, HistoricDecisionExecutionQueryImpl, HistoricDetailQueryImpl, HistoricMilestoneInstanceQueryImpl, HistoricPlanItemInstanceQueryImpl, HistoricTaskLogEntryQueryImpl, HistoricVariableInstanceQueryImpl, HistoryJobQueryImpl, JobQueryImpl, MilestoneInstanceQueryImpl, ModelQueryImpl, PrivilegeQueryImpl, ProcessDefinitionQueryImpl, SuspendedJobQueryImpl, TimerJobQueryImpl, TokenQueryImpl, UserQueryImpl, VariableInstanceQueryImpl

public abstract class AbstractQuery<T extends Query<?,?>,U> extends ListQueryParameterObject implements Command<Object>, Query<T,U>, Serializable
Abstract superclass for all query types.
Author:
Joram Barrez
See Also:
  • Field Details

  • Constructor Details

    • AbstractQuery

      protected AbstractQuery()
    • AbstractQuery

      protected AbstractQuery(CommandExecutor commandExecutor)
    • AbstractQuery

      public AbstractQuery(CommandContext commandContext)
  • Method Details

    • setCommandExecutor

      public AbstractQuery<T,U> setCommandExecutor(CommandExecutor commandExecutor)
    • orderBy

      public T orderBy(QueryProperty property)
      Specified by:
      orderBy in interface Query<T extends Query<?,?>,U>
    • orderBy

      public T orderBy(QueryProperty property, Query.NullHandlingOnOrder nullHandlingOnOrder)
      Specified by:
      orderBy in interface Query<T extends Query<?,?>,U>
    • asc

      public T asc()
      Description copied from interface: Query
      Order the results ascending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      Specified by:
      asc in interface Query<T extends Query<?,?>,U>
    • desc

      public T desc()
      Description copied from interface: Query
      Order the results descending on the given property as defined in this class (needs to come after a call to one of the orderByXxxx methods).
      Specified by:
      desc in interface Query<T extends Query<?,?>,U>
    • direction

      public T direction(Direction direction)
    • checkQueryOk

      protected void checkQueryOk()
    • singleResult

      public U singleResult()
      Description copied from interface: Query
      Executes the query and returns the resulting entity or null if no entity matches the query criteria.
      Specified by:
      singleResult in interface Query<T extends Query<?,?>,U>
    • list

      public List<U> list()
      Description copied from interface: Query
      Executes the query and get a list of entities as the result.
      Specified by:
      list in interface Query<T extends Query<?,?>,U>
    • listPage

      public List<U> listPage(int firstResult, int maxResults)
      Description copied from interface: Query
      Executes the query and get a list of entities as the result.
      Specified by:
      listPage in interface Query<T extends Query<?,?>,U>
    • count

      public long count()
      Description copied from interface: Query
      Executes the query and returns the number of results
      Specified by:
      count in interface Query<T extends Query<?,?>,U>
    • execute

      public Object execute(CommandContext commandContext)
      Specified by:
      execute in interface Command<T extends Query<?,?>>
    • executeCount

      public abstract long executeCount(CommandContext commandContext)
    • executeList

      public abstract List<U> executeList(CommandContext commandContext)
      Executes the actual query to retrieve the list of results.
    • executeSingleResult

      public U executeSingleResult(CommandContext commandContext)