Class RowMapperBuilder<T>

java.lang.Object
de.chojo.sadu.mapper.rowmapper.RowMapperBuilder<T>
Type Parameters:
T - type of the mapper result.
All Implemented Interfaces:
PartialRowMapper<T>

public class RowMapperBuilder<T> extends Object implements PartialRowMapper<T>
A builder to build a RowMapper.
  • Method Details

    • mapper

      public RowMapperBuilder<T> mapper(RowMapping<T> mapper)
      Description copied from interface: PartialRowMapper
      Adds a mapper to map a row to the required object.
      Specified by:
      mapper in interface PartialRowMapper<T>
      Parameters:
      mapper - mapper
      Returns:
      builder instance
    • addColumn

      public RowMapperBuilder<T> addColumn(String column)
      Adds a column to the row mapper
      Parameters:
      column - column to add
      Returns:
      builder instance
    • addColumns

      public RowMapperBuilder<T> addColumns(String... columns)
      Adds columns to the row mapper.
      Parameters:
      columns - columns to add
      Returns:
      builder instance
    • build

      public RowMapper<T> build()
      Build the row mapper.
      Returns:
      new RowMapper instance