Class RowModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.RowModel
- All Implemented Interfaces:
Serializable,ProtobufMessageHandler
Representation of a row. A row is a related set of cells, grouped by common row key. RowModels do
not appear in results by themselves. They are always encapsulated within CellSetModels.
<complexType name="Row">
<sequence>
<element name="key" type="base64Binary"></element>
<element name="cell" type="tns:Cell"
maxOccurs="unbounded" minOccurs="1"></element>
</sequence>
</complexType>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a cell to the list of cells for this rowbyte[]Returns the protobuf represention of the modelbooleangetCells()Returns the cellsbyte[]getKey()Returns the row keygetObjectFromMessage(byte[] message) Initialize the model from a protobuf representation.inthashCode()voidsetKey(byte[] key) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
key
-
cells
-
-
Constructor Details
-
RowModel
public RowModel()Default constructor -
RowModel
Constructor- Parameters:
key- the row key
-
RowModel
Constructor- Parameters:
key- the row key
-
RowModel
Constructor- Parameters:
key- the row keycells- the cells
-
RowModel
Constructor- Parameters:
key- the row keycells- the cells
-
-
Method Details
-
addCell
Adds a cell to the list of cells for this row- Parameters:
cell- the cell
-
getKey
Returns the row key -
setKey
- Parameters:
key- the row key
-
getCells
Returns the cells -
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
-