Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tripi.asp.ADODB
Class RecordSet  view RecordSet download RecordSet.java

java.lang.Object
  extended bycom.tripi.asp.ADODB.RecordSet
All Implemented Interfaces:
com.tripi.asp.SimpleMap

public class RecordSet
extends java.lang.Object
implements com.tripi.asp.SimpleMap

This class implements the ADODB.RecordSet object. RecordSet Implementation status:

ADODB.Field implementation status:


Nested Class Summary
 class RecordSet.Field
          This class implements the ADODB.Fields records.
 class RecordSet.FieldsMap
          This class represents a mapping from a field name/index to a ADODB.Fields record
static class RecordSet.UniqueIdentifierObj
           
 
Field Summary
protected  Command _ActiveCommand
          Internal variable to store the active command
protected  Connection _ActiveConnection
          Internal variable to store the active connection
protected  java.lang.String _ActiveSQL
          Internal variable used to re-query the SQL
 boolean BOF
          ASP - Accessible BOF marker
 int CacheSize
          Size for caching
(package private)  java.util.Hashtable columnNames
          Hashtable mapping column names to index.
 int CursorLocation
          Where is the cursor, server or client?
 int CursorType
          Type of cursor
(package private) static org.apache.log4j.Category DBG
          Debugging category
 boolean EOF
          ASP - Accessible EOF marker
 RecordSet.FieldsMap Fields
          ASP - Accessible fields array
(package private)  boolean hasNoElements
          This variable is marked true when there are no results in the query
(package private)  boolean isOnInsertRow
          This variable is marked true when the query is currently on the insert row
(package private)  boolean ownConnection
          This flag is true if we opened the connection through RS.Open
 int PageSize
          Size for paging
(package private)  java.sql.ResultSet rs
          Active record set, null if no active RS
(package private)  java.sql.ResultSetMetaData rsmd
          Meta data for the query
(package private)  java.sql.Statement stmt
          Active statement, null if no active statement
 
Constructor Summary
RecordSet()
          Constructor with no parameters.
 
Method Summary
 int AbsolutePage()
          ASP-Accessible function to return cursor page.
 int AbsolutePosition()
          ASP-Accessible function to return the cursor position.
 void AbsolutePosition(int pos)
          ASP-Accessible function to set the cursor position.
 java.lang.Object ActiveCommand()
          ASP-Accessible function
 java.lang.String ActiveConnection()
          ASP-Accessible function
 void AddNew()
          ASP-Accessible function to add a new row.
 void AddNew(java.lang.Object[] fields, java.lang.Object[] values)
          ASP-Accessible function to add a new row with predefined values.
 void CancelUpdate()
          ASP-Accessible function to cancel any pending updates.
 void Close()
          ASP-Accessible function to close the record set.
 java.lang.Object get(java.lang.Object key)
          SimpleMap function to obtain the value of the record at the specified index.
private  void getColumnNames()
          Internal function which obtains the column names from the result set.
 java.util.Enumeration getKeys()
          SimpleMap function to obtain the keys in the record, effectivly the column names.
 com.tripi.asp.ArrayNode GetRows()
          ASP-Accessible function to obtain a set of rows in an array.
 com.tripi.asp.ArrayNode GetRows(int rows)
          ASP-Accessible function to obtain a set of rows in an array.
 void Move(int numRows)
          ASP-Accessible function to move by the specified number of rows.
 void MoveFirst()
          ASP-Accessible function to move to the first row.
 void MoveLast()
          ASP-Accessible function to move to the last row.
 void MoveNext()
          ASP-Accessible function to move to the next row.
 void MovePrevious()
          ASP-Accessible function to move back one row.
 void OnPageEnd(java.lang.Object ignoreme)
          Internal function called on page end.
 int Open(Command command)
          Open a result set, based on the specified command object.
 int Open(Command command, java.lang.Object a, int b, int c)
          Open a result set, based on the specified command object.
 int Open(Command command, java.lang.Object a, int b, int c, int d)
          Open a result set, based on the specified command object.
 boolean Open(java.lang.String sql, Connection con)
          Open a result set, based on the specified connection object.
 boolean Open(java.lang.String sql, Connection con, int type)
          Open a result set, based on the specified connection object, with a specified lock type.
 boolean Open(java.lang.String sql, Connection con, int type, int lock)
          Open a result set, based on the specified connection object, with a specified cursor type, and specified lock semantics.
 boolean Open(java.lang.String sql, Connection con, int type, int lock, int flag)
          Open a result set, based on the specified connection object, with a specified cursor type, and specified lock semantics.
 boolean Open(java.lang.String sql, java.lang.String DSN)
          Open a connection, based on a string DSN.
 boolean Open(java.lang.String sql, java.lang.String DSN, int type)
          Open a connection, based on a string DSN, with a specified cursor type.
 boolean Open(java.lang.String sql, java.lang.String DSN, int type, int lock)
          Open a connection, based on a string DSN, with a specified cursor type.
 int PageCount()
          ASP-Accessible function to obtain the number of pages in the query
 void put(java.lang.Object key, java.lang.Object value)
          SimpleMap function to set the value of the record at the specified index.
 int RecordCount()
          ASP-Accessible function to obtain the number of records in the query.
 void Requery()
          ASP-Accessible function to requery the database.
