@FunctionalInterface public interface RowMapper<T>
CqlTemplatefor mapping rows of a
ResultSeton a per-row basis. Implementations of this interface perform the actual work of mapping each row to a result object, but don't need to worry about exception handling.
DriverExceptions will be caught and handled by the calling
Typically used either for
CqlTemplate's query methods or for out parameters of stored procedures.
RowMapper objects are typically stateless and thus reusable; they are an ideal choice for implementing
row-mapping logic in a single place.
@Nullable T mapRow(com.datastax.driver.core.Row row, int rowNum) throws com.datastax.driver.core.exceptions.DriverException
Rowto map, must not be null.
rowNum- the number of the current row.
com.datastax.driver.core.exceptions.DriverException- if a
DriverExceptionis encountered getting column values (that is, there's no need to catch
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.