Package org.camunda.bpm.engine.query
Interface NativeQuery<T extends NativeQuery<?,?>,U>
- All Known Subinterfaces:
NativeExecutionQuery
,NativeHistoricActivityInstanceQuery
,NativeHistoricCaseActivityInstanceQuery
,NativeHistoricCaseInstanceQuery
,NativeHistoricDecisionInstanceQuery
,NativeHistoricProcessInstanceQuery
,NativeHistoricTaskInstanceQuery
,NativeHistoricVariableInstanceQuery
,NativeProcessInstanceQuery
,NativeTaskQuery
,NativeUserQuery
- All Known Implementing Classes:
AbstractNativeQuery
,NativeExecutionQueryImpl
,NativeHistoricActivityInstanceQueryImpl
,NativeHistoricCaseActivityInstanceQueryImpl
,NativeHistoricCaseInstanceQueryImpl
,NativeHistoricProcessInstanceQueryImpl
,NativeHistoricTaskInstanceQueryImpl
,NativeHistoricVariableInstanceQueryImpl
,NativeHistoryDecisionInstanceQueryImpl
,NativeProcessInstanceQueryImpl
,NativeTaskQueryImpl
,NativeUserQueryImpl
public interface NativeQuery<T extends NativeQuery<?,?>,U>
Describes basic methods for doing native queries
- Author:
- Bernd Ruecker (camunda)
-
Method Summary
Modifier and TypeMethodDescriptionlong
count()
Executes the query and returns the number of resultslist()
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.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.
-
Method Details
-
sql
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) -
parameter
Add parameter to be replaced in query for index, e.g. :param1, :myParam, ... -
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.- Throws:
ProcessEngineException
- when the query results in more than one entities.
-
list
Executes the query and get a list of entities as the result. -
listPage
Executes the query and get a list of entities as the result.
-