public final class Cell extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
static Cell |
create(Cell metadata,
ByteBuffer cellValue)
Factory method, creates a new Cell from its value and metadata information
|
static Cell |
create(Cell metadata,
Object cellValue)
Factory method, creates a new Cell from its value and metadata information
|
static <E extends IDeepType> |
create(E e,
Field field)
Constructs a Cell from a
DeepField property. |
static Cell |
create(String cellName)
Factory method, builds a new Cell (isPartitionKey = false and isClusterKey = false) with value = null.
|
static Cell |
create(String cellName,
com.datastax.driver.core.DataType cellType,
Boolean isPartitionKey,
Boolean isClusterKey)
Factory method, creates a new metadata Cell, i.e.
|
static Cell |
create(String cellName,
Object cellValue)
Factory method, builds a new Cell (isPartitionKey = false and isClusterKey = false).
|
static Cell |
create(String cellName,
Object cellValue,
Boolean isPartitionKey,
Boolean isClusterKey)
Factory method, creates a new Cell.
|
boolean |
equals(Object o)
Two Cell are considered equal if and only if the following properties are equal:
cellName
cellValue
isClusterKey
isPartitionKey
validator
|
String |
getCellName() |
CellValidator |
getCellValidator() |
Object |
getCellValue()
Returns the composed cell value.
|
ByteBuffer |
getDecomposedCellValue()
Returns the cell value as a ByteBuffer, performs the conversion using the
configured validator.
|
Class<?> |
getValueType()
Returns the Java type corresponding to the current Cell.
|
static CellValidator |
getValueType(com.datastax.driver.core.DataType obj)
Calculates the Cassandra validator type given the value class type.
There's a shortcoming in the case of an UUID. |
static CellValidator |
getValueType(Object obj)
Calculates the Cassandra marshaller given the cell value.
|
int |
hashCode() |
Boolean |
isClusterKey() |
Boolean |
isPartitionKey() |
org.apache.cassandra.db.marshal.AbstractType |
marshaller() |
String |
marshallerClassName() |
String |
toString() |
public static Cell create(Cell metadata, Object cellValue)
metadata - the cell object carrying the metadata for this new cellcellValue - the cell value, provided as a ByteBuffer.public static Cell create(Cell metadata, ByteBuffer cellValue)
metadata - the cell object carrying the metadata for this new cellcellValue - the cell value, provided as a ByteBuffer.public static Cell create(String cellName, Object cellValue)
cellName - the cell namecellValue - the cell value, provided as a ByteBuffer.public static Cell create(String cellName)
cellName - the cell namepublic static Cell create(String cellName, Object cellValue, Boolean isPartitionKey, Boolean isClusterKey)
cellName - the cell namecellValue - the cell value, provided as a ByteBuffer.isPartitionKey - true if this cell is part of the cassandra's partition key.isClusterKey - true if this cell is part of the cassandra's clustering key.public static Cell create(String cellName, com.datastax.driver.core.DataType cellType, Boolean isPartitionKey, Boolean isClusterKey)
cellName - the cell namecellType - the cell value type.isPartitionKey - true if this cell is part of the cassandra's partition key.isClusterKey - true if this cell is part of the cassandra's clustering key.public static <E extends IDeepType> Cell create(E e, Field field)
DeepField property.E - a subclass of IDeepType.e - instance of the testentity whose field is going to generate a Cell.field - field that will generate the Cell.public static CellValidator getValueType(com.datastax.driver.core.DataType obj)
obj - the value class type.public static CellValidator getValueType(Object obj)
obj - the cell value.public CellValidator getCellValidator()
public boolean equals(Object o)
public Class<?> getValueType()
public String getCellName()
public Object getCellValue()
getValueType(com.datastax.driver.core.DataType)public ByteBuffer getDecomposedCellValue()
public Boolean isClusterKey()
public Boolean isPartitionKey()
public org.apache.cassandra.db.marshal.AbstractType marshaller()
public String marshallerClassName()
Copyright © 2014. All rights reserved.