T - public abstract class AbstractResultSetConverter<T> extends Object implements Converter<com.datastax.oss.driver.api.core.cql.ResultSet,T>
ResultSet into the a value of a given type. The majority of the expected usage is to convert a
single-row-single-column result set into the target type.
The algorithm is:
ResultSet, it will throw an
IllegalArgumentException.| Constructor and Description |
|---|
AbstractResultSetConverter() |
| Modifier and Type | Method and Description |
|---|---|
T |
convert(com.datastax.oss.driver.api.core.cql.ResultSet source) |
protected T |
doConvertResultSet(List<Map<String,Object>> resultSet)
Converts the given result set (as a
List<Map<String,Object>>) to this converter's type
or throws IllegalArgumentException. |
protected T |
doConvertSingleRow(Map<String,Object> row)
Converts the given row (as a
Map<String,Object>) to this converter's type or throws
IllegalArgumentException. |
protected abstract T |
doConvertSingleValue(Object object)
Converts the given value to this converter's type or throws
IllegalArgumentException. |
protected T |
getExhaustedResultSetValue() |
protected T |
getNullResultSetValue() |
protected abstract Class<?> |
getType() |
protected abstract T doConvertSingleValue(Object object)
IllegalArgumentException.protected abstract Class<?> getType()
@Nullable protected T getNullResultSetValue()
ResultSet is null.@Nullable protected T getExhaustedResultSetValue()
ResultSet is exhausted.public T convert(com.datastax.oss.driver.api.core.cql.ResultSet source)
protected T doConvertResultSet(List<Map<String,Object>> resultSet)
List<Map<String,Object>>) to this converter's type
or throws IllegalArgumentException. This default implementation simply throws.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.