public final class TableSchema extends Object
| Constructor and Description |
|---|
TableSchema(String name,
Map<String,ColumnSchema> columnSchemas)
Constructs a TableSchema object.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,ColumnSchema> |
columnSchemas()
Returns a map of ColumnSchema.
|
boolean |
equals(Object obj) |
void |
generateInitializationColumns()
Refer to RFC 7047 Section 3.2.
|
Set<String> |
getColumnNames()
Returns a set of column name.
|
ColumnSchema |
getColumnSchema(String columnName)
Returns the ColumnSchema whose name is the columnName.
|
boolean |
hasColumn(String columnName)
Determine whether contain the column.
|
int |
hashCode() |
String |
name()
Returns the name of table.
|
String |
toString() |
public TableSchema(String name, Map<String,ColumnSchema> columnSchemas)
name - the name of tablecolumnSchemas - a map of ColumnSchemapublic String name()
public Map<String,ColumnSchema> columnSchemas()
public Set<String> getColumnNames()
public boolean hasColumn(String columnName)
columnName - column namepublic ColumnSchema getColumnSchema(String columnName)
columnName - column namepublic void generateInitializationColumns()