KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mckoi > database > TableQueryDef


1 /**
2  * com.mckoi.database.TableQueryDef 23 Aug 2002
3  *
4  * Mckoi SQL Database ( http://www.mckoi.com/database )
5  * Copyright (C) 2000, 2001, 2002 Diehl and Associates, Inc.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * Version 2 as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License Version 2 for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * Version 2 along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  *
20  * Change Log:
21  *
22  *
23  */

24
25 package com.mckoi.database;
26
27 /**
28  * An interface to an object that describes characteristics of a table based
29  * object in the database. This can represent anything that evaluates to a
30  * Table when the query plan is evaluated. It is used to represent data tables
31  * and views.
32  * <p>
33  * This object is used by the planner to see ahead of time what sort of table
34  * we are dealing with. For example, a view is stored with a DataTableDef
35  * describing the resultant columns, and the QueryPlanNode to produce the
36  * view result. The query planner requires the information in DataTableDef
37  * to resolve references in the query, and the QueryPlanNode to add into the
38  * resultant plan tree.
39  *
40  * @author Tobias Downer
41  */

42
43 public interface TableQueryDef {
44
45   /**
46    * Returns an immutable DataTableDef object that describes the columns in this
47    * table source, and the name of the table.
48    */

49   DataTableDef getDataTableDef();
50   
51   /**
52    * Returns a QueryPlanNode that can be put into a plan tree and can be
53    * evaluated to find the result of the table. This method should always
54    * return a new object representing the query plan.
55    */

56   QueryPlanNode getQueryPlanNode();
57
58 }
59
60
Popular Tags