| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.rview.TableDeclaration
public class TableDeclaration
This represents the declaration of a table, comprising ColumnDeclaration objects. This object can be used to create, drop, or check the existence of the table.
| Field Summary | |
|---|---|
| static java.lang.String | CLASS_VERSIONClass version string | 
| Constructor Summary | |
|---|---|
| TableDeclaration(java.lang.String pName)Constructs a new TableDeclaration | |
| Method Summary | |
|---|---|
|  void | addColumn(ColumnDeclaration pColumn)Adds a column declarations to the list of columns for the table. | 
|  void | createTable(java.sql.Connection pConnection,
            TypeInfoMap pTypeInfoMap)Executes the CREATE TABLE statement needed to create this table with the specified column declarations. | 
|  void | dropTable(java.sql.Connection pConnection)Executes the DROP TABLE statement needed to remove the table with this TableDeclaration's name. | 
|  ColumnDeclaration | getColumn(int pIndex)Returns the ColumnDeclaration at the specified index | 
|  ColumnDeclaration | getColumn(java.lang.String pColumnName)Returns the ColumnDeclaration for the given name, or null if none found. | 
|  int | getColumnCount()Returns the number of columns added to the table | 
|  java.lang.String | getCreateTableStatement(java.sql.Connection pConnection,
                        TypeInfoMap pTypeInfoMap)Returns the CREATE TABLE statement that would be used to create this table. | 
|  java.lang.String | getName()Returns the name of the table | 
|  boolean | isCreated(java.sql.Connection pConnection)Returns true if there is a table with the same name as this TableDeclaration. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail | 
|---|
public TableDeclaration(java.lang.String pName)
pName - the name of the table| Method Detail | 
|---|
public void addColumn(ColumnDeclaration pColumn)
public java.lang.String getName()
public int getColumnCount()
public ColumnDeclaration getColumn(int pIndex)
public ColumnDeclaration getColumn(java.lang.String pColumnName)
public void createTable(java.sql.Connection pConnection,
                        TypeInfoMap pTypeInfoMap)
                 throws java.sql.SQLException
pConnection - the Connection to be used to create the tablepTypeInfoMap - the TypeInfoMap mapping JDBC types to
 database-specific types
java.sql.SQLException - if a SQL error occurred
public java.lang.String getCreateTableStatement(java.sql.Connection pConnection,
                                                TypeInfoMap pTypeInfoMap)
                                         throws java.sql.SQLException
java.sql.SQLException
public void dropTable(java.sql.Connection pConnection)
               throws java.sql.SQLException
pConnection - the Connection to be used to drop the table
java.sql.SQLException - if a SQL error occurred
public boolean isCreated(java.sql.Connection pConnection)
                  throws java.sql.SQLException
pConnection - the Connection to be used to test existence of
 the table
java.sql.SQLException - if a SQL error occurred| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||