|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DatabaseQueryAction
Executes an SQL query in the engine's database and makes the resulting JDBC result set available to flow chart actions.
When this action runs, it returns a facade over a JDBC result set. The facade exposes the first row of data returned by the SQL query. Each time the current execution flow context reaches this action again, the next row in the JDBC result set is fetched. Finally, when the JDBC result set is exhausted, the result set is closed. The result set is also closed when the current execution flow context reaches a transaction break, since JDBC result sets must be closed before the open transaction commets. Once the JDBC result set is closed, the next time the current execution flow context executes this action, the SQL query is issued again, and the entire process repeats. Open JDBC result sets are stored in a transient flow context variable whose name is referenced from SqlSelectAction.RESULT_SET_FLOW_CONTEXT_KEY. The Database Query Action returns its result in the flow context variable "RESULT". The following table contains more information on accessing and using the result.Flow Context Variable | Field | Java Type | Description |
---|---|---|---|
RESULT | result | boolean | A boolean value indicating whether there are more results available in the underlying JDBC result set. |
RESULT | row | java.util.List<java.lang.Object> | A List representing the current row in the result set. |
Nested Class Summary | |
---|---|
static class |
DatabaseQueryAction.DatabaseQueryActionResult
A facade over a JDBC result set that is returned after this action runs. |
Field Summary | |
---|---|
static java.lang.String |
RESULT_SET_FLOW_CONTEXT_KEY
The key to a flow context variable that may hold an open JDBC result set from a previous iteration over this action within the same transaction. |
Method Summary | |
---|---|
Flow |
addFlow(Action action)
The flow that is followed when this Database Query Action fires with unconsumed result set data from the stored procedure call. |
java.util.List<java.lang.Object> |
getParameters()
Returns the parameters for the SQL query to be executed. |
java.lang.String |
getQuery()
Returns the SQL query that is used to query a database. |
void |
setParameters(java.util.List<java.lang.Object> parameters)
Sets the parameters for the SQL query to be executed. |
void |
setQuery(java.lang.String query)
Sets the SQL query that is used to query a database. |
Methods inherited from interface flux.runtimedatamap.RuntimeDataMap |
---|
getRuntimeDataMap, setRuntimeDataMap |
Field Detail |
---|
static final java.lang.String RESULT_SET_FLOW_CONTEXT_KEY
Method Detail |
---|
Flow addFlow(Action action)
addFlow
in interface Action
action
- The flow that is followed when this Database Query Action
fires.
Action.addFlow(Action, String)
,
EngineHelper.useLastResult(String)
java.util.List<java.lang.Object> getParameters()
java.lang.String getQuery()
void setParameters(java.util.List<java.lang.Object> parameters)
parameters
- The parameters for the SQL query to be executed.void setQuery(java.lang.String query)
query
- The query that is used to query a database.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |