Class SingleColumnRowMapper<T>

java.lang.Object
org.springframework.jdbc.core.SingleColumnRowMapper<T>
Type Parameters:
T - the result type
All Implemented Interfaces:
RowMapper<T>

public class SingleColumnRowMapper<T> extends Object implements RowMapper<T>
RowMapper implementation that converts a single column into a single result value per row. Expects to operate on a java.sql.ResultSet that just contains a single column.

The type of the result value for each row can be specified. The value for the single column will be extracted from the ResultSet and converted into the specified target type.

Since:
1.2
Author:
Juergen Hoeller, Kazuki Shimizu
See Also:
  • Constructor Details

    • SingleColumnRowMapper

      public SingleColumnRowMapper()
      Create a new SingleColumnRowMapper for bean-style configuration.
      See Also:
    • SingleColumnRowMapper

      public SingleColumnRowMapper(Class<T> requiredType)
      Create a new SingleColumnRowMapper.
      Parameters:
      requiredType - the type that each result object is expected to match
  • Method Details