org.sfm.jdbc.spring
public final class JdbcTemplateMapper<T> extends Object implements org.springframework.jdbc.core.RowMapper<T>, org.springframework.jdbc.core.PreparedStatementCallback<List<T>>, org.springframework.jdbc.core.ResultSetExtractor<List<T>>
| Constructor and Description |
|---|
JdbcTemplateMapper(JdbcMapper<T> mapper) |
| Modifier and Type | Method and Description |
|---|---|
List<T> |
doInPreparedStatement(PreparedStatement ps) |
List<T> |
extractData(ResultSet rs) |
T |
mapRow(ResultSet rs,
int rowNum) |
<H extends RowHandler<T>> |
newPreparedStatementCallback(H handler) |
<H extends RowHandler<T>> |
newResultSetExtractor(H handler) |
public JdbcTemplateMapper(JdbcMapper<T> mapper)
public T mapRow(ResultSet rs, int rowNum) throws SQLException
mapRow in interface org.springframework.jdbc.core.RowMapper<T>SQLExceptionpublic List<T> doInPreparedStatement(PreparedStatement ps) throws SQLException, org.springframework.dao.DataAccessException
doInPreparedStatement in interface org.springframework.jdbc.core.PreparedStatementCallback<List<T>>SQLExceptionorg.springframework.dao.DataAccessExceptionpublic <H extends RowHandler<T>> org.springframework.jdbc.core.PreparedStatementCallback<H> newPreparedStatementCallback(H handler)
public <H extends RowHandler<T>> org.springframework.jdbc.core.ResultSetExtractor<H> newResultSetExtractor(H handler)
public List<T> extractData(ResultSet rs) throws SQLException, org.springframework.dao.DataAccessException
extractData in interface org.springframework.jdbc.core.ResultSetExtractor<List<T>>SQLExceptionorg.springframework.dao.DataAccessExceptionCopyright © 2015. All rights reserved.