saffron.ext
Class ObjectTable

java.lang.Object
  |
  +--saffron.ext.ObjectTable
All Implemented Interfaces:
Table

public class ObjectTable
extends Object
implements Table

ObjectTable is a component of an ObjectSchema.

Since:
8 February, 2002
Version:
$Id: //open/saffron/src/main/saffron/ext/ObjectTable.java#3 $
Author:
jhyde

Field Summary
private  Type rowType
           
private  Schema schema
           
 
Constructor Summary
ObjectTable(Schema schema, Type rowType)
           
 
Method Summary
 void addAccessor(String fieldName, String schemaMethodName)
          Records the fact that there is another way to access that a field access or method call.
 String getQualifiedName()
          Obtain an identifier for this table.
 double getRowCount()
          Returns an estimate of the number of rows in the table.
 Type getRowType()
          Describes the type of rows returned by this table.
 Schema getSchema()
          Returns the Schema this table belongs to.
 Rel toRel(Cluster cluster, Expression connectionExp)
          Converts this table into a relational expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schema

private final Schema schema

rowType

private final Type rowType
Constructor Detail

ObjectTable

public ObjectTable(Schema schema,
                   Type rowType)
Method Detail

getSchema

public Schema getSchema()
Description copied from interface: Table
Returns the Schema this table belongs to.

Specified by:
getSchema in interface Table

getRowType

public Type getRowType()
Description copied from interface: Table
Describes the type of rows returned by this table.

Specified by:
getRowType in interface Table

getQualifiedName

public String getQualifiedName()
Description copied from interface: Table
Obtain an identifier for this table. The identifier must be unique with respect to the Connection producing this table.

Specified by:
getQualifiedName in interface Table
Returns:
qualified name

getRowCount

public double getRowCount()
Description copied from interface: Table
Returns an estimate of the number of rows in the table.

Specified by:
getRowCount in interface Table

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

addAccessor

public void addAccessor(String fieldName,
                        String schemaMethodName)
Records the fact that there is another way to access that a field access or method call. For example, "select from classes as c where c.getName().equals(x)" is the same as "schema.classForName(x)".


SourceForge.net_Logo