public class ColumnMapParameterizedRowMapper extends Object implements org.springframework.jdbc.core.simple.ParameterizedRowMapper<Map<String,Object>>
ColumnMapRowMapper| Constructor and Description |
|---|
ColumnMapParameterizedRowMapper() |
ColumnMapParameterizedRowMapper(boolean ignoreNull) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
createColumnMap(int columnCount)
Create a Map instance to be used as column map.
|
protected String |
getColumnKey(String columnName)
Determine the key to use for the given column in the column Map.
|
protected Object |
getColumnValue(ResultSet rs,
int index)
Retrieve a JDBC object value for the specified column.
|
Map<String,Object> |
mapRow(ResultSet rs,
int rowNum) |
public ColumnMapParameterizedRowMapper()
public ColumnMapParameterizedRowMapper(boolean ignoreNull)
public final Map<String,Object> mapRow(ResultSet rs, int rowNum) throws SQLException
mapRow in interface org.springframework.jdbc.core.RowMapper<Map<String,Object>>SQLExceptionprotected Map<String,Object> createColumnMap(int columnCount)
columnCount - the column count, to be used as initial capacity for the Mapprotected String getColumnKey(String columnName)
columnName - the column name as returned by the ResultSetResultSetMetaData.getColumnName(int)protected Object getColumnValue(ResultSet rs, int index) throws SQLException
getObject method. Additionally, this implementation includes
a "hack" to get around Oracle returning a non standard object for their TIMESTAMP datatype.rs - is the ResultSet holding the dataindex - is the column indexSQLException - SQL ExceptionJdbcUtils.getResultSetValue(java.sql.ResultSet, int, java.lang.Class<?>)Copyright © 2015 Jasig. All Rights Reserved.