| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectheap.Scan
A Scan object is created ONLY through the function openScan of a HeapFile. It supports the getNext interface which will simply retrieve the next record in the heapfile. An object of type scan will always have pinned one directory page of the heapfile.
| Field Summary | 
| Fields inherited from interface global.GlobalConst | 
INVALID_PAGE, MAX_NAME, MAX_SPACE, MAXATTRNAME, MAXFILENAME, MAXINDEXNAME, MINIBASE_BUFFER_POOL_SIZE, MINIBASE_DB_SIZE, MINIBASE_DEFAULT_SHAREDMEM_SIZE, MINIBASE_MAX_TRANSACTIONS, MINIBASE_MAXARRSIZE, MINIBASE_PAGESIZE, NUMBUF | 
| Constructor Summary | |
Scan(Heapfile hf)
The constructor pins the first directory page in the file and initializes its private data members from the private data member from hf  | 
|
| Method Summary | |
 void | 
closescan()
Closes the Scan object  | 
 Tuple | 
getNext(RID rid)
Retrieve the next record in a sequential scan  | 
 boolean | 
position(RID rid)
Position the scan cursor to the record with the given rid.  | 
| Methods inherited from class java.lang.Object | 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Scan(Heapfile hf)
     throws InvalidTupleSizeException,
            java.io.IOException
hf - A HeapFile object
InvalidTupleSizeException - Invalid tuple size
java.io.IOException - I/O errors| Method Detail | 
public Tuple getNext(RID rid)
              throws InvalidTupleSizeException,
                     java.io.IOException
rid - Record ID of the record
InvalidTupleSizeException - Invalid tuple size
java.io.IOException - I/O errors
public boolean position(RID rid)
                 throws InvalidTupleSizeException,
                        java.io.IOException
rid - Record ID of the given record
InvalidTupleSizeException - Invalid tuple size
java.io.IOException - I/O errorspublic void closescan()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||