net.sf.farrago.query
Class FarragoQueryNamedColumnSet

java.lang.Object
  extended by org.eigenbase.relopt.RelOptAbstractTable
      extended by net.sf.farrago.query.FarragoQueryNamedColumnSet
All Implemented Interfaces:
FarragoMedColumnSet, FarragoQueryColumnSet, RelOptTable, SqlValidatorTable
Direct Known Subclasses:
FarragoView

public abstract class FarragoQueryNamedColumnSet
extends RelOptAbstractTable
implements FarragoQueryColumnSet

An abstract base for implementations of RelOptTable which access data described by Farrago's catalog.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/query/FarragoQueryNamedColumnSet.java#18 $
Author:
John V. Sichi

Field Summary
private  SqlAccessType allowedAccess
          Allowed access
private  CwmNamedColumnSet cwmColumnSet
          Catalog definition of column set.
private  FarragoPreparingStmt preparingStmt
          Refinement for RelOptAbstractTable.schema.
 
Fields inherited from class org.eigenbase.relopt.RelOptAbstractTable
name, rowType, schema
 
Constructor Summary
FarragoQueryNamedColumnSet(CwmNamedColumnSet cwmColumnSet, RelDataType rowType)
          Creates a new FarragoQueryNamedColumnSet object.
 
Method Summary
 SqlAccessType getAllowedAccess()
          Returns the access type of the table
 CwmNamedColumnSet getCwmColumnSet()
           
 SqlMonotonicity getMonotonicity(String columnName)
          Returns whether a given column is monotonic.
 FarragoPreparingStmt getPreparingStmt()
           
 String[] getQualifiedName()
          Obtains an identifier for this table.
 void setCwmColumnSet(CwmNamedColumnSet cwmColumnSet)
          Sets the CwmNamedColumnSet corresponding to this column set.
 void setPreparingStmt(FarragoPreparingStmt stmt)
          Sets the FarragoPreparingStmt acting on this column set.
 
Methods inherited from class org.eigenbase.relopt.RelOptAbstractTable
getCollationList, getName, getRelOptSchema, getRowCount, getRowType, setRowType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eigenbase.relopt.RelOptTable
getCollationList, getRelOptSchema, getRowCount, getRowType, toRel
 
Methods inherited from interface org.eigenbase.sql.validate.SqlValidatorTable
getRowType
 

Field Detail

cwmColumnSet

private CwmNamedColumnSet cwmColumnSet
Catalog definition of column set.


preparingStmt

private FarragoPreparingStmt preparingStmt
Refinement for RelOptAbstractTable.schema.


allowedAccess

private SqlAccessType allowedAccess
Allowed access

Constructor Detail

FarragoQueryNamedColumnSet

FarragoQueryNamedColumnSet(CwmNamedColumnSet cwmColumnSet,
                           RelDataType rowType)
Creates a new FarragoQueryNamedColumnSet object.

Parameters:
cwmColumnSet - catalog definition for column set
rowType - type for rows stored in column set
Method Detail

getQualifiedName

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

Specified by:
getQualifiedName in interface RelOptTable
Specified by:
getQualifiedName in interface SqlValidatorTable
Overrides:
getQualifiedName in class RelOptAbstractTable
Returns:
qualified name

getMonotonicity

public SqlMonotonicity getMonotonicity(String columnName)
Description copied from interface: SqlValidatorTable
Returns whether a given column is monotonic.

Specified by:
getMonotonicity in interface SqlValidatorTable

getAllowedAccess

public SqlAccessType getAllowedAccess()
Description copied from interface: SqlValidatorTable
Returns the access type of the table

Specified by:
getAllowedAccess in interface SqlValidatorTable

getPreparingStmt

public FarragoPreparingStmt getPreparingStmt()
Specified by:
getPreparingStmt in interface FarragoQueryColumnSet
Returns:
the FarragoPreparingStmt acting on this column set

setPreparingStmt

public void setPreparingStmt(FarragoPreparingStmt stmt)
Description copied from interface: FarragoQueryColumnSet
Sets the FarragoPreparingStmt acting on this column set.

Specified by:
setPreparingStmt in interface FarragoQueryColumnSet
Parameters:
stmt - the FarragoPreparingStmt to set

setCwmColumnSet

public void setCwmColumnSet(CwmNamedColumnSet cwmColumnSet)
Description copied from interface: FarragoQueryColumnSet
Sets the CwmNamedColumnSet corresponding to this column set.

Specified by:
setCwmColumnSet in interface FarragoQueryColumnSet
Parameters:
cwmColumnSet - the CwmNamedColumnSet, or null if this column set is not defined in the catalog

getCwmColumnSet

public CwmNamedColumnSet getCwmColumnSet()
Specified by:
getCwmColumnSet in interface FarragoQueryColumnSet
Returns:
the CwmNamedColumnSet corresponding to this column set