All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.tudarmstadt.ito.xmldbms.Table

java.lang.Object
   |
   +----de.tudarmstadt.ito.xmldbms.Table

public class Table
extends Object
Describes a table; not for general use.

Table contains information about a table. Tables are included in TableMaps and in the array of tables in Map.

Version:
1.01
Author:
Ronald Bourret, Technical University of Darmstadt

Variable Index

 o columns
An array of Columns describing the columns in the table.
 o name
The table name.
 o number
The table number.
 o rsColumnNumbers
The numbers of the columns in the result set from which to retrieve column values.

Constructor Index

 o Table()
Construct a Table.
 o Table(Column[], String, int)
Construct a Table with the specified Columns, name, and number.

Method Index

 o getColumn(String)
Get a Column object for the named column.
 o getColumns(String[])
Get an array of Column objects for the named columns.

Variables

 o columns
 public Column columns[]
An array of Columns describing the columns in the table.

 o rsColumnNumbers
 public int rsColumnNumbers[]
The numbers of the columns in the result set from which to retrieve column values.

The result set column numbers are stored in this array in ascending order. This is necessary because some databases require columns in result sets to be accessed in ascending order. Although JDBC does not appear to have this requirement, it is likely that some JDBC drivers have it anyway.

 o name
 public String name
The table name.

 o number
 public int number
The table number. Table numbers are 0-based.

Constructors

 o Table
 public Table()
Construct a Table.

 o Table
 public Table(Column columns[],
              String name,
              int number)
Construct a Table with the specified Columns, name, and number.

Methods

 o getColumns
 public Column[] getColumns(String columnNames[]) throws InvalidMapException
Get an array of Column objects for the named columns. Note that this method is not efficient, performing a linear search for each column.

Parameters:
columnNames - Names of the columns to find. If this is null, getColumns returns a null.
Returns:
An array of Column objects for the specified columns.
Throws: InvalidMapException
Thrown if any columns are not found.
 o getColumn
 public Column getColumn(String columnName) throws InvalidMapException
Get a Column object for the named column. Note that this method is not efficient, performing a linear search for the column.

Parameters:
columnName - Name of the column to find. If this is null, getColumn returns a null.
Returns:
Column object for the specified column.
Throws: InvalidMapException
Thrown if the column is not found.

All Packages  Class Hierarchy  This Package  Previous  Next  Index