|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.jdbc.utils.batchable.Batchable.BatchOperation
public abstract static class Batchable.BatchOperation
Base of all operations that are to be delayed and batched later. Batch operations are grouped together according to preparedStatementNames, each prepared statement to be batched must have it's own.
| Nested Class Summary | |
|---|---|
static class |
Batchable.BatchOperation.ParamKey
A reference to a an array of template parameters |
| Constructor Summary | |
|---|---|
Batchable.BatchOperation(java.lang.String preparedStatementName)
Create a new BatchOperation for preparedStatement |
|
Batchable.BatchOperation(java.lang.String preparedStatementName,
java.lang.String[] templateParams)
Create a new BatchOperation for preparedStatement, with the given template parameters |
|
| Method Summary | |
|---|---|
abstract void |
addBatch(java.sql.PreparedStatement preparedStatement)
Called by BatchExecutor when prepared statement is being readied for execution. |
void |
commitImmediate(PreparedStatementCache cache)
Commit this Batchable to the DB |
java.lang.String |
getPreparedStatementName()
Get the prepared statements name |
Batchable.BatchOperation.ParamKey |
getTemplateParamKey()
Get the template parameter key |
java.lang.String[] |
getTemplateParams()
Get the template parameters |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Batchable.BatchOperation(java.lang.String preparedStatementName,
java.lang.String[] templateParams)
preparedStatementName - name of preparedStatementtemplateParams - template parameters to the preparedStatementpublic Batchable.BatchOperation(java.lang.String preparedStatementName)
preparedStatementName - name of preparedStatement| Method Detail |
|---|
public java.lang.String getPreparedStatementName()
public java.lang.String[] getTemplateParams()
public Batchable.BatchOperation.ParamKey getTemplateParamKey()
public void commitImmediate(PreparedStatementCache cache)
throws java.sql.SQLException
cache - source of preparedStatements
java.sql.SQLException - if there was an exception executing the batch operation
public abstract void addBatch(java.sql.PreparedStatement preparedStatement)
throws java.sql.SQLException
preparedStatement - preparedStatement onto which batch is added
java.sql.SQLException - if there was an error adding a batch to the preparedStatement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||