Class AbstractNativeQuery<T extends NativeQuery<?,?>,U>
java.lang.Object
org.flowable.common.engine.impl.query.BaseNativeQuery<T,U>
org.flowable.common.engine.impl.query.AbstractNativeQuery<T,U>
- All Implemented Interfaces:
Serializable,NativeQuery<T,,U> Command<Object>
- Direct Known Subclasses:
NativeActivityInstanceQueryImpl,NativeDecisionTableQueryImpl,NativeDeploymentQueryImpl,NativeDmnDeploymentQueryImpl,NativeExecutionQueryImpl,NativeGroupQueryImpl,NativeHistoricActivityInstanceQueryImpl,NativeHistoricDetailQueryImpl,NativeHistoricProcessInstanceQueryImpl,NativeHistoricTaskInstanceQueryImpl,NativeHistoricTaskLogEntryQueryImpl,NativeHistoricVariableInstanceQueryImpl,NativeHistoryDecisionExecutionQueryImpl,NativeModelQueryImpl,NativeProcessDefinitionQueryImpl,NativeProcessInstanceQueryImpl,NativeTaskQueryImpl,NativeTokenQueryImpl,NativeUserQueryImpl,NativeVariableInstanceQueryImpl
public abstract class AbstractNativeQuery<T extends NativeQuery<?,?>,U>
extends BaseNativeQuery<T,U>
implements Command<Object>
Abstract superclass for all native query types.
- Author:
- Bernd Ruecker (camunda)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.flowable.common.engine.impl.query.BaseNativeQuery
BaseNativeQuery.ResultType -
Field Summary
FieldsFields inherited from class org.flowable.common.engine.impl.query.BaseNativeQuery
firstResult, maxResults, parameters, resultType, sqlStatement -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractNativeQuery(CommandContext commandContext) protectedAbstractNativeQuery(CommandExecutor commandExecutor) -
Method Summary
Modifier 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) 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 org.flowable.common.engine.impl.query.BaseNativeQuery
generateParameterMap, getParameters
-
Field Details
-
commandExecutor
-
commandContext
-
-
Constructor Details
-
AbstractNativeQuery
-
AbstractNativeQuery
-
-
Method Details
-
setCommandExecutor
-
sql
Description 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 Flowable 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 interfaceNativeQuery<T extends NativeQuery<?,?>, U> - Overrides:
sqlin classBaseNativeQuery<T extends NativeQuery<?,?>, U>
-
parameter
Description copied from interface:NativeQueryAdd parameter to be replaced in query for index, e.g. :param1, :myParam, ...- Specified by:
parameterin interfaceNativeQuery<T extends NativeQuery<?,?>, U> - Overrides:
parameterin classBaseNativeQuery<T extends NativeQuery<?,?>, U>
-
singleResult
Description copied from interface:NativeQueryExecutes the query and returns the resulting entity or null if no entity matches the query criteria.- Specified by:
singleResultin interfaceNativeQuery<T extends NativeQuery<?,?>, U>
-
list
Description copied from interface:NativeQueryExecutes the query and get a list of entities as the result.- Specified by:
listin interfaceNativeQuery<T extends NativeQuery<?,?>, U>
-
listPage
Description copied from interface:NativeQueryExecutes the query and get a list of entities as the result.- Specified by:
listPagein interfaceNativeQuery<T extends NativeQuery<?,?>, U>
-
count
public long count()Description copied from interface:NativeQueryExecutes the query and returns the number of results- Specified by:
countin interfaceNativeQuery<T extends NativeQuery<?,?>, U>
-
execute
- Specified by:
executein interfaceCommand<T extends NativeQuery<?,?>>
-
executeCount
-
executeList
Executes the actual query to retrieve the list of results.- Parameters:
commandContext-parameterMap-
-
executeSingleResult
-