Class AsyncRowMapperResultSetExtractor<T>

All Implemented Interfaces:

public class AsyncRowMapperResultSetExtractor<T> extends Object implements AsyncResultSetExtractor<List<T>>
Adapter implementation of the ResultSetExtractor interface that delegates to a RowMapper which is supposed to create an object for each row. Each object is added to the results List of this ResultSetExtractor.

Useful for the typical case of one object per row in the database table. The number of entries in the results will match the number of rows.

Note that a RowMapper object is typically stateless and thus reusable.

Mark Paluch
See Also:
  • Constructor Details

  • Method Details

    • extractData

      public CompletableFuture<List<T>> extractData(com.datastax.oss.driver.api.core.cql.AsyncResultSet resultSet) throws com.datastax.oss.driver.api.core.DriverException, DataAccessException
      Description copied from interface: AsyncResultSetExtractor
      Implementations must implement this method to process the entire AsyncResultSet.
      Specified by:
      extractData in interface AsyncResultSetExtractor<T>
      resultSet - AsyncResultSet to extract data from.
      an arbitrary result object, or null if none (the extractor will typically be stateful in the latter case).
      com.datastax.oss.driver.api.core.DriverException - if a DriverException is encountered getting column values or navigating (that is, there's no need to catch DriverException)
      DataAccessException - in case of custom exceptions