Class FieldMapper<T>
java.lang.Object
org.jdbi.v3.core.mapper.reflect.FieldMapper<T>
- All Implemented Interfaces:
- RowMapper<T>
A row mapper which maps the columns in a statement into an object, using reflection
 to set fields on the object. All declared fields of the class and its superclasses
 may be set. Nested properties are supported via the 
Nested annotation.
 The mapped class must have a default constructor.- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanstatic RowMapperFactoryReturns a mapper factory that maps to the given bean classstatic RowMapperFactoryReturns a mapper factory that maps to the given bean classmap(ResultSet rs, StatementContext ctx) Map the current row of the result set.static <T> RowMapper<T> Returns a mapper for the given bean classstatic <T> RowMapper<T> Returns a mapper for the given bean classspecialize(ResultSet rs, StatementContext ctx) Returns a specialized row mapper, optimized for the given result set.
- 
Method Details- 
factoryReturns a mapper factory that maps to the given bean class- Parameters:
- type- the mapped class
- Returns:
- a mapper factory that maps to the given bean class
 
- 
factoryReturns a mapper factory that maps to the given bean class- Parameters:
- type- the mapped class
- prefix- the column name prefix for each mapped field
- Returns:
- a mapper factory that maps to the given bean class
 
- 
of
- 
of
- 
mapDescription copied from interface:RowMapperMap the current row of the result set. This method should not cause the result set to advance; allow Jdbi to do that, please.- Specified by:
- mapin interface- RowMapper<T>
- Parameters:
- rs- the result set being iterated
- ctx- the statement context
- Returns:
- the value to produce for this row
- Throws:
- SQLException- if anything goes wrong go ahead and let this percolate; Jdbi will handle it
 
- 
specializeDescription copied from interface:RowMapperReturns a specialized row mapper, optimized for the given result set.Before 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.- Specified by:
- specializein interface- RowMapper<T>
- Parameters:
- rs- the result set to specialize over
- ctx- the statement context to specialize over
- Returns:
- a row mapper equivalent to this one, possibly specialized.
- Throws:
- SQLException- if anything goes wrong go ahead and let this percolate; Jdbi will handle it
- See Also:
 
- 
checkPropagateNullAnnotation
 
-