org.activiti.engine.impl
类 AbstractQuery<T extends Query<?,?>,U>

java.lang.Object
  继承者 org.activiti.engine.impl.db.ListQueryParameterObject
      继承者 org.activiti.engine.impl.AbstractQuery<T,U>
所有已实现的接口:
Serializable, Command<Object>, Query<T,U>
直接已知子类:
AbstractVariableQueryImpl, DeploymentQueryImpl, EventSubscriptionQueryImpl, GroupQueryImpl, HistoricActivityInstanceQueryImpl, HistoricDetailQueryImpl, HistoricVariableInstanceQueryImpl, JobQueryImpl, ModelQueryImpl, ProcessDefinitionQueryImpl, UserQueryImpl

public abstract class AbstractQuery<T extends Query<?,?>,U>
extends ListQueryParameterObject
implements Command<Object>, Query<T,U>, Serializable

Abstract superclass for all query types.

作者:
Joram Barrez
另请参见:
序列化表格

字段摘要
protected  CommandContext commandContext
           
protected  CommandExecutor commandExecutor
           
protected  String orderBy
           
protected  QueryProperty orderProperty
           
protected  org.activiti.engine.impl.AbstractQuery.ResultType resultType
           
static String SORTORDER_ASC
           
static String SORTORDER_DESC
           
 
从类 org.activiti.engine.impl.db.ListQueryParameterObject 继承的字段
databaseType, firstResult, maxResults, parameter
 
构造方法摘要
protected AbstractQuery()
           
  AbstractQuery(CommandContext commandContext)
           
protected AbstractQuery(CommandExecutor commandExecutor)
           
 
方法摘要
protected  void addOrder(String column, String sortOrder)
           
 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).
protected  void checkQueryOk()
           
 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).
 T direction(Direction direction)
           
 Object execute(CommandContext commandContext)
           
abstract  long executeCount(CommandContext commandContext)
           
abstract  List<U> executeList(CommandContext commandContext, Page page)
          Executes the actual query to retrieve the list of results.
 U executeSingleResult(CommandContext commandContext)
           
 String getOrderBy()
           
 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.
 T orderBy(QueryProperty property)
           
 AbstractQuery<T,U> setCommandExecutor(CommandExecutor commandExecutor)
           
 U singleResult()
          Executes the query and returns the resulting entity or null if no entity matches the query criteria.
 
从类 org.activiti.engine.impl.db.ListQueryParameterObject 继承的方法
getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getParameter, setDatabaseType, setFirstResult, setMaxResults, setParameter
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

SORTORDER_ASC

public static final String SORTORDER_ASC
另请参见:
常量字段值

SORTORDER_DESC

public static final String SORTORDER_DESC
另请参见:
常量字段值

commandExecutor

protected transient CommandExecutor commandExecutor

commandContext

protected transient CommandContext commandContext

orderBy

protected String orderBy

resultType

protected org.activiti.engine.impl.AbstractQuery.ResultType resultType

orderProperty

protected QueryProperty orderProperty
构造方法详细信息

AbstractQuery

protected AbstractQuery()

AbstractQuery

protected AbstractQuery(CommandExecutor commandExecutor)

AbstractQuery

public AbstractQuery(CommandContext commandContext)
方法详细信息

setCommandExecutor

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

orderBy

public T orderBy(QueryProperty property)

asc

public T asc()
从接口 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).

指定者:
接口 Query<T extends Query<?,?>,U> 中的 asc

desc

public T desc()
从接口 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).

指定者:
接口 Query<T extends Query<?,?>,U> 中的 desc

direction

public T direction(Direction direction)

checkQueryOk

protected void checkQueryOk()

singleResult

public U singleResult()
从接口 Query 复制的描述
Executes the query and returns the resulting entity or null if no entity matches the query criteria.

指定者:
接口 Query<T extends Query<?,?>,U> 中的 singleResult

list

public List<U> list()
从接口 Query 复制的描述
Executes the query and get a list of entities as the result.

指定者:
接口 Query<T extends Query<?,?>,U> 中的 list

listPage

public List<U> listPage(int firstResult,
                        int maxResults)
从接口 Query 复制的描述
Executes the query and get a list of entities as the result.

指定者:
接口 Query<T extends Query<?,?>,U> 中的 listPage

count

public long count()
从接口 Query 复制的描述
Executes the query and returns the number of results

指定者:
接口 Query<T extends Query<?,?>,U> 中的 count

execute

public Object execute(CommandContext commandContext)
指定者:
接口 Command<Object> 中的 execute

executeCount

public abstract long executeCount(CommandContext commandContext)

executeList

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

参数:
page - used if the results must be paged. If null, no paging will be applied.

executeSingleResult

public U executeSingleResult(CommandContext commandContext)

addOrder

protected void addOrder(String column,
                        String sortOrder)

getOrderBy

public String getOrderBy()
覆盖:
ListQueryParameterObject 中的 getOrderBy


Copyright © 2013 Alfresco. All rights reserved.