org.apache.hadoop.hbase.rest.model
Class TableListModel

java.lang.Object
  extended by org.apache.hadoop.hbase.rest.model.TableListModel
All Implemented Interfaces:
Serializable, ProtobufMessageHandler

public class TableListModel
extends Object
implements Serializable, ProtobufMessageHandler

Simple representation of a list of table names.

See Also:
Serialized Form

Constructor Summary
TableListModel()
          Default constructor
 
Method Summary
 void add(TableModel table)
          Add the table name model to the list
 byte[] createProtobufOutput()
           
 TableModel get(int index)
           
 ProtobufMessageHandler getObjectFromMessage(byte[] message)
          Initialize the model from a protobuf representation.
 List<TableModel> getTables()
           
 void setTables(List<TableModel> tables)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableListModel

public TableListModel()
Default constructor

Method Detail

add

public void add(TableModel table)
Add the table name model to the list

Parameters:
table - the table model

get

public TableModel get(int index)
Parameters:
index - the index
Returns:
the table model

getTables

public List<TableModel> getTables()
Returns:
the tables

setTables

public void setTables(List<TableModel> tables)
Parameters:
tables - the tables to set

toString

public String toString()
Overrides:
toString in class Object

createProtobufOutput

public byte[] createProtobufOutput()
Specified by:
createProtobufOutput in interface ProtobufMessageHandler
Returns:
the protobuf represention of the model

getObjectFromMessage

public ProtobufMessageHandler getObjectFromMessage(byte[] message)
                                            throws IOException
Description copied from interface: ProtobufMessageHandler
Initialize the model from a protobuf representation.

Specified by:
getObjectFromMessage in interface ProtobufMessageHandler
Parameters:
message - the raw bytes of the protobuf message
Returns:
reference to self for convenience
Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.