public class Schema extends java.lang.Object
Constructor and Description |
---|
Schema(int version)
Construct a new schema.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsTable(java.lang.String name)
Returns true if schema contains a specific table.
|
Table |
createTable(java.lang.String name)
Create a new table.
|
int |
getMajorVersion()
Get the major version.
|
int |
getMinorVersion()
Get the minor version.
|
Table |
getTable(java.lang.String name)
Get an existing table.
|
java.lang.String |
getVersionString()
Get the version string that includes the major and minor versions.
|
void |
putTable(java.lang.String name,
Table table)
Add a new or change an existing table.
|
void |
removeTable(java.lang.String name)
Remove a table.
|
void |
setMajorVersion(int version)
Set the major version.
|
void |
setMinorVersion(int version)
Set the minor version.
|
java.util.Set<java.lang.String> |
tableNames()
Get the names of all tables.
|
java.util.Set<Table> |
tables()
Get a list of tables.
|
public Schema(int version)
version
- the version of the schemapublic boolean containsTable(java.lang.String name)
public Table createTable(java.lang.String name)
public Table getTable(java.lang.String name)
public int getMajorVersion()
public int getMinorVersion()
public java.lang.String getVersionString()
public void putTable(java.lang.String name, Table table)
public void removeTable(java.lang.String name)
public void setMajorVersion(int version)
public void setMinorVersion(int version)
public java.util.Set<java.lang.String> tableNames()