Class ReactiveRowMapperResultSetExtractor<T>

java.lang.Object
org.springframework.data.cassandra.core.cql.ReactiveRowMapperResultSetExtractor<T>
All Implemented Interfaces:
ReactiveResultSetExtractor<T>

public class ReactiveRowMapperResultSetExtractor<T> extends Object implements ReactiveResultSetExtractor<T>
Adapter implementation of the ReactiveResultSetExtractor interface that delegates to a RowMapper which is supposed to create an object for each row. Each object is emitted through the Publisher of this ReactiveResultSetExtractor.

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.

Since:
2.0
Author:
Mark Paluch
See Also:
  • Constructor Details

  • Method Details

    • extractData

      public org.reactivestreams.Publisher<T> extractData(ReactiveResultSet resultSet) throws com.datastax.oss.driver.api.core.DriverException, org.springframework.dao.DataAccessException
      Description copied from interface: ReactiveResultSetExtractor
      Implementations must implement this method to process the entire ReactiveResultSet.
      Specified by:
      extractData in interface ReactiveResultSetExtractor<T>
      Parameters:
      resultSet - ReactiveResultSet to extract data from, must not be null.
      Returns:
      an arbitrary result object Publisher.
      Throws:
      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).
      org.springframework.dao.DataAccessException - in case of custom exceptions.