public abstract class RowUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getRowValue(com.datastax.oss.driver.api.core.cql.Row row,
int index,
Class<?> requiredType)
Retrieve a CQL column value from a
Row , using the specified value type. |
@Nullable public static Object getRowValue(com.datastax.oss.driver.api.core.cql.Row row, int index, @Nullable Class<?> requiredType)
Row
, using the specified value type.
Uses the specifically typed Row
accessor methods, falling back to GettableByIndex.getObject(int)
for unknown
types.
Note that the returned value may not be assignable to the specified required type, in case of an unknown type. Calling code needs to deal with this case appropriately, e.g. throwing a corresponding exception.
row
- is the Row
holding the dataindex
- is the column indexrequiredType
- the required value type (may be null)Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.