vortex
Class dbCursor

java.lang.Object
  extended by vortex.dbCursor

public class dbCursor
extends java.lang.Object

Logical RDBMS cursor object. A dbCursor is needed for each SQL statement that is to be processed. VORTEX will automatically map a logical cursor to an actual RDBMS cursor. This allows an application to allocate many more cursors than the underlying RDBMS actually can support.

A dbCursor has 2 close states: 'soft' or 'hard'. Normally an application closes a cursor in 'soft' mode. This means that the cursor is simple marked as closed on the client. When the dbCursor is used again VORTEX will determine if the cursor can be re-used without having to open (re-parse) the RDBMS cursor. This is a big performance boost. In a client/server environment the cursor cache becomes even more important as it cuts down the number of network roundtrips needed.

A LRU algorithm is used when 'soft' closed cursors need to be re-mapped.


Constructor Summary
dbCursor(dbChannel db)
          Allocate and initialize a standard (no blobs) dbCursor.
dbCursor(dbChannel db, boolean willInvolveBlobs)
          Allocate and initialize a dbCursor that may involve blobs.
dbCursor(dbChannel db, boolean willInvolveBlobs, boolean willInvolvePosUpd, boolean willBeScrollable)
          Allocate and initialize a dbCursor that may involve blobs or positioned updates or be scrollable.
 
Method Summary
 boolean endOfScan()
          Returns true if no more (fetch) data available This call is only valid after a fetch().
 dbDescriptor getColDesc(int columnIndex)
          Returns the dbDescriptor for an output columns.
 int getDbcur()
          Returns the actual dbcursor number.
 boolean getScroll()
          Returns true if this is a scrollable cursor.
 java.lang.String getSQL()
          Returns the SQL statement associated with this statement.
 java.lang.String getUpdateTable()
          Returns the name of the update table.
 int numOutputCols()
          Returns the number of output columns.
 void setParam(int row, int column, boolean isBinary, int blobLength)
          Set (bind) an BLOB/CLOB length parameter.
 void setParam(int row, int column, byte byteValue)
          Set (bind) a byte parameter.
 void setParam(int row, int column, byte[] byteValue)
          Set (bind) a byte parameter.
 void setParam(int row, int column, byte[] byteValue, int flag, java.lang.String name)
          Set (bind) a byte parameter.
 void setParam(int row, int column, byte byteValue, int flag, java.lang.String name)
          Set (bind) a byte parameter.
 void setParam(int row, int column, java.util.Date DateValue)
          Set (bind) a Date parameter.
 void setParam(int row, int column, java.util.Date DateValue, int flag, java.lang.String name)
          Set (bind) a Date parameter.
 void setParam(int row, int column, dbNumber dbNumberValue)
          Set (bind) a dbNumber parameter.
 void setParam(int row, int column, dbNumber dbNumberValue, int flag, java.lang.String name)
          Set (bind) a dbNumber parameter.
 void setParam(int row, int column, dbParam parameter)
          Set (bind) a dbParam parameter.
 void setParam(int row, int column, double doubleValue)
          Set (bind) a double parameter.
 void setParam(int row, int column, double doubleValue, int flag, java.lang.String name)
          Set (bind) a double parameter.
 void setParam(int row, int column, float floatValue)
          Set (bind) a float parameter.
 void setParam(int row, int column, float floatValue, int flag, java.lang.String name)
          Set (bind) a float parameter.
 void setParam(int row, int column, int intValue)
          Set (bind) an integer parameter.
 void setParam(int row, int column, int intValue, int flag, java.lang.String name)
          Set (bind) an integer parameter.
 void setParam(int row, int column, long longValue)
          Set (bind) a long parameter.
 void setParam(int row, int column, long longValue, int flag, java.lang.String name)
          Set (bind) a long parameter.
 void setParam(int row, int column, java.lang.String StringValue)
          Set (bind) a String parameter.
 void setParam(int row, int column, java.lang.String StringValue, int flag, java.lang.String name)
          Set (bind) a String parameter.
 void setParam(int row, int column, java.sql.Timestamp TSvalue)
          Set (bind) a Timestamp parameter.
 void setParam(int row, int column, java.sql.Timestamp TSvalue, int flag, java.lang.String name)
          Set (bind) a Timestamp parameter.
 void setUpdateTable(java.lang.String table)
          Sets the name of the update table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

