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

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

Introduction

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

Prototype

public Iterable<Cell> cells();

Source Link

Document

An iterable over the cells of this row.

Usage

From source file:io.puntanegra.fhir.index.FhirIndexIndexer.java

License:Apache License

@SuppressWarnings("unused")
private boolean insertInIndex(final String indexResourceType, Row row) {
    // only index in the correct lucene index.
    // this code checks if the resourceType is the same as the index.
    // TODO: externalizar resource_type

    for (Cell cell : row.cells()) {
        String columnname = cell.column().name.toString();
        if ("resource_type".equals(columnname)) {
            String resourceType = ByteBufferUtils.toString(cell.value(), UTF8Type.instance);

            if (indexResourceType.equals(resourceType)) {
                return true;
            }//from  w  w w.j av a  2 s . com
            return false;
        }
    }
    return false;
}