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

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

Introduction

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

Prototype

public RegularAndStaticColumns columns();

Source Link

Document

A subset of the columns for the (static and regular) rows returned by this iterator.

Usage

From source file:com.stratio.cassandra.lucene.util.SimpleRowIterator.java

License:Apache License

/**
 * Builds a new {@link SimpleRowIterator} from the current position of the specified {@link RowIterator}. Any other
 * rows in the specified iterator won't be read.
 *
 * @param iterator the {@link Row} iterator
 *//*from w w w  .  jav  a  2 s .co  m*/
public SimpleRowIterator(RowIterator iterator) {
    this.metadata = iterator.metadata();
    this.key = iterator.partitionKey();
    this.columns = iterator.columns();
    this.staticRow = iterator.staticRow();
    this.row = iterator.next();
    this.rows = Collections.singletonList(row).iterator();
}