net.sf.saffron.opt
Class TableAccessMap

java.lang.Object
  |
  +--net.sf.saffron.opt.TableAccessMap

public class TableAccessMap
extends Object

TableAccessMap represents the tables accessed by a query plan, with READ/WRITE information.

Version:
$Id: //open/saffron/src/net/sf/saffron/opt/TableAccessMap.java#1 $
Author:
John V. Sichi

Nested Class Summary
private  class TableAccessMap.TableRelVisitor
           
 
Field Summary
private  Map accessMap
           
static String NO_ACCESS
          Table is not accessed at all.
static String READ_ACCESS
          Table is accessed for read only.
static String READWRITE_ACCESS
          Table is accessed for both read and write.
static String WRITE_ACCESS
          Table is accessed for write only.
 
Constructor Summary
TableAccessMap(SaffronRel rel)
          Construct a TableAccessMap for all tables accessed by a SaffronRel and its descendants.
 
Method Summary
 Set getAccessedTables()
          .
 String getTableAccessMode(SaffronTable table)
          Determine the access mode of a table.
 boolean isTableAccessed(SaffronTable table)
          Determine whether a table is accessed at all.
 boolean isTableAccessedForRead(SaffronTable table)
          Determine whether a table is accessed for read.
 boolean isTableAccessedForWrite(SaffronTable table)
          Determine whether a table is accessed for write.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accessMap

private Map accessMap

READ_ACCESS

public static final String READ_ACCESS
Table is accessed for read only.

See Also:
Constant Field Values

WRITE_ACCESS

public static final String WRITE_ACCESS
Table is accessed for write only.

See Also:
Constant Field Values

READWRITE_ACCESS

public static final String READWRITE_ACCESS
Table is accessed for both read and write.

See Also:
Constant Field Values

NO_ACCESS

public static final String NO_ACCESS
Table is not accessed at all.

See Also:
Constant Field Values
Constructor Detail

TableAccessMap

public TableAccessMap(SaffronRel rel)
Construct a TableAccessMap for all tables accessed by a SaffronRel and its descendants.

Parameters:
rel - the SaffronRel for which to build the map
Method Detail

isTableAccessed

public boolean isTableAccessed(SaffronTable table)
Determine whether a table is accessed at all.

Parameters:
table - the table of interest
Returns:
true if table is accessed

isTableAccessedForRead

public boolean isTableAccessedForRead(SaffronTable table)
Determine whether a table is accessed for read.

Parameters:
table - the table of interest
Returns:
true if table is accessed for read

isTableAccessedForWrite

public boolean isTableAccessedForWrite(SaffronTable table)
Determine whether a table is accessed for write.

Parameters:
table - the table of interest
Returns:
true if table is accessed for write

getTableAccessMode

public String getTableAccessMode(SaffronTable table)
Determine the access mode of a table.

Parameters:
table - the table of interest
Returns:
one of the _ACCESS constants

getAccessedTables

public Set getAccessedTables()
.

Returns:
an immutable set of all tables accessed

SourceForge.net_Logo