All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class de.tudarmstadt.ito.xmldbms.Column

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

public class Column
extends Object
Describes a column; not for general use.

Column contains information about a column in a table. The table is not named; instead, Columns are included in Tables and ColumnMaps.

Note that column values are stored in three separate objects in XML-DBMS:

The position of a column value can be different in each of these three objects. For example, it could be in column 5 in the result set, array index 3 in the Row object, and parameter 4 in the INSERT statement. Thus, three sets of column numbers are needed:

In virtually all cases, these three column numbers are the same, except for differences due to being 0- or 1-based. This is because XML-DBMS generates SELECT and INSERT statements itself and therefore places the columns in the same order in each. The only time that they differ is when the calling application passes a result set to DBMSToDOM.retrieveDocument. In this case, the number and order of columns in the result set can differ from the order of the columns as they appear in the Table.columns array. Because of this, the three different numbers are needed.

In the future, the Column class should contain information about the nullability and data type of the column as well. This will be used when creating CREATE TABLE statements.

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

Variable Index

 o length
Length of the column.
 o name
Name of the column.
 o rowObjectIndex
Index of the column value in the Rows.columnValues array.
 o type
Data type of the column.

Constructor Index

 o Column()
 o Column(String, int, int, int)

Variables

 o name
 public String name
Name of the column.

 o rowObjectIndex
 public int rowObjectIndex
Index of the column value in the Rows.columnValues array. 0-based.

 o type
 public int type
Data type of the column. This must be one of the values in java.sql.Types.

 o length
 public int length
Length of the column. Used only for character and binary data.

Constructors

 o Column
 public Column()
 o Column
 public Column(String name,
               int rowObjectIndex,
               int type,
               int length)

All Packages  Class Hierarchy  This Package  Previous  Next  Index