01: package jimm.datavision.source.ncsql;
02:
03: import jimm.datavision.source.Table;
04: import jimm.datavision.source.Column;
05:
06: /**
07: * A database column. It knows the table to which it belongs, its name,
08: * and its type. The id of a column is a string of the form
09: * "table_name.column_name".
10: *
11: * @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
12: */
13: public class NCColumn extends Column {
14:
15: protected NCTable table;
16:
17: /**
18: * Constructor.
19: *
20: * @param table the table to which this column belongs
21: * @param colName the column's name
22: * @param colType the column's type id
23: */
24: public NCColumn(NCTable table, String colName, int colType) {
25: super (table.getName() + '.' + colName, colName, colType);
26: this .table = table;
27: }
28:
29: /**
30: * Returns the table to which this column belongs.
31: *
32: * @return the table
33: */
34: public Table getTable() {
35: return table;
36: }
37:
38: }
|