Class CellModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.CellModel
- All Implemented Interfaces:
Serializable,ProtobufMessageHandler
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>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private static final longprivate longprivate byte[] -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCellModel(byte[] column, byte[] value) ConstructorCellModel(byte[] column, byte[] qualifier, byte[] value) ConstructorCellModel(byte[] column, byte[] qualifier, long timestamp, byte[] value) ConstructorCellModel(byte[] column, long timestamp, byte[] value) ConstructorConstructor from KeyValue -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Returns the protobuf represention of the modelbooleanbyte[]Returns the columngetObjectFromMessage(byte[] message) Initialize the model from a protobuf representation.longReturns the timestampbyte[]getValue()Returns the valueinthashCode()booleanReturns true if the timestamp property has been specified by the uservoidsetColumn(byte[] column) voidsetTimestamp(long timestamp) voidsetValue(byte[] value) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
column
-
timestamp
-
value
-
-
Constructor Details
-
CellModel
public CellModel()Default constructor -
CellModel
Constructor -
CellModel
Constructor -
CellModel
Constructor from KeyValue -
CellModel
Constructor -
CellModel
Constructor
-
-
Method Details
-
getColumn
Returns the column -
setColumn
- Parameters:
column- the column to set
-
hasUserTimestamp
Returns true if the timestamp property has been specified by the user -
getTimestamp
Returns the timestamp -
setTimestamp
- Parameters:
timestamp- the timestamp to set
-
getValue
Returns the value -
setValue
- Parameters:
value- the value to set
-
createProtobufOutput
Description copied from interface:ProtobufMessageHandlerReturns the protobuf represention of the model- Specified by:
createProtobufOutputin interfaceProtobufMessageHandler
-
getObjectFromMessage
Description copied from interface:ProtobufMessageHandlerInitialize the model from a protobuf representation.- Specified by:
getObjectFromMessagein interfaceProtobufMessageHandler- Parameters:
message- the raw bytes of the protobuf message- Returns:
- reference to self for convenience
- Throws:
IOException
-
equals
-
hashCode
-
toString
-