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

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

Introduction

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

Prototype

public Collection<ColumnMetadata> columns();

Source Link

Document

An in-natural-order collection of the columns for which data (incl.

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  w  w  w.j av a2  s  .  co m
 */
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));
        }
    }
}