protected  void setCommand(Command com)
          Internal function to set the active command.
protected  void setConnection(Connection con)
          Internal function to set the active connection.
protected  void setResultSet(java.sql.ResultSet rs)
          Internal function to set the active result set
protected  void setStatement(java.sql.Statement stmt)
          Internal function to set the active statement.
 void Update()
          ASP-Accessible function to update all pending changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DBG

static org.apache.log4j.Category DBG
Debugging category


rs

java.sql.ResultSet rs
Active record set, null if no active RS


stmt

java.sql.Statement stmt
Active statement, null if no active statement


rsmd

java.sql.ResultSetMetaData rsmd
Meta data for the query


columnNames

java.util.Hashtable columnNames
Hashtable mapping column names to index.


hasNoElements

boolean hasNoElements
This variable is marked true when there are no results in the query


isOnInsertRow

boolean isOnInsertRow
This variable is marked true when the query is currently on the insert row


ownConnection

boolean ownConnection
This flag is true if we opened the connection through RS.Open


Fields

public RecordSet.FieldsMap Fields
ASP - Accessible fields array


EOF

public boolean EOF
ASP - Accessible EOF marker


BOF

public boolean BOF
ASP - Accessible BOF marker


CursorLocation

public int CursorLocation
Where is the cursor, server or client?


CursorType

public int CursorType
Type of cursor


PageSize

public int PageSize
Size for paging


CacheSize

public int CacheSize
Size for caching


_ActiveSQL

protected java.lang.String _ActiveSQL
Internal variable used to re-query the SQL


_ActiveConnection

protected Connection _ActiveConnection
Internal variable to store the active connection


_ActiveCommand

protected Command _ActiveCommand
Internal variable to store the active command

Constructor Detail

RecordSet

public RecordSet()
Constructor with no parameters.

Method Detail

ActiveConnection

public java.lang.String ActiveConnection()
ASP-Accessible function


ActiveCommand

public java.lang.Object ActiveCommand()
ASP-Accessible function


setConnection

protected void setConnection(Connection con)
Internal function to set the active connection.


setCommand

protected void setCommand(Command com)
Internal function to set the active command.


setStatement

protected void setStatement(java.sql.Statement stmt)
Internal function to set the active statement.


setResultSet

protected void setResultSet(java.sql.ResultSet rs)
                     throws com.tripi.asp.AspException
Internal function to set the active result set


getColumnNames

private void getColumnNames()
                     throws com.tripi.asp.AspException
Internal function which obtains the column names from the result set.


MoveNext

public void MoveNext()
              throws com.tripi.asp.AspException
ASP-Accessible function to move to the next row.


MoveFirst

public void MoveFirst()
               throws com.tripi.asp.AspException
ASP-Accessible function to move to the first row.


MovePrevious

public void MovePrevious()
                  throws com.tripi.asp.AspException
ASP-Accessible function to move back one row.


MoveLast

public void MoveLast()
              throws com.tripi.asp.AspException
ASP-Accessible function to move to the last row.


Move

public void Move(int numRows)
          throws com.tripi.asp.AspException
ASP-Accessible function to move by the specified number of rows.


Open

public boolean Open(java.lang.String sql,
                    java.lang.String DSN)
             throws com.tripi.asp.AspException
Open a connection, based on a string DSN.


Open

