|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.schema.Table
public class 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. |
String |
getUnqualifiedName()
Returns the name of this table, minus any schema prefix if one exists. |
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 String getName()
public void setName(String s)
s - the name of the table.public Schema getSchema()
public void setSchema(Schema s)
s - a schema
public void addColumn(Column column)
throws SchemaException
column - the column to add
SchemaException - on schema error.public void setKey(Key k)
k - keypublic Key getKey()
public void initialize(DBMonsterContext ctx)
throws Exception
ctx - dbmonster context.
Exception - if initialization fails
public void generate()
throws Exception
Exception - if table generation failspublic void resetColumns()
public void reset()
public int getRows()
public void setRows(int i)
i - number of rowspublic boolean isGenerated()
true if the table is already generated.public Iterator columnIterator()
public List getColumns()
public int compareTo(Object o)
compareTo in interface ComparableComparable.compareTo(java.lang.Object)public void removeColumn(Column column)
column - column to removepublic boolean containsColumn(String name)
public Column findColumn(String name)
public String getUnqualifiedName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||