|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.schema.Schema
Schema represents the look of the database, it is complete database structure including tables, primary keys, columns and generators.
Constructor Summary | |
Schema()
|
Method Summary | |
void |
addTable(Table table)
Adds a table to the schema. |
int |
compareTo(Object o)
|
Table |
findTable(String tableName)
Returns a table of given name. |
void |
generate()
Generates the schema. |
String |
getHome()
Returns the directory where the schema is located. |
String |
getName()
Returns the name of the schema. |
List |
getTables()
Returns tables. |
void |
initialize(DBMonsterContext ctx)
Initializes the schema. |
void |
removeTable(Table t)
Removes the table. |
void |
reset()
Resets the schema. |
void |
setHome(String dir)
Sets the home directory of the schema. |
void |
setName(String s)
Sets the name of the schema. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Schema()
Method Detail |
public void addTable(Table table) throws SchemaException
table
- a table to add.
SchemaException
- if a schema error occurespublic String getName()
public void setName(String s)
s
- the name of the schema.public void initialize(DBMonsterContext ctx) throws Exception
ctx
- dbmonster context.
Exception
- if initialization failspublic void generate() throws Exception
Exception
- if this schema could not be generatedpublic String getHome()
public void setHome(String dir)
dir
- the home directory of schema.public Table findTable(String tableName)
tableName
- the name of the table
public List getTables()
public void removeTable(Table t)
t
- table to removepublic int compareTo(Object o)
compareTo
in interface Comparable
Comparable.compareTo(java.lang.Object)
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |