iterator
Class FileScan

java.lang.Object
  extended byiterator.Iterator
      extended byiterator.FileScan
All Implemented Interfaces:
Flags

public class FileScan
extends Iterator

open a heapfile and according to the condition expression to get output file, call get_next to get all tuples


Field Summary
 FldSpec[] perm_mat
           
 
Fields inherited from class iterator.Iterator
closeFlag
 
Fields inherited from interface global.Flags
DEBUG, TEST
 
Constructor Summary
FileScan(java.lang.String file_name, AttrType[] in1, short[] s1_sizes, short len_in1, int n_out_flds, FldSpec[] proj_list, CondExpr[] outFilter)
          constructor
 
Method Summary
 void close()
          implement the abstract method close() from super class Iterator to finish cleaning up
 Tuple get_next()
          abstract method, every subclass must implement it.
 FldSpec[] show()
           
 
Methods inherited from class iterator.Iterator
free_buffer_pages, get_buffer_pages
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

perm_mat

public FldSpec[] perm_mat
Constructor Detail

FileScan

public FileScan(java.lang.String file_name,
                AttrType[] in1,
                short[] s1_sizes,
                short len_in1,
                int n_out_flds,
                FldSpec[] proj_list,
                CondExpr[] outFilter)
         throws java.io.IOException,
                FileScanException,
                TupleUtilsException,
                InvalidRelation
constructor

Parameters:
file_name - heapfile to be opened
len_in1 - number of attributes in the input tuple
n_out_flds - number of fields in the out tuple
proj_list - shows what input fields go where in the output tuple
outFilter - select expressions
Throws:
java.io.IOException - some I/O fault
FileScanException - exception from this class
TupleUtilsException - exception from this class
InvalidRelation - invalid relation
Method Detail

show

public FldSpec[] show()
Returns:
shows what input fields go where in the output tuple

get_next

public Tuple get_next()
               throws JoinsException,
                      java.io.IOException,
                      InvalidTupleSizeException,
                      InvalidTypeException,
                      PageNotReadException,
                      PredEvalException,
                      UnknowAttrType,
                      FieldNumberOutOfBoundException,
                      WrongPermat
Description copied from class: Iterator
abstract method, every subclass must implement it.

Specified by:
get_next in class Iterator
Returns:
the result tuple
Throws:
JoinsException - some join exception
java.io.IOException - I/O errors
InvalidTupleSizeException - invalid tuple size
InvalidTypeException - tuple type not valid
PageNotReadException - exception from lower layer
PredEvalException - exception from PredEval class
UnknowAttrType - attribute type unknown
FieldNumberOutOfBoundException - array out of bounds
WrongPermat - exception for wrong FldSpec argument

close

public void close()
implement the abstract method close() from super class Iterator to finish cleaning up

Specified by:
close in class Iterator