Example usage for org.apache.cassandra.db.rows Row getComplexColumnData

List of usage examples for org.apache.cassandra.db.rows Row getComplexColumnData

Introduction

In this page you can find the example usage for org.apache.cassandra.db.rows Row getComplexColumnData.

Prototype

public ComplexColumnData getComplexColumnData(ColumnMetadata c);

Source Link

Document

The data for a complex column.

Usage

From source file:com.stratio.cassandra.lucene.column.ColumnsMapper.java

License:Apache License

/**
 * Adds to the specified {@link Column} to the {@link Column}s contained in the specified {@link Row}.
 *
 * @param columns The {@link Columns} in which the {@link Column}s are going to be added.
 * @param row A {@link Row}./*from  ww  w  .j a v  a2s. c om*/
 */
public void addColumns(Columns columns, Row row) {

    for (ColumnDefinition columnDefinition : row.columns()) {
        if (columnDefinition.isComplex()) {
            addColumns(columns, row.getComplexColumnData(columnDefinition));
        } else {
            addColumns(columns, row.getCell(columnDefinition));
        }
    }
}