ParameterizedSQLBatchWritingMechanism is a private class, used by the DatabaseAccessor. it provides the required behavior for batching statements, for write, with parameter binding turned on.
| Modifier and Type | Field and Description |
|---|---|
| protected DatabaseCall | |
| protected List | parameters
This variable contains a list of the parameters list passed into the query |
| protected DatabaseCall | previousCall
This member variable is used to keep track of the last SQL string that was executed by this mechanism. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | appendCall(AbstractSession session, DatabaseCall dbCall)
Implements abstract org. |
| public void | clear()
Implements abstract org. |
| private void | executeBatch(AbstractSession session)
INTERNAL: This method is added to execute and clear the batched statements on the cloned batch mechanism which is created in executeBatchedStatements(session). |
| public void | executeBatchedStatements(AbstractSession session)
Implements abstract org. |
| public DatabaseCall | |
| public List | |
| public DatabaseCall | |
| protected PreparedStatement | prepareBatchStatements(AbstractSession session)
INTERNAL: This method is used to build the parameterized batch statement for the JDBC2.0 specification |
| public void | |
| public void | |
| public void | |
| protected void | switchMechanisms(AbstractSession session, DatabaseCall dbCall)
INTERNAL: Swaps out the Mechanism for the other Mechanism |
| lastCallAppended | back to summary |
|---|---|
| protected DatabaseCall lastCallAppended | |
| parameters | back to summary |
|---|---|
| protected List<List<E>> parameters This variable contains a list of the parameters list passed into the query | |
| previousCall | back to summary |
|---|---|
| protected DatabaseCall previousCall This member variable is used to keep track of the last SQL string that was executed by this mechanism. If the current string and previous string match then simply bind in the arguments, otherwise end previous batch and start a new batch | |
| ParameterizedSQLBatchWritingMechanism | back to summary |
|---|---|
| public ParameterizedSQLBatchWritingMechanism() | |
| ParameterizedSQLBatchWritingMechanism | back to summary |
|---|---|
| public ParameterizedSQLBatchWritingMechanism(DatabaseAccessor databaseAccessor) | |
| appendCall | back to summary |
|---|---|
| public void appendCall(AbstractSession session, DatabaseCall dbCall) Implements abstract org. INTERNAL: This method is called by the DatabaseAccessor to add this statement to the list of statements being batched. This call may result in the Mechanism executing the batched statements and possibly, switching out the mechanisms
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. INTERNAL: This method is used to clear the batched statements without the need to execute the statements first This is used in the case of rollback.
| |
| executeBatch | back to summary |
|---|---|
| private void executeBatch(AbstractSession session) INTERNAL: This method is added to execute and clear the batched statements on the cloned batch mechanism which is created in executeBatchedStatements(session). Introduced in fix for bug#419326. | |
| executeBatchedStatements | back to summary |
|---|---|
| public void executeBatchedStatements(AbstractSession session) Implements abstract org. INTERNAL: This method is used by the DatabaseAccessor to clear the batched statements in the case that a non batchable statement is being executed
| |
| getLastCallAppended | back to summary |
|---|---|
| public DatabaseCall getLastCallAppended() | |
| getParameters | back to summary |
|---|---|
| public List | |
| getPreviousCall | back to summary |
|---|---|
| public DatabaseCall getPreviousCall() | |
| prepareBatchStatements | back to summary |
|---|---|
| protected PreparedStatement prepareBatchStatements(AbstractSession session) throws DatabaseException INTERNAL: This method is used to build the parameterized batch statement for the JDBC2.0 specification | |
| setLastCallAppended | back to summary |
|---|---|
| public void setLastCallAppended(DatabaseCall lastCallAppended) | |
| setParameters | back to summary |
|---|---|
| public void setParameters(List<List<E>> parameters) | |
| setPreviousCall | back to summary |
|---|---|
| public void setPreviousCall(DatabaseCall previousCall) | |
| switchMechanisms | back to summary |
|---|---|
| protected void switchMechanisms(AbstractSession session, DatabaseCall dbCall) INTERNAL: Swaps out the Mechanism for the other Mechanism | |