Package org.camunda.bpm.engine.impl
Class AbstractNativeQuery<T extends NativeQuery<?,?>,U>  
java.lang.Object
org.camunda.bpm.engine.impl.AbstractNativeQuery<T,U> 
- All Implemented Interfaces:
- Serializable,- Command<Object>,- NativeQuery<T,- U> 
- Direct Known Subclasses:
- NativeExecutionQueryImpl,- NativeHistoricActivityInstanceQueryImpl,- NativeHistoricCaseActivityInstanceQueryImpl,- NativeHistoricCaseInstanceQueryImpl,- NativeHistoricProcessInstanceQueryImpl,- NativeHistoricTaskInstanceQueryImpl,- NativeHistoricVariableInstanceQueryImpl,- NativeHistoryDecisionInstanceQueryImpl,- 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.
- Author:
- Bernd Ruecker (camunda)
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected CommandContextprotected CommandExecutorprotected intprotected intprotected org.camunda.bpm.engine.impl.AbstractNativeQuery.ResultType
- 
Constructor SummaryConstructorsModifierConstructorDescriptionAbstractNativeQuery(CommandContext commandContext) protectedAbstractNativeQuery(CommandExecutor commandExecutor) 
- 
Method SummaryModifier and TypeMethodDescriptionlongcount()Executes the query and returns the number of resultsexecute(CommandContext commandContext) abstract longexecuteCount(CommandContext commandContext, Map<String, Object> parameterMap) executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) Executes the actual query to retrieve the list of results.executeSingleResult(CommandContext commandContext) list()Executes the query and get a list of entities as the result.listPage(int firstResult, int maxResults) Executes the query and get a list of entities as the result.Add parameter to be replaced in query for index, e.g.setCommandExecutor(CommandExecutor commandExecutor) Executes the query and returns the resulting entity or null if no entity matches the query criteria.Hand in the SQL statement you want to execute.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.impl.interceptor.CommandisRetryable
- 
Field Details- 
commandExecutor
- 
commandContext
- 
maxResultsprotected int maxResults
- 
firstResultprotected int firstResult
- 
resultTypeprotected org.camunda.bpm.engine.impl.AbstractNativeQuery.ResultType resultType
 
- 
- 
Constructor Details- 
AbstractNativeQuery
- 
AbstractNativeQuery
 
- 
- 
Method Details- 
setCommandExecutor
- 
sqlDescription copied from interface:NativeQueryHand 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)- Specified by:
- sqlin interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
parameterDescription copied from interface:NativeQueryAdd parameter to be replaced in query for index, e.g. :param1, :myParam, ...- Specified by:
- parameterin interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
singleResultDescription copied from interface:NativeQueryExecutes the query and returns the resulting entity or null if no entity matches the query criteria.- Specified by:
- singleResultin interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
listDescription copied from interface:NativeQueryExecutes the query and get a list of entities as the result.- Specified by:
- listin interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
listPageDescription copied from interface:NativeQueryExecutes the query and get a list of entities as the result.- Specified by:
- listPagein interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
countpublic long count()Description copied from interface:NativeQueryExecutes the query and returns the number of results- Specified by:
- countin interface- NativeQuery<T extends NativeQuery<?,- ?>, - U> 
 
- 
execute- Specified by:
- executein interface- Command<T extends NativeQuery<?,- ?>> 
 
- 
executeCount
- 
executeListpublic abstract List<U> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) Executes the actual query to retrieve the list of results.- Parameters:
- maxResults-
- firstResult-
- page- used if the results must be paged. If null, no paging will be applied.
 
- 
executeSingleResult
- 
getParameters
 
-