| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.jdbc.core.support.AbstractInterruptibleBatchPreparedStatementSetter
public abstract class AbstractInterruptibleBatchPreparedStatementSetter
Abstract implementation of the InterruptibleBatchPreparedStatementSetter
 interface, combining the check for available values and setting of those
 into a single callback method setValuesIfAvailable(java.sql.PreparedStatement, int).
setValuesIfAvailable(java.sql.PreparedStatement, int)| Constructor Summary | |
|---|---|
| AbstractInterruptibleBatchPreparedStatementSetter() | |
| Method Summary | |
|---|---|
|  int | getBatchSize()This implementation returns Integer.MAX_VALUE. | 
|  boolean | isBatchExhausted(int i)This implementation return this instance's current exhaustion flag. | 
|  void | setValues(PreparedStatement ps,
          int i)This implementation calls setValuesIfAvailable(java.sql.PreparedStatement, int)and sets this instance's exhaustion flag accordingly. | 
| protected abstract  boolean | setValuesIfAvailable(PreparedStatement ps,
                     int i)Check for available values and set them on the given PreparedStatement. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractInterruptibleBatchPreparedStatementSetter()
| Method Detail | 
|---|
public final void setValues(PreparedStatement ps,
                            int i)
                     throws SQLException
setValuesIfAvailable(java.sql.PreparedStatement, int)
 and sets this instance's exhaustion flag accordingly.
setValues in interface BatchPreparedStatementSetterps - the PreparedStatement to invoke setter methods oni - index of the statement we're issuing in the batch, starting from 0
SQLException - if a SQLException is encountered
 (i.e. there is no need to catch SQLException)public final boolean isBatchExhausted(int i)
isBatchExhausted in interface InterruptibleBatchPreparedStatementSetteri - index of the statement we're issuing in the batch, starting from 0
BatchPreparedStatementSetter.setValues(java.sql.PreparedStatement, int), 
setValuesIfAvailable(java.sql.PreparedStatement, int)public int getBatchSize()
Integer.MAX_VALUE.
 Can be overridden in subclasses to lower the maximum batch size.
getBatchSize in interface BatchPreparedStatementSetter
protected abstract boolean setValuesIfAvailable(PreparedStatement ps,
                                                int i)
                                         throws SQLException
false.
ps - PreparedStatement we'll invoke setter methods oni - index of the statement we're issuing in the batch, starting from 0
SQLException - if a SQLException is encountered
 (i.e. there is no need to catch SQLException)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||