@FunctionalInterface public interface ResultSetExtractor<T>
CqlTemplate's query methods. Implementations of this interface perform the actual work of extracting results from a
ResultSet, but don't need to worry about exception handling.
DriverExceptions will be caught and handled by the calling
This interface is mainly used within the CQL framework itself. A
RowMapper is usually a simpler choice for
ResultSet processing, mapping one result object per row instead of one result object for the entire
Note: In contrast to a
ResultSetExtractor object is typically stateless and
thus reusable, as long as it doesn't access stateful resources or keep result state within the object.
@Nullable T extractData(com.datastax.driver.core.ResultSet resultSet) throws com.datastax.driver.core.exceptions.DriverException, DataAccessException
ResultSetto extract data from.
com.datastax.driver.core.exceptions.DriverException- if a
DriverExceptionis encountered getting column values or navigating (that is, there's no need to catch
DataAccessException- in case of custom exceptions
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.