saffron.ext
Class JdbcTable

java.lang.Object
  |
  +--saffron.ext.AbstractTable
        |
        +--saffron.ext.JdbcTable
All Implemented Interfaces:
ImplementableTable, Table

public class JdbcTable
extends AbstractTable
implements ImplementableTable

A JdbcTable implements Table by connecting to a JDBC database.

Since:
10 November, 2001
Version:
$Id: //open/saffron/src/main/saffron/ext/JdbcTable.java#5 $
Author:
jhyde

Nested Class Summary
static class JdbcTable.JdbcColumn
          JdbcColumn records the mapping of fields onto columns, for the purposes of SQL generation.
 
Field Summary
(package private)  JdbcTable.JdbcColumn[] columns
           
 
Fields inherited from class saffron.ext.AbstractTable
name, rowType, schema
 
Constructor Summary
JdbcTable(Schema schema, String name, Type rowType)
           
JdbcTable(Schema schema, String name, Type rowType, JdbcTable.JdbcColumn[] columns)
           
 
Method Summary
 JdbcTable.JdbcColumn getColumn(String fieldName)
          Returns the column that the named field maps to.
 void implement(Rel rel, Implementor implementor)
           
 Rel toRel(Cluster cluster, Expression connectionExp)
          Converts this table into a relational expression.
 
Methods inherited from class saffron.ext.AbstractTable
getName, getQualifiedName, getRowCount, getRowType, getSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface saffron.Table
getQualifiedName, getRowCount, getRowType, getSchema
 

Field Detail

columns

JdbcTable.JdbcColumn[] columns
Constructor Detail

JdbcTable

public JdbcTable(Schema schema,
                 String name,
                 Type rowType,
                 JdbcTable.JdbcColumn[] columns)

JdbcTable

public JdbcTable(Schema schema,
                 String name,
                 Type rowType)
Method Detail

toRel

public Rel toRel(Cluster cluster,
                 Expression connectionExp)
Description copied from interface: Table
Converts this table into a relational expression. This relational expression can then be optimized by applying rules to transform it into other access methods for this table.

Specified by:
toRel in interface Table
Parameters:
cluster - the cluster this Rel will belong to
connectionExp - the parse tree of the expression which evaluates to a connection object

getColumn

public JdbcTable.JdbcColumn getColumn(String fieldName)
Returns the column that the named field maps to.


implement

public void implement(Rel rel,
                      Implementor implementor)
Specified by:
implement in interface ImplementableTable

SourceForge.net_Logo