Quadcap Embeddable Database

com.quadcap.sql.ViewCursor Class Reference

Inheritance diagram for com.quadcap.sql.ViewCursor:

com.quadcap.sql.CursorImpl com.quadcap.sql.TupleImpl com.quadcap.sql.Cursor com.quadcap.sql.Tuple Externalizable com.quadcap.sql.Tuple List of all members.

Detailed Description

This cursor performs the name mapping associated with the (optional) column list of the CREATE VIEW statement.

Author:
Stan Bailes

Definition at line 60 of file ViewCursor.java.

Public Member Functions

 ViewCursor (Session session, View view, Cursor cursor, Vector names) throws SQLException
long size () throws SQLException
 If the underlying implementation knows, or can compute cheaply, the actual size of the ResultSet, it should return a non-negative number here.

Row getRow () throws SQLException
 Derived class implements this function to return the current cursor row.

void updateRow (Row row) throws SQLException
 Replace the current cursor row with the specified row.

void insertRow (Row row) throws SQLException
 Handle insert.

void deleteRow () throws SQLException
 Delete the current cursor row.

void beforeFirst () throws SQLException
 Position the cursor before the first row.

void afterLast () throws SQLException
 Position the cursor after the last row.

boolean absolute (int row) throws SQLException
 Position the cursor to the specified absolute row.

boolean next () throws SQLException
 Advance the cursor and return true if we advanced to a valid row.

boolean isWritable (int column) throws SQLException
 Return true if the specified column is writable.

int getColumnCount () throws SQLException
 Return the number of columns in this tuple.

void close () throws SQLException
 Close the cursor and free up any resources (including closing the cursor's transaction if that is feasible) used by the cursor.


Package Attributes

Cursor cursor
View view


Constructor & Destructor Documentation

com.quadcap.sql.ViewCursor.ViewCursor Session  session,
View  view,
Cursor  cursor,
Vector  names
throws SQLException
 

Definition at line 64 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, com.quadcap.sql.Tuple.getColumn(), com.quadcap.sql.Tuple.getColumnCount(), com.quadcap.sql.TupleImpl.getName(), com.quadcap.sql.Column.getType(), com.quadcap.sql.TupleImpl.resolveColumns(), and com.quadcap.sql.ViewCursor.view.


Member Function Documentation

boolean com.quadcap.sql.ViewCursor.absolute int  row  )  throws SQLException
 

Position the cursor to the specified absolute row.

The first row is row '1', and the last row is '-1', as in JDBC.

Reimplemented from com.quadcap.sql.CursorImpl.

Definition at line 124 of file ViewCursor.java.

References com.quadcap.sql.Cursor.absolute(), com.quadcap.sql.ViewCursor.absolute(), and com.quadcap.sql.ViewCursor.cursor.

Referenced by com.quadcap.sql.ViewCursor.absolute().

void com.quadcap.sql.ViewCursor.afterLast  )  throws SQLException [virtual]
 

Position the cursor after the last row.

Implements com.quadcap.sql.CursorImpl.

Definition at line 120 of file ViewCursor.java.

References com.quadcap.sql.Cursor.afterLast(), and com.quadcap.sql.ViewCursor.cursor.

void com.quadcap.sql.ViewCursor.beforeFirst  )  throws SQLException [virtual]
 

Position the cursor before the first row.

Implements com.quadcap.sql.CursorImpl.

Definition at line 116 of file ViewCursor.java.

References com.quadcap.sql.Cursor.beforeFirst(), and com.quadcap.sql.ViewCursor.cursor.

void com.quadcap.sql.ViewCursor.close  )  throws SQLException [virtual]
 

Close the cursor and free up any resources (including closing the cursor's transaction if that is feasible) used by the cursor.

Exceptions:
SQLException may be thrown

Implements com.quadcap.sql.CursorImpl.

Definition at line 139 of file ViewCursor.java.

References com.quadcap.sql.Cursor.close(), and com.quadcap.sql.ViewCursor.cursor.

void com.quadcap.sql.ViewCursor.deleteRow  )  throws SQLException [virtual]
 

Delete the current cursor row.

Implements com.quadcap.sql.CursorImpl.

