public final class DatabaseSchema extends Object
| Constructor and Description |
|---|
DatabaseSchema(String name,
String version,
Map<String,TableSchema> tableSchemas)
Constructs a DatabaseSchema object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
void |
generateInitializationColumns()
generate initialization columns in each table namely _uuid and _version.
|
Set<String> |
getTableNames()
Returns a set of table name.
|
TableSchema |
getTableSchema(String tableName)
Returns the TableSchema whose name is the tableName.
|
int |
hashCode() |
boolean |
hasTable(String tableName)
Determine whether contain the table.
|
String |
name()
Returns the name of database.
|
Map<String,TableSchema> |
tableSchemas()
Returns a map of TableSchema.
|
String |
toString() |
String |
version()
Returns the version of database.
|
public DatabaseSchema(String name, String version, Map<String,TableSchema> tableSchemas)
name - the name of databaseversion - the version of databasetableSchemas - a map of TableSchemapublic String name()
public String version()
public Map<String,TableSchema> tableSchemas()
public Set<String> getTableNames()
public boolean hasTable(String tableName)
tableName - table namepublic TableSchema getTableSchema(String tableName)
tableName - table namepublic void generateInitializationColumns()