java.lang.Object
org.springframework.data.cassandra.core.cql.RowUtils

public abstract class RowUtils extends Object
Generic utility methods for working with Cassandra. Mainly for internal use within the framework, but also useful for custom CQL access code.
Since:
2.0
Author:
Mark Paluch
  • Method Details

    • getRowValue

      @Nullable public static Object getRowValue(com.datastax.oss.driver.api.core.cql.Row row, int index, @Nullable Class<?> requiredType)
      Retrieve a CQL column value from a 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.

      Parameters:
      row - is the Row holding the data
      index - is the column index
      requiredType - the required value type (may be null)
      Returns:
      the value object