|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl
public abstract class AbstractBatchImpl
Convenience base class for implementers of the Batch interface.
Constructor Summary | |
---|---|
protected |
AbstractBatchImpl(BatchKey key,
JdbcCoordinator jdbcCoordinator)
|
Method Summary | |
---|---|
void |
addObserver(BatchObserver observer)
Adds an observer to this batch. |
protected abstract void |
doExecuteBatch()
Perform batch execution. |
void |
execute()
Execute this batch. |
PreparedStatement |
getBatchStatement(String sql,
boolean callable)
Get a statement which is part of the batch, creating if necessary (and storing for next time). |
BatchKey |
getKey()
Retrieves the object being used to key (uniquely identify) this batch. |
protected LinkedHashMap<String,PreparedStatement> |
getStatements()
Access to the batch's map of statements (keyed by SQL statement string). |
protected void |
notifyObserversExplicitExecution()
Convenience method to notify registered observers of an explicit execution of this batch. |
protected void |
notifyObserversImplicitExecution()
Convenience method to notify registered observers of an implicit execution of this batch. |
void |
release()
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources. |
protected SqlExceptionHelper |
sqlExceptionHelper()
Convenience access to the SQLException helper. |
protected SqlStatementLogger |
sqlStatementLogger()
Convenience access to the SQL statement logger. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.hibernate.engine.jdbc.batch.spi.Batch |
---|
addToBatch |
Constructor Detail |
---|
protected AbstractBatchImpl(BatchKey key, JdbcCoordinator jdbcCoordinator)
Method Detail |
---|
protected abstract void doExecuteBatch()
execution
, but may also be called from elsewhere
depending on the exact implementation.
protected SqlExceptionHelper sqlExceptionHelper()
protected SqlStatementLogger sqlStatementLogger()
protected LinkedHashMap<String,PreparedStatement> getStatements()
public final BatchKey getKey()
Batch
getKey
in interface Batch
public void addObserver(BatchObserver observer)
Batch
addObserver
in interface Batch
observer
- The batch observer.public PreparedStatement getBatchStatement(String sql, boolean callable)
Batch
getBatchStatement
in interface Batch
sql
- The SQL statement.callable
- Is the SQL statement callable?
public final void execute()
Batch
execute
in interface Batch
protected final void notifyObserversExplicitExecution()
protected final void notifyObserversImplicitExecution()
public void release()
Batch
release
in interface Batch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |