|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.schema.Table
The table.
Constructor Summary | |
Table()
|
Method Summary | |
void |
addColumn(Column column)
Adds a column to the schema. |
Iterator |
columnIterator()
Returns a column iterator. |
int |
compareTo(Object o)
|
boolean |
containsColumn(String name)
|
Column |
findColumn(String name)
|
void |
generate()
Generates the table. |
List |
getColumns()
Returns list of columns. |
Key |
getKey()
Returns a key. |
String |
getName()
Returns the name of the table. |
int |
getRows()
Returns the number of rows we want to generate for this table. |
Schema |
getSchema()
Returns schema. |
void |
initialize(DBMonsterContext ctx)
Initializes the table. |
boolean |
isGenerated()
Checks if the table is already generated. |
void |
removeColumn(Column column)
Removes column from table. |
void |
reset()
Resets the entire table and mark it as if it was not generated. |
void |
resetColumns()
Resets key and all columns. |
void |
setKey(Key k)
Sets the key. |
void |
setName(String s)
Sets the name of the table. |
void |
setRows(int i)
Sets the number of rows. |
void |
setSchema(Schema s)
Sets the schema - it cannot be null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Table()
Method Detail |
public final String getName()
public final void setName(String s)
s
- the name of the table.public final Schema getSchema()
public final void setSchema(Schema s)
s
- a schemapublic final void addColumn(Column column) throws SchemaException
column
- the column to add
SchemaException
- on schema error.public final void setKey(Key k)
k
- keypublic final Key getKey()
public final void initialize(DBMonsterContext ctx) throws Exception
ctx
- dbmonster context.
Exception
- if initialization failspublic final void generate() throws Exception
Exception
- if table generation failspublic final void resetColumns()
public final void reset()
public final int getRows()
public final void setRows(int i)
i
- number of rowspublic final boolean isGenerated()
true
if the table is already generated.public final Iterator columnIterator()
public final List getColumns()
public final int compareTo(Object o)
compareTo
in interface Comparable
Comparable.compareTo(java.lang.Object)
public final void removeColumn(Column column)
column
- column to removepublic boolean containsColumn(String name)
public Column findColumn(String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |