public class ReactiveRowMapperResultSetExtractor<T> extends Object implements ReactiveResultSetExtractor<T>
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.
RowMapper,
ReactiveCqlTemplate| Constructor and Description |
|---|
ReactiveRowMapperResultSetExtractor(RowMapper<T> rowMapper)
Create a new
ReactiveRowMapperResultSetExtractor. |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<T> |
extractData(ReactiveResultSet resultSet)
Implementations must implement this method to process the entire
ReactiveResultSet. |
public ReactiveRowMapperResultSetExtractor(RowMapper<T> rowMapper)
ReactiveRowMapperResultSetExtractor.rowMapper - the RowMapper which creates an object for each row, must not be null.public org.reactivestreams.Publisher<T> extractData(ReactiveResultSet resultSet) throws com.datastax.oss.driver.api.core.DriverException, DataAccessException
ReactiveResultSetExtractorReactiveResultSet.extractData in interface ReactiveResultSetExtractor<T>resultSet - ReactiveResultSet to extract data from, must not be null.Publisher.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.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.