KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > dql > common > TableInfo


1 package com.daffodilwoods.daffodildb.server.sql99.dql.common;
2
3 import java.io.*;
4 import com.daffodilwoods.daffodildb.server.sql99.dql.execution.*;
5 import com.daffodilwoods.database.general.*;
6 import com.daffodilwoods.database.resource.*;
7
8 /**
9  * TableInfo represents a table uniquely across different queries. This is used
10  * to reflect any effect on a result set taken on Select Query, when there is
11  * any modification occured on the tables involved in Select Query.
12  * <p>Title: </p>
13  * <p>Description: </p>
14  * <p>Copyright: Copyright (c) 2003</p>
15  * <p>Company: </p>
16  * @author unascribed
17  * @version 1.0
18  */

19
20 public class TableInfo implements _TableInfo, Serializable {
21
22    /**
23     * Represents the qualified name of table.
24     */

25
26    private QualifiedIdentifier tableName;
27
28    /**
29     * Represents the uniqe id of table. It is used to represents the table
30     * uniquely across multiple select query.
31     */

32
33    private int uniqueID;
34
35    public TableInfo(QualifiedIdentifier tableName0, int uniqueID0, String JavaDoc aliasName) {
36       tableName = tableName0;
37       uniqueID = uniqueID0;
38    }
39
40    /**
41     * Returns the unique id of table.
42     * @return
43     * @throws DException
44     */

45
46    public int getUniqueID() throws DException {
47       return uniqueID;
48    }
49
50    /**
51     * Returns qualified name of table.
52     * @return
53     * @throws DException
54     */

55
56    public QualifiedIdentifier getIdentifier() throws DException {
57       return tableName;
58    }
59
60    public String JavaDoc toString() {
61       return tableName + " UNIQUE ID " + uniqueID;
62    }
63
64 }
65
Popular Tags