@FunctionalInterface public interface RowMapper<T>
CqlTemplatefor mapping rows of a
com.datastax.driver.core.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.oss.driver.api.core.cql.Row row, int rowNum) throws com.datastax.oss.driver.api.core.DriverException
Rowto map, must not be null.
rowNum- the number of the current row.
com.datastax.oss.driver.api.core.DriverException- if a
DriverExceptionis encountered getting column values (that is, there's no need to catch
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.