dbCursor

public dbCursor(dbChannel db)
         throws dbException
Allocate and initialize a standard (no blobs) dbCursor.

Throws:
dbException

dbCursor

public dbCursor(dbChannel db,
                boolean willInvolveBlobs)
         throws dbException
Allocate and initialize a dbCursor that may involve blobs.

Throws:
dbException

dbCursor

public dbCursor(dbChannel db,
                boolean willInvolveBlobs,
                boolean willInvolvePosUpd,
                boolean willBeScrollable)
         throws dbException
Allocate and initialize a dbCursor that may involve blobs or positioned updates or be scrollable.

Throws:
dbException
Method Detail

setParam

public void setParam(int row,
                     int column,
                     dbParam parameter)
Set (bind) a dbParam parameter.


setParam

public void setParam(int row,
                     int column,
                     byte[] byteValue)
Set (bind) a byte parameter. Use (Byte)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     byte[] byteValue,
                     int flag,
                     java.lang.String name)
Set (bind) a byte parameter. Use (Byte)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     byte byteValue)
Set (bind) a byte parameter. Use (Byte)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     byte byteValue,
                     int flag,
                     java.lang.String name)
Set (bind) a byte parameter. Use (Byte)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     int intValue)
Set (bind) an integer parameter. Use (Int)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     int intValue,
                     int flag,
                     java.lang.String name)
Set (bind) an integer parameter. Use (Int)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     java.lang.String StringValue)
Set (bind) a String parameter. Use (String)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     java.lang.String StringValue,
                     int flag,
                     java.lang.String name)
Set (bind) a String parameter. Use (String)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     dbNumber dbNumberValue)
Set (bind) a dbNumber parameter. Use (dbNumber)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     dbNumber dbNumberValue,
                     int flag,
                     java.lang.String name)
Set (bind) a dbNumber parameter. Use (dbNumber)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     double doubleValue)
Set (bind) a double parameter. Use (double)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     double doubleValue,
                     int flag,
                     java.lang.String name)
Set (bind) a double parameter. Use (double)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     long longValue)
Set (bind) a long parameter. Use (long)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     long longValue,
                     int flag,
                     java.lang.String name)
Set (bind) a long parameter. Use (long)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     float floatValue)
Set (bind) a float parameter. Use (float)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     float floatValue,
                     int flag,
                     java.lang.String name)
Set (bind) a float parameter. Use (float)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     java.util.Date DateValue)
Set (bind) a Date parameter. Use (Date)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     java.util.Date DateValue,
                     int flag,
                     java.lang.String name)
Set (bind) a Date parameter. Use (Date)null to pass a NULL value to the RDBMS.


setParam

public void setParam(int row,
                     int column,
                     boolean isBinary,
                     int blobLength)
Set (bind) an BLOB/CLOB length parameter.


setParam

public void setParam(int row,
                     int column,
                     java.sql.Timestamp TSvalue)
Set (bind) a Timestamp parameter.


setParam

public void setParam(int row,
                     int column,
                     java.sql.Timestamp TSvalue,
                     int flag,
                     java.lang.String name)
Set (bind) a Timestamp parameter.


endOfScan

public boolean endOfScan()
Returns true if no more (fetch) data available This call is only valid after a fetch().


numOutputCols

public int numOutputCols()
Returns the number of output columns. This call is only valid after a fetch().


getColDesc

public dbDescriptor getColDesc(int columnIndex)
Returns the dbDescriptor for an output columns. This call is only valid after a fetch().


setUpdateTable

public void setUpdateTable(java.lang.String table)
Sets the name of the update table.


getUpdateTable

public java.lang.String getUpdateTable()
Returns the name of the update table. This call is only valid after a setUpdateTable().


getDbcur

public int getDbcur()
Returns the actual dbcursor number.


getScroll

public boolean getScroll()
Returns true if this is a scrollable cursor.


getSQL

public java.lang.String getSQL()
Returns the SQL statement associated with this statement.



Updated May 06 2016