org.activiti.engine.impl
类 AbstractNativeQuery<T extends NativeQuery<?,?>,U>

java.lang.Object
  继承者 org.activiti.engine.impl.AbstractNativeQuery<T,U>
所有已实现的接口:
Serializable, Command<Object>, NativeQuery<T,U>
直接已知子类:
NativeDeploymentQueryImpl, NativeExecutionQueryImpl, NativeGroupQueryImpl, NativeHistoricActivityInstanceQueryImpl, NativeHistoricDetailQueryImpl, NativeHistoricProcessInstanceQueryImpl, NativeHistoricTaskInstanceQueryImpl, NativeHistoricVariableInstanceQueryImpl, NativeModelQueryImpl, NativeProcessDefinitionQueryImpl, NativeProcessInstanceQueryImpl, NativeTaskQueryImpl, NativeUserQueryImpl

public abstract class AbstractNativeQuery<T extends NativeQuery<?,?>,U>
extends Object
implements Command<Object>, NativeQuery<T,U>, Serializable

Abstract superclass for all native query types.

作者:
Bernd Ruecker (camunda)
另请参见:
序列化表格

字段摘要
protected  CommandContext commandContext
           
protected  CommandExecutor commandExecutor
           
protected  int firstResult
           
protected  int maxResults
           
protected  org.activiti.engine.impl.AbstractNativeQuery.ResultType resultType
           
 
构造方法摘要
  AbstractNativeQuery(CommandContext commandContext)
           
protected AbstractNativeQuery(CommandExecutor commandExecutor)
           
 
方法摘要
 long count()
          Executes the query and returns the number of results
 Object execute(CommandContext commandContext)
           
abstract  long executeCount(CommandContext commandContext, Map<String,Object> parameterMap)
           
abstract  List<U> executeList(CommandContext commandContext, Map<String,Object> parameterMap, int firstResult, int maxResults)
          Executes the actual query to retrieve the list of results.
 U executeSingleResult(CommandContext commandContext)
           
 Map<String,Object> getParameters()
           
 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 parameter(String name, Object value)
          Add parameter to be replaced in query for index, e.g.
 AbstractNativeQuery<T,U> setCommandExecutor(CommandExecutor commandExecutor)
           
 U singleResult()
          Executes the query and returns the resulting entity or null if no entity matches the query criteria.
 T sql(String sqlStatement)
          Hand in the SQL statement you want to execute.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

commandExecutor

protected transient CommandExecutor commandExecutor

commandContext

protected transient CommandContext commandContext

maxResults

protected int maxResults

firstResult

protected int firstResult

resultType

protected org.activiti.engine.impl.AbstractNativeQuery.ResultType resultType
构造方法详细信息

AbstractNativeQuery

protected AbstractNativeQuery(CommandExecutor commandExecutor)

AbstractNativeQuery

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

setCommandExecutor

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

sql

public T sql(String sqlStatement)
从接口 NativeQuery 复制的描述
Hand in the SQL statement you want to execute. BEWARE: if you need a count you have to hand in a count() statement yourself, otherwise the result will be treated as lost of Activiti entities. If you need paging you have to insert the pagination code yourself. We skipped doing this for you as this is done really different on some databases (especially MS-SQL / DB2)

指定者:
接口 NativeQuery<T extends NativeQuery<?,?>,U> 中的 sql

parameter

public T parameter(String name,
                   Object value)
从接口 NativeQuery 复制的描述
Add parameter to be replaced in query for index, e.g. :param1, :myParam, ...

指定者:
接口 NativeQuery<T extends NativeQuery<?,?>,U> 中的 parameter

singleResult

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

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

list

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

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

listPage

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

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

count

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

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

execute

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

executeCount

public abstract long executeCount(CommandContext commandContext,
                                  Map<String,Object> parameterMap)

executeList

public abstract List<U> executeList(CommandContext commandContext,
                                    Map<String,Object> parameterMap,
                                    int firstResult,
                                    int maxResults)
Executes the actual query to retrieve the list of results.

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

executeSingleResult

public U executeSingleResult(CommandContext commandContext)

getParameters

public Map<String,Object> getParameters()


Copyright © 2013 Alfresco. All rights reserved.