public boolean Open(java.lang.String sql,
                    java.lang.String DSN,
                    int type)
             throws com.tripi.asp.AspException
Open a connection, based on a string DSN, with a specified cursor type.


Open

public boolean Open(java.lang.String sql,
                    java.lang.String DSN,
                    int type,
                    int lock)
             throws com.tripi.asp.AspException
Open a connection, based on a string DSN, with a specified cursor type. and a specified lock type.


Open

public boolean Open(java.lang.String sql,
                    Connection con)
             throws com.tripi.asp.AspException
Open a result set, based on the specified connection object.


Open

public boolean Open(java.lang.String sql,
                    Connection con,
                    int type)
             throws com.tripi.asp.AspException
Open a result set, based on the specified connection object, with a specified lock type.


Open

public boolean Open(java.lang.String sql,
                    Connection con,
                    int type,
                    int lock)
             throws com.tripi.asp.AspException
Open a result set, based on the specified connection object, with a specified cursor type, and specified lock semantics.


Open

public boolean Open(java.lang.String sql,
                    Connection con,
                    int type,
                    int lock,
                    int flag)
             throws com.tripi.asp.AspException
Open a result set, based on the specified connection object, with a specified cursor type, and specified lock semantics.


Open

public int Open(Command command)
         throws com.tripi.asp.AspException
Open a result set, based on the specified command object.


Open

public int Open(Command command,
                java.lang.Object a,
                int b,
                int c)
         throws com.tripi.asp.AspException
Open a result set, based on the specified command object. TODO Figure out these parameters.


Open

public int Open(Command command,
                java.lang.Object a,
                int b,
                int c,
                int d)
         throws com.tripi.asp.AspException
Open a result set, based on the specified command object. TODO Figure out these parameters.


Requery

public void Requery()
             throws com.tripi.asp.AspException
ASP-Accessible function to requery the database.


AddNew

public void AddNew()
            throws com.tripi.asp.AspException
ASP-Accessible function to add a new row.


AddNew

public void AddNew(java.lang.Object[] fields,
                   java.lang.Object[] values)
            throws com.tripi.asp.AspException
ASP-Accessible function to add a new row with predefined values.


AbsolutePosition

public int AbsolutePosition()
                     throws com.tripi.asp.AspException
ASP-Accessible function to return the cursor position.


AbsolutePosition

public void AbsolutePosition(int pos)
                      throws com.tripi.asp.AspException
ASP-Accessible function to set the cursor position.


AbsolutePage

public int AbsolutePage()
                 throws com.tripi.asp.AspException
ASP-Accessible function to return cursor page.


PageCount

public int PageCount()
              throws com.tripi.asp.AspException
ASP-Accessible function to obtain the number of pages in the query


RecordCount

public int RecordCount()
                throws com.tripi.asp.AspException
ASP-Accessible function to obtain the number of records in the query.


Close

public void Close()
           throws com.tripi.asp.AspException
ASP-Accessible function to close the record set.


GetRows

public com.tripi.asp.ArrayNode GetRows()
                                throws com.tripi.asp.AspException
ASP-Accessible function to obtain a set of rows in an array.


GetRows

public com.tripi.asp.ArrayNode GetRows(int rows)
                                throws com.tripi.asp.AspException
ASP-Accessible function to obtain a set of rows in an array.


CancelUpdate

public void CancelUpdate()
                  throws com.tripi.asp.AspException
ASP-Accessible function to cancel any pending updates.


Update

public void Update()
            throws com.tripi.asp.AspException
ASP-Accessible function to update all pending changes.


get

public java.lang.Object get(java.lang.Object key)
                     throws com.tripi.asp.AspException
SimpleMap function to obtain the value of the record at the specified index.

Specified by:
get in interface com.tripi.asp.SimpleMap

put

public void put(java.lang.Object key,
                java.lang.Object value)
         throws com.tripi.asp.AspException
SimpleMap function to set the value of the record at the specified index.

Specified by:
put in interface com.tripi.asp.SimpleMap

getKeys

public java.util.Enumeration getKeys()
                              throws com.tripi.asp.AspException
SimpleMap function to obtain the keys in the record, effectivly the column names.

Specified by:
getKeys in interface com.tripi.asp.SimpleMap

OnPageEnd

public void OnPageEnd(java.lang.Object ignoreme)
Internal function called on page end.