|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.rest.model.CellModel
public class CellModel
Representation of a cell. A cell is a single value associated a column and optional qualifier, and either the timestamp when it was stored or the user- provided timestamp if one was explicitly supplied.
<complexType name="Cell"> <sequence> <element name="value" maxOccurs="1" minOccurs="1"> <simpleType> <restriction base="base64Binary"/> </simpleType> </element> </sequence> <attribute name="column" type="base64Binary" /> <attribute name="timestamp" type="int" /> </complexType>
Constructor Summary | |
---|---|
CellModel()
Default constructor |
|
CellModel(byte[] column,
byte[] value)
Constructor |
|
CellModel(byte[] column,
byte[] qualifier,
byte[] value)
Constructor |
|
CellModel(byte[] column,
byte[] qualifier,
long timestamp,
byte[] value)
Constructor |
|
CellModel(byte[] column,
long timestamp,
byte[] value)
Constructor |
|
CellModel(KeyValue kv)
Constructor from KeyValue |
Method Summary | |
---|---|
byte[] |
createProtobufOutput()
|
byte[] |
getColumn()
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation. |
long |
getTimestamp()
|
byte[] |
getValue()
|
boolean |
hasUserTimestamp()
|
void |
setColumn(byte[] column)
|
void |
setTimestamp(long timestamp)
|
void |
setValue(byte[] value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CellModel()
public CellModel(byte[] column, byte[] value)
column
- value
- public CellModel(byte[] column, byte[] qualifier, byte[] value)
column
- qualifier
- value
- public CellModel(KeyValue kv)
kv
- public CellModel(byte[] column, long timestamp, byte[] value)
column
- timestamp
- value
- public CellModel(byte[] column, byte[] qualifier, long timestamp, byte[] value)
column
- qualifier
- timestamp
- value
- Method Detail |
---|
public byte[] getColumn()
public void setColumn(byte[] column)
column
- the column to setpublic boolean hasUserTimestamp()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- the timestamp to setpublic byte[] getValue()
public void setValue(byte[] value)
value
- the value to setpublic byte[] createProtobufOutput()
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf message
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |