|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectits.SQL.Table
Provides an object-oriented view of a table from an SDD Schema. Created and used by the SDD Parser to store information parsed from the SDD Schema frame.
| Constructor Summary | |
Table(java.lang.String name)
Creates an empty Table object. |
|
Table(java.lang.String name,
Variable[] columns)
Creates a Table containing the given columns. |
|
Table(Table t)
Returns a new Table object that is a clone of the given Table object. |
|
| Method Summary | |
void |
addVariable(Variable v)
Adds a column to the table. |
java.util.Enumeration |
columns()
returns an Enumeration of all variables in the table |
java.util.Vector |
getForeign()
Returns a Vector of ForeignData objects describing all foreign-key references for this table. |
java.lang.String |
getName()
gets the table name |
int |
getNumberOfColumns()
gets the number of columns in the table |
java.util.Vector |
getPrimaryKey()
Returns a Vector of String objects that contain the names of the columns that form the primary key for this table. |
Variable |
getVariable(int index)
gets the variable at the given index |
Variable |
getVariable(java.lang.String name)
gets the variable with the given name |
java.util.Hashtable |
getVariableHashtable()
|
java.util.Vector |
getVariableVector()
|
boolean |
hasVariable(java.lang.String name)
|
void |
setName(java.lang.String strName)
|
void |
setTablespace(java.lang.String s)
This causes the table to generate the TABLESPACE modifier at the end of its list of elements, containing a vendor-specific string that is a hint to the database about where to store a table. |
java.lang.String |
toSql()
Generates the CREATE TABLE statement that defines this table |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Table(java.lang.String name,
Variable[] columns)
name - the table's namecolumns - the list of column data typespublic Table(java.lang.String name)
name - the table's namepublic Table(Table t)
| Method Detail |
public void addVariable(Variable v)
public java.lang.String getName()
public void setName(java.lang.String strName)
public java.util.Vector getVariableVector()
public java.util.Hashtable getVariableHashtable()
public Variable getVariable(int index)
throws java.lang.IllegalArgumentException
index - the index into the list of variables
java.lang.IllegalArgumentException - if the given index is out of bounds
public Variable getVariable(java.lang.String name)
throws java.lang.IllegalArgumentException
name - the name of that variable
java.lang.IllegalArgumentException - if the table does not contain a column with the given namepublic boolean hasVariable(java.lang.String name)
public java.util.Enumeration columns()
public int getNumberOfColumns()
public void setTablespace(java.lang.String s)
public java.util.Vector getForeign()
public java.util.Vector getPrimaryKey()
public java.lang.String toSql()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||