All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.jdbc.Table

java.lang.Object
   |
   +----examples.jdbc.Table

public class Table
extends Object
This class provides a basic service for managing database tables.


Constructor Index

 o Table(Connection)
Creates a Table to manage database tables.

Method Index

 o createTable(String, String)
Creates a database table.
 o destroyTable(String)
Drops a database table.
 o tableExists(String)
Tests the existence of a database table.
 o tableSize(String)
Determines the size of a database table.
 o traceSqlException(SQLException)
Displays the SQLException and additional error information.

Constructors

 o Table
 public Table(Connection connection)
Creates a Table to manage database tables.

Methods

 o createTable
 public void createTable(String tableName,
                         String tableStructure) throws SQLException
Creates a database table.

Parameters:
tableName - The name of the database table to be created.
tableStructure - The structure of the database table to be created.
Throws: SQLException
A database-access error occured.
 o destroyTable
 public void destroyTable(String tableName) throws SQLException
Drops a database table.

Parameters:
tableName - The name of the database table to be droped.
Throws: SQLException
A database-access error occured.
 o tableExists
 public boolean tableExists(String tableName)
Tests the existence of a database table.

Parameters:
tableName - The name of the database table.
 o tableSize
 public int tableSize(String tableName) throws SQLException
Determines the size of a database table.

Parameters:
tableName - The name of the database table.
Returns:
The number of existing rows in the table.
Throws: SQLException
A database-access error occured.
 o traceSqlException
 public static void traceSqlException(SQLException exception)
Displays the SQLException and additional error information.

Parameters:
exception - The SQLException to displayed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index