org.activiti.engine.query
接口 Query<T extends Query<?,?>,U>

所有已知子接口:
DeploymentQuery, ExecutionQuery, GroupQuery, HistoricActivityInstanceQuery, HistoricDetailQuery, HistoricProcessInstanceQuery, HistoricTaskInstanceQuery, HistoricVariableInstanceQuery, JobQuery, ModelQuery, ProcessDefinitionQuery, ProcessInstanceQuery, TaskQuery, UserQuery
所有已知实现类:
AbstractQuery, AbstractVariableQueryImpl, DeploymentQueryImpl, EventSubscriptionQueryImpl, ExecutionQueryImpl, GroupQueryImpl, HistoricActivityInstanceQueryImpl, HistoricDetailQueryImpl, HistoricProcessInstanceQueryImpl, HistoricTaskInstanceQueryImpl, HistoricVariableInstanceQueryImpl, JobQueryImpl, ModelQueryImpl, ProcessDefinitionQueryImpl, ProcessInstanceQueryImpl, TaskQueryImpl, UserQueryImpl

public interface Query<T extends Query<?,?>,U>

Describes basic methods for querying.

作者:
Frederik Heremans

方法摘要
 T asc()
          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).
 long count()
          Executes the query and returns the number of results
 T desc()
          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).
 List<U> list()
          Executes the query and get a list of entities as the result.
 List<U> listPage(int firstResult, int maxResults)
          Executes the query and get a list of entities as the result.
 U singleResult()
          Executes the query and returns the resulting entity or null if no entity matches the query criteria.
 

方法详细信息

asc

T asc()
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).


desc

T desc()
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).


count

long count()
Executes the query and returns the number of results


singleResult

U singleResult()
Executes the query and returns the resulting entity or null if no entity matches the query criteria.

抛出:
ActivitiException - when the query results in more than one entities.

list

List<U> list()
Executes the query and get a list of entities as the result.


listPage

List<U> listPage(int firstResult,
                 int maxResults)
Executes the query and get a list of entities as the result.



Copyright © 2013 Alfresco. All rights reserved.