public abstract class SessionClearingRowCallbackHandler extends Object implements org.springframework.jdbc.core.RowCallbackHandler
RowCallbackHandler which clears the session after processing a configurable
number of rows. Subclasses should implement processRowInternal(ResultSet) to do their
specific processing.
If you need a custom flushing and clearing strategy (not after a certain number of rows), you can
write your own RowCallbackHandler and use flushAndClear(Session) to do the flushing.
| Constructor and Description |
|---|
SessionClearingRowCallbackHandler(org.hibernate.Session session,
int flushAndClearEvery,
int expectedTotal) |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
flushAndClear(org.hibernate.Session session) |
void |
processRow(ResultSet rs) |
protected abstract void |
processRowInternal(ResultSet rs) |
public SessionClearingRowCallbackHandler(org.hibernate.Session session,
int flushAndClearEvery,
int expectedTotal)
public final void processRow(ResultSet rs) throws SQLException
processRow in interface org.springframework.jdbc.core.RowCallbackHandlerSQLExceptionprotected static void flushAndClear(org.hibernate.Session session)
protected abstract void processRowInternal(ResultSet rs) throws SQLException
SQLExceptionCopyright © 2003–2019 Atlassian. All rights reserved.