simpledb.query
Interface Scan

All Known Subinterfaces:
UpdateScan
All Known Implementing Classes:
ChunkScan, GroupByScan, IndexJoinScan, IndexSelectScan, MergeJoinScan, MultiBufferProductScan, ProductScan, ProjectScan, SelectScan, SortScan, TableScan

public interface Scan

The interface will be implemented by each query scan. There is a Scan class for each relational algebra operator.

Author:
Edward Sciore

Method Summary
 void beforeFirst()
          Positions the scan before its first record.
 void close()
          Closes the scan and its subscans, if any.
 int getInt(String fldname)
          Returns the value of the specified integer field in the current record.
 String getString(String fldname)
          Returns the value of the specified string field in the current record.
 Constant getVal(String fldname)
          Returns the value of the specified field in the current record.
 boolean hasField(String fldname)
          Returns true if the scan has the specified field.
 boolean next()
          Moves the scan to the next record.
 

Method Detail

beforeFirst

void beforeFirst()
Positions the scan before its first record.


next

boolean next()
Moves the scan to the next record.

Returns:
false if there is no next record

close

void close()
Closes the scan and its subscans, if any.


getVal

Constant getVal(String fldname)
Returns the value of the specified field in the current record. The value is expressed as a Constant.

Parameters:
fldname - the name of the field
Returns:
the value of that field, expressed as a Constant.

getInt

int getInt(String fldname)
Returns the value of the specified integer field in the current record.

Parameters:
fldname - the name of the field
Returns:
the field's integer value in the current record

getString

String getString(String fldname)
Returns the value of the specified string field in the current record.

Parameters:
fldname - the name of the field
Returns:
the field's string value in the current record

hasField

boolean hasField(String fldname)
Returns true if the scan has the specified field.

Parameters:
fldname - the name of the field
Returns:
true if the scan has that field


Copyright © 2011. All Rights Reserved.