Search in sources :

Example 1 with CellNameType

use of org.apache.cassandra.db.composites.CellNameType in project stargate-core by tuplejump.

the class RowFetcher method getMetaColumn.

protected Cell getMetaColumn(Cell firstColumn, Float score) {
    CellNameType cellNameType = table.getComparator();
    ColumnDefinition columnDefinition = resultMapper.tableMapper.primaryColumnDefinition;
    CellName cellName = cellNameType.create(firstColumn.name(), columnDefinition);
    return new BufferCell(cellName, UTF8Type.instance.decompose("{\"score\":" + score.toString() + "}"));
}
Also used : CellNameType(org.apache.cassandra.db.composites.CellNameType) CellName(org.apache.cassandra.db.composites.CellName) ColumnDefinition(org.apache.cassandra.config.ColumnDefinition)

Aggregations

ColumnDefinition (org.apache.cassandra.config.ColumnDefinition)1 CellName (org.apache.cassandra.db.composites.CellName)1 CellNameType (org.apache.cassandra.db.composites.CellNameType)1