@SuppressWarnings("unchecked") private T wrapResultSet(MappedEntityBase entity, ResultSet resultSet, CqlColumn[] columns, T r) {
if (tracer != null) {
tracer.onReadResultSetBegin(session, entity, resultSet, columns);
}
GettableRetriever retriever = new GettableRetriever(session.persistenceManager.protocolVersion, columns);
while (!resultSet.isExhausted()) {
Row row = resultSet.one();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("got {} row for read of {}", row != null ? "a" : "no", entity.type);
}
retriever.setCurrentSource(row);
if (tracer != null) {
tracer.onReadResultSetRow(session, entity, resultSet, columns, row);
}
T r2 = entity.fromRow(session, retriever, columns, r);
if (r2 != null) {