KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jimm > datavision > source > ncsql > NCColumn


1 package jimm.datavision.source.ncsql;
2 import jimm.datavision.source.Table;
3 import jimm.datavision.source.Column;
4
5 /**
6  * A database column. It knows the table to which it belongs, its name,
7  * and its type. The id of a column is a string of the form
8  * "table_name.column_name".
9  *
10  * @author Jim Menard, <a HREF="mailto:jimm@io.com">jimm@io.com</a>
11  */

12 public class NCColumn extends Column {
13
14 protected NCTable table;
15
16 /**
17  * Constructor.
18  *
19  * @param table the table to which this column belongs
20  * @param colName the column's name
21  * @param colType the column's type id
22  */

23 public NCColumn(NCTable table, String JavaDoc colName, int colType) {
24     super(table.getName() + '.' + colName, colName, colType);
25     this.table = table;
26 }
27
28 /**
29  * Returns the table to which this column belongs.
30  *
31  * @return the table
32  */

33 public Table getTable() { return table; }
34
35 }
36
Popular Tags