@InterfaceAudience.Private public class TableSchemaModel extends java.lang.Object implements java.io.Serializable, ProtobufMessageHandler
<complexType name="TableSchema">
<sequence>
<element name="column" type="tns:ColumnSchema"
maxOccurs="unbounded" minOccurs="1"></element>
</sequence>
<attribute name="name" type="string"></attribute>
<anyAttribute></anyAttribute>
</complexType>
| Constructor and Description |
|---|
TableSchemaModel()
Default constructor.
|
TableSchemaModel(HTableDescriptor htd)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
__getIsMeta() |
boolean |
__getIsRoot() |
boolean |
__getReadOnly() |
void |
__setIsMeta(boolean value) |
void |
__setIsRoot(boolean value) |
void |
__setReadOnly(boolean value) |
void |
addAttribute(java.lang.String name,
java.lang.Object value)
Add an attribute to the table descriptor
|
void |
addColumnFamily(ColumnSchemaModel family)
Add a column family to the table descriptor
|
byte[] |
createProtobufOutput() |
java.util.Map<javax.xml.namespace.QName,java.lang.Object> |
getAny() |
java.lang.String |
getAttribute(java.lang.String name)
Return a table descriptor value as a string.
|
ColumnSchemaModel |
getColumnFamily(int index)
Retrieve the column family at the given index from the table descriptor
|
java.util.List<ColumnSchemaModel> |
getColumns() |
java.lang.String |
getName() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
HTableDescriptor |
getTableDescriptor() |
void |
setColumns(java.util.List<ColumnSchemaModel> columns) |
void |
setName(java.lang.String name) |
java.lang.String |
toString() |
public TableSchemaModel()
public TableSchemaModel(HTableDescriptor htd)
htd - the table descriptorpublic void addAttribute(java.lang.String name,
java.lang.Object value)
name - attribute namevalue - attribute valuepublic java.lang.String getAttribute(java.lang.String name)
name - the attribute namepublic void addColumnFamily(ColumnSchemaModel family)
family - the column family modelpublic ColumnSchemaModel getColumnFamily(int index)
index - the indexpublic java.lang.String getName()
public java.util.Map<javax.xml.namespace.QName,java.lang.Object> getAny()
public java.util.List<ColumnSchemaModel> getColumns()
public void setName(java.lang.String name)
name - the table namepublic void setColumns(java.util.List<ColumnSchemaModel> columns)
columns - the columns to setpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean __getIsMeta()
public boolean __getIsRoot()
public boolean __getReadOnly()
public void __setIsMeta(boolean value)
value - desired value of IS_META attributepublic void __setIsRoot(boolean value)
value - desired value of IS_ROOT attributepublic void __setReadOnly(boolean value)
value - desired value of READONLY attributepublic byte[] createProtobufOutput()
createProtobufOutput in interface ProtobufMessageHandlerpublic ProtobufMessageHandler getObjectFromMessage(byte[] message) throws java.io.IOException
ProtobufMessageHandlergetObjectFromMessage in interface ProtobufMessageHandlermessage - the raw bytes of the protobuf messagejava.io.IOExceptionpublic HTableDescriptor getTableDescriptor()