Definition at line 112 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, and com.quadcap.sql.Cursor.deleteRow().

int com.quadcap.sql.ViewCursor.getColumnCount  )  throws SQLException
 

Return the number of columns in this tuple.

Reimplemented from com.quadcap.sql.TupleImpl.

Definition at line 136 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, and com.quadcap.sql.Tuple.getColumnCount().

Row com.quadcap.sql.ViewCursor.getRow  )  throws SQLException [virtual]
 

Derived class implements this function to return the current cursor row.

Implementation required.

Implements com.quadcap.sql.CursorImpl.

Definition at line 98 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, and com.quadcap.sql.Cursor.getRow().

void com.quadcap.sql.ViewCursor.insertRow Row  row  )  throws SQLException
 

Handle insert.

Reimplemented from com.quadcap.sql.CursorImpl.

Definition at line 107 of file ViewCursor.java.

References com.quadcap.sql.View.checkRow(), com.quadcap.sql.ViewCursor.cursor, com.quadcap.sql.Cursor.insertRow(), com.quadcap.sql.ViewCursor.insertRow(), and com.quadcap.sql.ViewCursor.view.

Referenced by com.quadcap.sql.ViewCursor.insertRow().

boolean com.quadcap.sql.ViewCursor.isWritable int  column  )  throws SQLException [virtual]
 

Return true if the specified column is writable.

Parameters:
column the (one-based) column number
Exceptions:
SQLException may be thrown

Implements com.quadcap.sql.CursorImpl.

Definition at line 132 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, com.quadcap.sql.Cursor.isWritable(), and com.quadcap.sql.ViewCursor.isWritable().

Referenced by com.quadcap.sql.ViewCursor.isWritable().

boolean com.quadcap.sql.ViewCursor.next  )  throws SQLException [virtual]
 

Advance the cursor and return true if we advanced to a valid row.

Implements com.quadcap.sql.CursorImpl.

Definition at line 128 of file ViewCursor.java.

References com.quadcap.sql.ViewCursor.cursor, and com.quadcap.sql.Cursor.next().

long com.quadcap.sql.ViewCursor.size  )  throws SQLException
 

If the underlying implementation knows, or can compute cheaply, the actual size of the ResultSet, it should return a non-negative number here.

If the size is unknown and it would be expensive to compute it (i.e., on the order of while next()) size++), then the implementation should return -1

Implements com.quadcap.sql.Cursor.

Definition at line 96 of file ViewCursor.java.

void com.quadcap.sql.ViewCursor.updateRow Row  row  )  throws SQLException [virtual]
 

Replace the current cursor row with the specified row.

Implements com.quadcap.sql.CursorImpl.

Definition at line 102 of file ViewCursor.java.

References com.quadcap.sql.View.checkRow(), com.quadcap.sql.ViewCursor.cursor, com.quadcap.sql.Cursor.updateRow(), com.quadcap.sql.ViewCursor.updateRow(), and com.quadcap.sql.ViewCursor.view.

Referenced by com.quadcap.sql.ViewCursor.updateRow().


Member Data Documentation

Cursor com.quadcap.sql.ViewCursor.cursor [package]
 

Definition at line 61 of file ViewCursor.java.

Referenced by com.quadcap.sql.ViewCursor.absolute(), com.quadcap.sql.ViewCursor.afterLast(), com.quadcap.sql.ViewCursor.beforeFirst(), com.quadcap.sql.ViewCursor.close(), com.quadcap.sql.ViewCursor.deleteRow(), com.quadcap.sql.ViewCursor.getColumnCount(), com.quadcap.sql.ViewCursor.getRow(), com.quadcap.sql.ViewCursor.insertRow(), com.quadcap.sql.ViewCursor.isWritable(), com.quadcap.sql.ViewCursor.next(), com.quadcap.sql.ViewCursor.updateRow(), and com.quadcap.sql.ViewCursor.ViewCursor().

View com.quadcap.sql.ViewCursor.view [package]
 

Definition at line 62 of file ViewCursor.java.

Referenced by com.quadcap.sql.ViewCursor.insertRow(), com.quadcap.sql.ViewCursor.updateRow(), and com.quadcap.sql.ViewCursor.ViewCursor().