@InterfaceAudience.Private public class RowModel extends Object implements ProtobufMessageHandler, Serializable
<complexType name="Row"> <sequence> <element name="key" type="base64Binary"></element> <element name="cell" type="tns:Cell" maxOccurs="unbounded" minOccurs="1"></element> </sequence> </complexType>
Modifier and Type | Field and Description |
---|---|
private List<CellModel> |
cells |
private byte[] |
key |
private static long |
serialVersionUID |
Constructor and Description |
---|
RowModel()
Default constructor
|
RowModel(byte[] key)
Constructor
|
RowModel(byte[] key,
List<CellModel> cells)
Constructor
|
RowModel(String key)
Constructor
|
RowModel(String key,
List<CellModel> cells)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCell(CellModel cell)
Adds a cell to the list of cells for this row
|
byte[] |
createProtobufOutput() |
boolean |
equals(Object obj) |
List<CellModel> |
getCells() |
byte[] |
getKey() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
int |
hashCode() |
void |
setKey(byte[] key) |
String |
toString() |
private static final long serialVersionUID
private byte[] key
public RowModel()
public RowModel(byte[] key)
key
- the row keypublic RowModel(String key, List<CellModel> cells)
key
- the row keycells
- the cellspublic void addCell(CellModel cell)
cell
- the cellpublic byte[] getKey()
public void setKey(byte[] key)
key
- the row keypublic 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 messageIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.