| Modifier and Type | Method and Description |
|---|---|
static JoinRowMapper |
forTypes(Type... classes)
Create a JoinRowMapper that maps each of the given types and returns a
JoinRow with the resulting values. |
JoinRow |
map(ResultSet r,
StatementContext ctx)
Map the current row of the result set.
|
RowMapper<JoinRow> |
specialize(ResultSet r,
StatementContext ctx)
Returns a specialized row mapper, optimized for the given result set.
|
public static JoinRowMapper forTypes(Type... classes)
JoinRow with the resulting values.classes - the types to extractpublic JoinRow map(ResultSet r, StatementContext ctx) throws SQLException
RowMappermap in interface RowMapper<JoinRow>r - the result set being iteratedctx - the statement contextSQLException - if anything goes wrong go ahead and let this percolate; Jdbi will handle itpublic RowMapper<JoinRow> specialize(ResultSet r, StatementContext ctx) throws SQLException
RowMapperBefore mapping the result set from a SQL statement; Jdbi will first call this method to obtain a specialized instance. The returned mapper will then be used to map the result set rows, and discarded.
Implementing this method is optional; the default implementation returns this. Implementors might choose
to override this method to improve performance, e.g. by matching up column names to properties once for the
entire result set, rather than repeating the process for every row.
specialize in interface RowMapper<JoinRow>r - the result set to specialize overctx - the statement context to specialize overSQLException - if anything goes wrong go ahead and let this percolate; Jdbi will handle itfor an example of specialization.Copyright © 2019. All rights reserved.