RowMapper implementation that creates a java.util.Map
for each row, representing all columns as key-value pairs: one
entry for each column, with the column name as key.
The Map implementation to use and the key to use for each column
in the column Map can be customized through overriding
createColumnMap and getColumnKey, respectively.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Map | Returns: the new Map instancethe column count, to be used as initial
capacity for the Map columnCount)Create a Map instance to be used as column map. |
| protected String | Returns: the column key to usethe column name (uppercase) as returned by the ResultSet columnName)Determine the key to use for the given column in the column Map. |
| protected Object | Returns: the Object returnedis the ResultSet holding the data rs, int is the column index index)Retrieve a JDBC object value for the specified column. |
| public Object | mapRow(ResultSet
the ResultSet to map (pre-initialized for the current row) rs, int the number of the current row rowNum)Implements liquibase. Implementations must implement this method to map each row of data in the ResultSet. |
| caseSensitiveDatabase | back to summary |
|---|---|
| private final boolean caseSensitiveDatabase | |
| ColumnMapRowMapper | back to summary |
|---|---|
| public ColumnMapRowMapper(boolean caseSensitiveDatabase) | |
| createColumnMap | back to summary |
|---|---|
| protected Map Create a Map instance to be used as column map.
| |
| getColumnKey | back to summary |
|---|---|
| protected String getColumnKey(String columnName) Determine the key to use for the given column in the column Map.
| |
| getColumnValue | back to summary |
|---|---|
| protected Object getColumnValue(ResultSet rs, int index) throws SQLException Retrieve a JDBC object value for the specified column. The default implementation uses the | |
| mapRow | back to summary |
|---|---|
| public Object mapRow(ResultSet rs, int rowNum) throws SQLException Implements liquibase. Doc from liquibase. Implementations must implement this method to map each row of data
in the ResultSet. This method should not call
| |