com.ricebridge.csvman
Class CsvResultSet

java.lang.Object
  extended bycom.ricebridge.csvman.CsvResultSet
All Implemented Interfaces:
ResultSet

public class CsvResultSet
extends Object
implements ResultSet

Implementation of a ResultSet to present CSV data.

This ResultSet provides much the same interface as a database ResultSet. This implementation assumes that your data is fairly well behaved and attempts direct data type conversions for methods like getInt(java.lang.String). Bad data will cause an exception to be thrown. Refer to ResultSet for method documentation if none is given here.

The Source Code of this Java class is available under a BSD-style license.


Field Summary
protected  CsvResultSetMetaData iCsvRSMD
          ResultSetMetaData provider
protected  ArrayList iData
          Data as a List of String[] arrays.
protected  DateFormat iDateFormat
          Default data format for date parsing.
protected  String[] iLine
          Current line of data.
protected  long iLineIndex
          index of current line.
 
Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE
 
Constructor Summary
CsvResultSet()
          Create a new empty ResultSet.
CsvResultSet(ArrayList pData, boolean pHasHeaders, int pExpectedNumFields)
          Create a new ResultSet from CSV data.
 
Method Summary
 boolean absolute(int pRow)
          As per ResultSet.absolute(int).
 void afterLast()
          As per ResultSet.afterLast().
 void beforeFirst()
          As per ResultSet.beforeFirst().
 void cancelRowUpdates()
          No action — see ResultSet.cancelRowUpdates().
 void clearWarnings()
          No action — see ResultSet.clearWarnings().
 void close()
          No action — see ResultSet.close().
 void deleteRow()
          No action — see ResultSet.deleteRow().
 int findColumn(String pColumnName)
          As per ResultSet.findColumn(java.lang.String).
 boolean first()
          As per ResultSet.first().
 Array getArray(int pIndex)
          Not supported.
 Array getArray(String pColName)
          Not supported.
 InputStream getAsciiStream(int pColumnIndex)
          As per ResultSet.getAsciiStream(int).
 InputStream getAsciiStream(String pColumnName)
          As per ResultSet.getAsciiStream(int).
 BigDecimal getBigDecimal(int pColumnIndex)
          As per ResultSet.getBigDecimal(int).
 BigDecimal getBigDecimal(int pColumnIndex, int pScale)
          As per ResultSet.getBigDecimal(int).
 BigDecimal getBigDecimal(String pColumnName)
          As per ResultSet.getBigDecimal(int).
 BigDecimal getBigDecimal(String pColumnName, int pScale)
          As per ResultSet.getBigDecimal(int).
 InputStream getBinaryStream(int pColumnIndex)
          As per ResultSet.getBinaryStream(int).
 InputStream getBinaryStream(String pColumnName)
          As per ResultSet.getBinaryStream(int).
 Blob getBlob(int pIndex)
          Not supported.
 Blob getBlob(String pColName)
          Not supported.
 boolean getBoolean(int pColumnIndex)
          As per ResultSet.getBoolean(int).
 boolean getBoolean(String pColumnName)
          As per ResultSet.getBoolean(int).
 byte getByte(int pColumnIndex)
          As per ResultSet.getByte(int).
 byte getByte(String pColumnName)
          As per ResultSet.getByte(int).
 byte[] getBytes(int pColumnIndex)
          As per ResultSet.getBytes(int).
 byte[] getBytes(String pColumnName)
          As per ResultSet.getBytes(int).
 Reader getCharacterStream(int pColumnIndex)
          As per ResultSet.getCharacterStream(int).
 Reader getCharacterStream(String pColumnName)
          As per ResultSet.getCharacterStream(int).
 Clob getClob(int pIndex)
          Not supported.
 Clob getClob(String pColName)
          Not supported.
 int getConcurrency()
          No action — see ResultSet.getConcurrency().
 String getCursorName()
          No action — see ResultSet.getCursorName().
 Date getDate(int pColumnIndex)
          As per ResultSet.getDate(int).
 Date getDate(int pColumnIndex, Calendar pCalendar)
          As per ResultSet.getDate(int).
 Date getDate(String pColumnName)
          As per ResultSet.getDate(int).
 Date getDate(String pColumnName, Calendar pCalendar)
          As per ResultSet.getDate(int).
 double getDouble(int pColumnIndex)
          As per ResultSet.getDouble(int).
 double getDouble(String pColumnName)
          As per ResultSet.getDouble(int).
 int getFetchDirection()
          No action — see ResultSet.getFetchDirection().
 int getFetchSize()
          No action — see ResultSet.getFetchSize().
 float getFloat(int pColumnIndex)
          As per ResultSet.getFloat(int).
 float getFloat(String pColumnName)
          As per ResultSet.getFloat(int).
 int getInt(int pColumnIndex)
          As per ResultSet.getInt(int).
 int getInt(String pColumnName)
          As per ResultSet.getInt(int).
 long getLong(int pColumnIndex)
          As per ResultSet.getLong(int).
 long getLong(String pColumnName)
          As per ResultSet.getLong(int).
 ResultSetMetaData getMetaData()
          As per ResultSet.getMetaData().
 Object getObject(int pColumnIndex)
          As per ResultSet.getObject(int).
 Object getObject(int pIndex, Map pMap)
          Not supported.
 Object getObject(String pColumnName)
          As per ResultSet.getObject(int).
 Object getObject(String pColName, Map pMap)
          Not supported.
 Ref getRef(int pIndex)
          Not supported.
 Ref getRef(String pColName)
          Not supported.
 int getRow()
          As per ResultSet.getRow().
 short getShort(int pColumnIndex)
          As per ResultSet.getShort(int).
 short getShort(String pColumnName)
          As per ResultSet.getShort(int).
 Statement getStatement()
          Not supported.
 String getString(int pColumnIndex)
          As per ResultSet.getString(int).
 String getString(String pColumnName)
          As per ResultSet.getString(int).
 Time getTime(int pColumnIndex)
          As per ResultSet.getTime(int).
 Time getTime(int pColumnIndex, Calendar pCalendar)
          As per ResultSet.getTime(int).
 Time getTime(String pColumnName)
          As per ResultSet.getTime(int).
 Time getTime(String pColumnName, Calendar pCalendar)
          As per ResultSet.getTime(int).
 Timestamp getTimestamp(int pColumnIndex)
          As per ResultSet.getTimestamp(int).
 Timestamp getTimestamp(int pColumnIndex, Calendar pCalendar)
          As per ResultSet.getTimestamp(int).
 Timestamp getTimestamp(String pColumnName)
          As per ResultSet.getTimestamp(int).
 Timestamp getTimestamp(String pColumnName, Calendar pCalendar)
          As per ResultSet.getTimestamp(int).
 int getType()
          No action — see ResultSet.getType().
 InputStream getUnicodeStream(int pColumnIndex)
          As per ResultSet.getUnicodeStream(int).
 InputStream getUnicodeStream(String pColumnName)
          As per ResultSet.getUnicodeStream(int).
 URL getURL(int pColumnIndex)
          As per ResultSet.getURL(int).
 URL getURL(String pColumnName)
          As per ResultSet.getURL(int).
 SQLWarning getWarnings()
          No action — see ResultSet.getWarnings().
 void insertRow()
          No action — see ResultSet.insertRow().
 boolean isAfterLast()
          As per ResultSet.isAfterLast().
 boolean isBeforeFirst()
          As per ResultSet.isBeforeFirst().
 boolean isFirst()
          As per ResultSet.isFirst().
 boolean isLast()
          As per ResultSet.isLast().
 boolean last()
          As per ResultSet.last().
 void moveToCurrentRow()
          No action — see ResultSet.moveToCurrentRow().
 void moveToInsertRow()
          No action — see ResultSet.moveToInsertRow().
protected  boolean moveToLine()
          Move to correct data line.
 boolean next()
          As per ResultSet.next().
 boolean previous()
          As per ResultSet.previous().
 void refreshRow()
          No action — see ResultSet.refreshRow().
 boolean relative(int pRows)
          As per ResultSet.relative(int).
 boolean rowDeleted()
          No action — see ResultSet.rowDeleted().
 boolean rowInserted()
          No action — see ResultSet.rowInserted().
 boolean rowUpdated()
          No action — see ResultSet.rowUpdated().
 void setData(ArrayList pData, boolean pHasHeaders, int pExpectedNumFields)
          Set data for ResultSet.
 void setDateFormat(DateFormat pDateFormat)
          Specify custom date format.
 void setFetchDirection(int pDirection)
          No action — see ResultSet.setFetchDirection(int).
 void setFetchSize(int pRows)
          No action — see ResultSet.setFetchSize(int).
 void updateArray(int pColumnIndex, Array pArray)
          No action — see ResultSet.updateArray(int, java.sql.Array).
 void updateArray(String pColumnName, Array pArray)
          No action — see ResultSet.updateArray(int, java.sql.Array).
 void updateAsciiStream(int pColumnIndex, InputStream pInputStream, int pLength)
          No action — see ResultSet.updateAsciiStream(int, java.io.InputStream, int).
 void updateAsciiStream(String pColumnName, InputStream pInputStream, int pLength)
          No action — see ResultSet.updateAsciiStream(int, java.io.InputStream, int).
 void updateBigDecimal(int pColumnIndex, BigDecimal pBigDecimal)
          No action — see ResultSet.updateBigDecimal(int, java.math.BigDecimal).
 void updateBigDecimal(String pColumnName, BigDecimal pBigDecimal)
          No action — see ResultSet.updateBigDecimal(int, java.math.BigDecimal).
 void updateBinaryStream(int pColumnIndex, InputStream pInputStream, int pLength)
          No action — see ResultSet.updateBinaryStream(int, java.io.InputStream, int).
 void updateBinaryStream(String pColumnName, InputStream pInputStream, int pLength)
          No action — see ResultSet.updateBinaryStream(int, java.io.InputStream, int).
 void updateBlob(int pColumnIndex, Blob pBlob)
          No action — see ResultSet.updateBlob(int, java.sql.Blob).
 void updateBlob(String pColumnName, Blob pBlob)
          No action — see ResultSet.updateBlob(int, java.sql.Blob).
 void updateBoolean(int pColumnIndex, boolean pValue)
          No action — see ResultSet.updateBoolean(int, boolean).
 void updateBoolean(String pColumnName, boolean pValue)
          No action — see ResultSet.updateBoolean(int, boolean).
 void updateByte(int pColumnIndex, byte pValue)
          No action — see ResultSet.updateByte(int, byte).
 void updateByte(String pColumnName, byte pValue)
          No action — see ResultSet.updateByte(int, byte).
 void updateBytes(int pColumnIndex, byte[] pBytes)
          No action — see ResultSet.updateBytes(int, byte[]).
 void updateBytes(String pColumnName, byte[] pBytes)
          No action — see ResultSet.updateBytes(int, byte[]).
 void updateCharacterStream(int pColumnIndex, Reader pReader, int pLength)
          No action — see ResultSet.updateCharacterStream(int, java.io.Reader, int).
 void updateCharacterStream(String pColumnName, Reader pReader, int pLength)
          No action — see ResultSet.updateCharacterStream(int, java.io.Reader, int).
 void updateClob(int pColumnIndex, Clob pValue)
          No action — see ResultSet.updateClob(int, java.sql.Clob).
 void updateClob(String pColumnName, Clob pValue)
          No action — see ResultSet.updateClob(int, java.sql.Clob).
 void updateDate(int pColumnIndex, Date pValue)
          No action — see ResultSet.updateDate(int, java.sql.Date).
 void updateDate(String pColumnName, Date pValue)
          No action — see ResultSet.updateDate(int, java.sql.Date).
 void updateDouble(int pColumnIndex, double pValue)
          No action — see ResultSet.updateDouble(int, double).
 void updateDouble(String pColumnName, double pValue)
          No action — see ResultSet.updateDouble(int, double).
 void updateFloat(int pColumnIndex, float pValue)
          No action — see ResultSet.updateFloat(int, float).
 void updateFloat(String pColumnName, float pValue)
          No action — see ResultSet.updateFloat(int, float).
 void updateInt(int pColumnIndex, int pValue)
          No action — see ResultSet.updateInt(int, int).
 void updateInt(String pColumnName, int pValue)
          No action — see ResultSet.updateInt(int, int).
 void updateLong(int pColumnIndex, long pValue)
          No action — see ResultSet.updateLong(int, long).
 void updateLong(String pColumnName, long pValue)
          No action — see ResultSet.updateLong(int, long).
 void updateNull(int pColumnIndex)
          No action — see ResultSet.updateNull(int).
 void updateNull(String pColumnName)
          No action — see ResultSet.updateNull(int).
 void updateObject(int pColumnIndex, Object pValue)
          No action — see ResultSet.updateObject(int, java.lang.Object).
 void updateObject(int pColumnIndex, Object pValue, int pScale)
          No action — see ResultSet.updateObject(int, java.lang.Object).
 void updateObject(String pColumnName, Object pValue)
          No action — see ResultSet.updateObject(int, java.lang.Object).
 void updateObject(String pColumnName, Object pValue, int pScale)
          No action — see ResultSet.updateObject(int, java.lang.Object).
 void updateRef(int pColumnIndex, Ref pValue)
          No action — see ResultSet.updateRef(int, java.sql.Ref).
 void updateRef(String pColumnName, Ref pValue)
          No action — see ResultSet.updateRef(int, java.sql.Ref).
 void updateRow()
          No action — see ResultSet.updateRow().
 void updateShort(int pColumnIndex, short pValue)
          No action — see ResultSet.updateShort(int, short).
 void updateShort(String pColumnName, short pValue)
          No action — see ResultSet.updateShort(int, short).
 void updateString(int pColumnIndex, String pValue)
          No action — see ResultSet.updateString(int, java.lang.String).
 void updateString(String pColumnName, String pValue)
          No action — see ResultSet.updateString(int, java.lang.String).
 void updateTime(int pColumnIndex, Time pValue)
          No action — see ResultSet.updateTime(int, java.sql.Time).
 void updateTime(String pColumnName, Time pValue)
          No action — see ResultSet.updateTime(int, java.sql.Time).
 void updateTimestamp(int pColumnIndex, Timestamp pValue)
          No action — see ResultSet.updateTimestamp(int, java.sql.Timestamp).
 void updateTimestamp(String pColumnName, Timestamp pValue)
          No action — see ResultSet.updateTimestamp(int, java.sql.Timestamp).
 boolean wasNull()
          No action — see ResultSet.wasNull().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iData

protected ArrayList iData
Data as a List of String[] arrays.


iLine

protected String[] iLine
Current line of data.


iLineIndex

protected long iLineIndex
index of current line.


iDateFormat

protected DateFormat iDateFormat
Default data format for date parsing.


iCsvRSMD

protected CsvResultSetMetaData iCsvRSMD
ResultSetMetaData provider

Constructor Detail

CsvResultSet

public CsvResultSet(ArrayList pData,
                    boolean pHasHeaders,
                    int pExpectedNumFields)
Create a new ResultSet from CSV data.

When pHasHeaders is true, the first line of data is used as the names of the columns and getMetaData() will return these column names.

When pHasHeaders is false, default names of the form Column X are generated.

Parameters:
pData - List of String[]
pHasHeaders - first row is headers

CsvResultSet

public CsvResultSet()
Create a new empty ResultSet.

Initialise with setData(java.util.ArrayList, boolean, int)

Method Detail

getArray

public Array getArray(String pColName)
               throws SQLException
Not supported.

Specified by:
getArray in interface ResultSet
Throws:
SQLException

getArray

public Array getArray(int pIndex)
               throws SQLException
Not supported.

Specified by:
getArray in interface ResultSet
Throws:
SQLException

getBlob

public Blob getBlob(String pColName)
             throws SQLException
Not supported.

Specified by:
getBlob in interface ResultSet
Throws:
SQLException

getBlob

public Blob getBlob(int pIndex)
             throws SQLException
Not supported.

Specified by:
getBlob in interface ResultSet
Throws:
SQLException

getClob

public Clob getClob(String pColName)
             throws SQLException
Not supported.

Specified by:
getClob in interface ResultSet
Throws:
SQLException

getClob

public Clob getClob(int pIndex)
             throws SQLException
Not supported.

Specified by:
getClob in interface ResultSet
Throws:
SQLException

getObject

public Object getObject(String pColName,
                        Map pMap)
                 throws SQLException
Not supported.

Specified by:
getObject in interface ResultSet
Throws:
SQLException

getObject

public Object getObject(int pIndex,
                        Map pMap)
                 throws SQLException
Not supported.

Specified by:
getObject in interface ResultSet
Throws:
SQLException

getRef

public Ref getRef(String pColName)
           throws SQLException
Not supported.

Specified by:
getRef in interface ResultSet
Throws:
SQLException

getRef

public Ref getRef(int pIndex)
           throws SQLException
Not supported.

Specified by:
getRef in interface ResultSet
Throws:
SQLException

getStatement

public Statement getStatement()
                       throws SQLException
Not supported.

Specified by:
getStatement in interface ResultSet
Throws:
SQLException

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
No action — see ResultSet.getWarnings().

Specified by:
getWarnings in interface ResultSet
Throws:
SQLException

getCursorName

public String getCursorName()
                     throws SQLException
No action — see ResultSet.getCursorName().

Specified by:
getCursorName in interface ResultSet
Throws:
SQLException

rowDeleted

public boolean rowDeleted()
                   throws SQLException
No action — see ResultSet.rowDeleted().

Specified by:
rowDeleted in interface ResultSet
Throws:
SQLException

rowInserted

public boolean rowInserted()
                    throws SQLException
No action — see ResultSet.rowInserted().

Specified by:
rowInserted in interface ResultSet
Throws:
SQLException

rowUpdated

public boolean rowUpdated()
                   throws SQLException
No action — see ResultSet.rowUpdated().

Specified by:
rowUpdated in interface ResultSet
Throws:
SQLException

wasNull

public boolean wasNull()
                throws SQLException
No action — see ResultSet.wasNull().

Specified by:
wasNull in interface ResultSet
Throws:
SQLException

getFetchDirection

public int getFetchDirection()
                      throws SQLException
No action — see ResultSet.getFetchDirection().

Specified by:
getFetchDirection in interface ResultSet
Throws:
SQLException

setFetchDirection

public void setFetchDirection(int pDirection)
                       throws SQLException
No action — see ResultSet.setFetchDirection(int).

Specified by:
setFetchDirection in interface ResultSet
Throws:
SQLException

getFetchSize

public int getFetchSize()
                 throws SQLException
No action — see ResultSet.getFetchSize().

Specified by:
getFetchSize in interface ResultSet
Throws:
SQLException

setFetchSize

public void setFetchSize(int pRows)
                  throws SQLException
No action — see ResultSet.setFetchSize(int).

Specified by:
setFetchSize in interface ResultSet
Throws:
SQLException

getConcurrency

public int getConcurrency()
                   throws SQLException
No action — see ResultSet.getConcurrency().

Specified by:
getConcurrency in interface ResultSet
Throws:
SQLException

getType

public int getType()
            throws SQLException
No action — see ResultSet.getType().

Specified by:
getType in interface ResultSet
Throws:
SQLException

cancelRowUpdates

public void cancelRowUpdates()
                      throws SQLException
No action — see ResultSet.cancelRowUpdates().

Specified by:
cancelRowUpdates in interface ResultSet
Throws:
SQLException

clearWarnings

public void clearWarnings()
                   throws SQLException
No action — see ResultSet.clearWarnings().

Specified by:
clearWarnings in interface ResultSet
Throws:
SQLException

close

public void close()
           throws SQLException
No action — see ResultSet.close().

Specified by:
close in interface ResultSet
Throws:
SQLException

deleteRow

public void deleteRow()
               throws SQLException
No action — see ResultSet.deleteRow().

Specified by:
deleteRow in interface ResultSet
Throws:
SQLException

insertRow

public void insertRow()
               throws SQLException
No action — see ResultSet.insertRow().

Specified by:
insertRow in interface ResultSet
Throws:
SQLException

moveToCurrentRow

public void moveToCurrentRow()
                      throws SQLException
No action — see ResultSet.moveToCurrentRow().

Specified by:
moveToCurrentRow in interface ResultSet
Throws:
SQLException

moveToInsertRow

public void moveToInsertRow()
                     throws SQLException
No action — see ResultSet.moveToInsertRow().

Specified by:
moveToInsertRow in interface ResultSet
Throws:
SQLException

refreshRow

public void refreshRow()
                throws SQLException
No action — see ResultSet.refreshRow().

Specified by:
refreshRow in interface ResultSet
Throws:
SQLException

updateArray

public void updateArray(String pColumnName,
                        Array pArray)
                 throws SQLException
No action — see ResultSet.updateArray(int, java.sql.Array).

Specified by:
updateArray in interface ResultSet
Throws:
SQLException

updateArray

public void updateArray(int pColumnIndex,
                        Array pArray)
                 throws SQLException
No action — see ResultSet.updateArray(int, java.sql.Array).

Specified by:
updateArray in interface ResultSet
Throws:
SQLException

updateAsciiStream

public void updateAsciiStream(String pColumnName,
                              InputStream pInputStream,
                              int pLength)
                       throws SQLException
No action — see ResultSet.updateAsciiStream(int, java.io.InputStream, int).

Specified by:
updateAsciiStream in interface ResultSet
Throws:
SQLException

updateAsciiStream

public void updateAsciiStream(int pColumnIndex,
                              InputStream pInputStream,
                              int pLength)
                       throws SQLException
No action — see ResultSet.updateAsciiStream(int, java.io.InputStream, int).

Specified by:
updateAsciiStream in interface ResultSet
Throws:
SQLException

updateBigDecimal

public void updateBigDecimal(String pColumnName,
                             BigDecimal pBigDecimal)
                      throws SQLException
No action — see ResultSet.updateBigDecimal(int, java.math.BigDecimal).

Specified by:
updateBigDecimal in interface ResultSet
Throws:
SQLException

updateBigDecimal

public void updateBigDecimal(int pColumnIndex,
                             BigDecimal pBigDecimal)
                      throws SQLException
No action — see ResultSet.updateBigDecimal(int, java.math.BigDecimal).

Specified by:
updateBigDecimal in interface ResultSet
Throws:
SQLException

updateBinaryStream

public void updateBinaryStream(String pColumnName,
                               InputStream pInputStream,
                               int pLength)
                        throws SQLException
No action — see ResultSet.updateBinaryStream(int, java.io.InputStream, int).

Specified by:
updateBinaryStream in interface ResultSet
Throws:
SQLException

updateBinaryStream

public void updateBinaryStream(int pColumnIndex,
                               InputStream pInputStream,
                               int pLength)
                        throws SQLException
No action — see ResultSet.updateBinaryStream(int, java.io.InputStream, int).

Specified by:
updateBinaryStream in interface ResultSet
Throws:
SQLException

updateBlob

public void updateBlob(String pColumnName,
                       Blob pBlob)
                throws SQLException
No action — see ResultSet.updateBlob(int, java.sql.Blob).

Specified by:
updateBlob in interface ResultSet
Throws:
SQLException

updateBlob

public void updateBlob(int pColumnIndex,
                       Blob pBlob)
                throws SQLException
No action — see ResultSet.updateBlob(int, java.sql.Blob).

Specified by:
updateBlob in interface ResultSet
Throws:
SQLException

updateBoolean

public void updateBoolean(String pColumnName,
                          boolean pValue)
                   throws SQLException
No action — see ResultSet.updateBoolean(int, boolean).

Specified by:
updateBoolean in interface ResultSet
Throws:
SQLException

updateBoolean

public void updateBoolean(int pColumnIndex,
                          boolean pValue)
                   throws SQLException
No action — see ResultSet.updateBoolean(int, boolean).

Specified by:
updateBoolean in interface ResultSet
Throws:
SQLException

updateByte

public void updateByte(String pColumnName,
                       byte pValue)
                throws SQLException
No action — see ResultSet.updateByte(int, byte).

Specified by:
updateByte in interface ResultSet
Throws:
SQLException

updateByte

public void updateByte(int pColumnIndex,
                       byte pValue)
                throws SQLException
No action — see ResultSet.updateByte(int, byte).

Specified by:
updateByte in interface ResultSet
Throws:
SQLException

updateBytes

public void updateBytes(String pColumnName,
                        byte[] pBytes)
                 throws SQLException
No action — see ResultSet.updateBytes(int, byte[]).

Specified by:
updateBytes in interface ResultSet
Throws:
SQLException

updateBytes

public void updateBytes(int pColumnIndex,
                        byte[] pBytes)
                 throws SQLException
No action — see ResultSet.updateBytes(int, byte[]).

Specified by:
updateBytes in interface ResultSet
Throws:
SQLException

updateCharacterStream

public void updateCharacterStream(String pColumnName,
                                  Reader pReader,
                                  int pLength)
                           throws SQLException
No action — see ResultSet.updateCharacterStream(int, java.io.Reader, int).

Specified by:
updateCharacterStream in interface ResultSet
Throws:
SQLException

updateCharacterStream

public void updateCharacterStream(int pColumnIndex,
                                  Reader pReader,
                                  int pLength)
                           throws SQLException
No action — see ResultSet.updateCharacterStream(int, java.io.Reader, int).

Specified by:
updateCharacterStream in interface ResultSet
Throws:
SQLException

updateClob

public void updateClob(String pColumnName,
                       Clob pValue)
                throws SQLException
No action — see ResultSet.updateClob(int, java.sql.Clob).

Specified by:
updateClob in interface ResultSet
Throws:
SQLException

updateClob

public void updateClob(int pColumnIndex,
                       Clob pValue)
                throws SQLException
No action — see ResultSet.updateClob(int, java.sql.Clob).

Specified by:
updateClob in interface ResultSet
Throws:
SQLException

updateDate

public void updateDate(String pColumnName,
                       Date pValue)
                throws SQLException
No action — see ResultSet.updateDate(int, java.sql.Date).

Specified by:
updateDate in interface ResultSet
Throws:
SQLException

updateDate

public void updateDate(int pColumnIndex,
                       Date pValue)
                throws SQLException
No action — see ResultSet.updateDate(int, java.sql.Date).

Specified by:
updateDate in interface ResultSet
Throws:
SQLException

updateDouble

public void updateDouble(String pColumnName,
                         double pValue)
                  throws SQLException
No action — see ResultSet.updateDouble(int, double).

Specified by:
updateDouble in interface ResultSet
Throws:
SQLException

updateDouble

public void updateDouble(int pColumnIndex,
                         double pValue)
                  throws SQLException
No action — see ResultSet.updateDouble(int, double).

Specified by:
updateDouble in interface ResultSet
Throws:
SQLException

updateFloat

public void updateFloat(String pColumnName,
                        float pValue)
                 throws SQLException
No action — see ResultSet.updateFloat(int, float).

Specified by:
updateFloat in interface ResultSet
Throws:
SQLException

updateFloat

public void updateFloat(int pColumnIndex,
                        float pValue)
                 throws SQLException
No action — see ResultSet.updateFloat(int, float).

Specified by:
updateFloat in interface ResultSet
Throws:
SQLException

updateInt

public void updateInt(String pColumnName,
                      int pValue)
               throws SQLException
No action — see ResultSet.updateInt(int, int).

Specified by:
updateInt in interface ResultSet
Throws:
SQLException

updateInt

public void updateInt(int pColumnIndex,
                      int pValue)
               throws SQLException
No action — see ResultSet.updateInt(int, int).

Specified by:
updateInt in interface ResultSet
Throws:
SQLException

updateLong

public void updateLong(String pColumnName,
                       long pValue)
                throws SQLException
No action — see ResultSet.updateLong(int, long).

Specified by:
updateLong in interface ResultSet
Throws:
SQLException

updateLong

public void updateLong(int pColumnIndex,
                       long pValue)
                throws SQLException
No action — see ResultSet.updateLong(int, long).

Specified by:
updateLong in interface ResultSet
Throws:
SQLException

updateNull

public void updateNull(String pColumnName)
                throws SQLException
No action — see ResultSet.updateNull(int).

Specified by:
updateNull in interface ResultSet
Throws:
SQLException

updateNull

public void updateNull(int pColumnIndex)
                throws SQLException
No action — see ResultSet.updateNull(int).

Specified by:
updateNull in interface ResultSet
Throws:
SQLException

updateObject

public void updateObject(String pColumnName,
                         Object pValue)
                  throws SQLException
No action — see ResultSet.updateObject(int, java.lang.Object).

Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public void updateObject(String pColumnName,
                         Object pValue,
                         int pScale)
                  throws SQLException
No action — see ResultSet.updateObject(int, java.lang.Object).

Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public void updateObject(int pColumnIndex,
                         Object pValue)
                  throws SQLException
No action — see ResultSet.updateObject(int, java.lang.Object).

Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateObject

public void updateObject(int pColumnIndex,
                         Object pValue,
                         int pScale)
                  throws SQLException
No action — see ResultSet.updateObject(int, java.lang.Object).

Specified by:
updateObject in interface ResultSet
Throws:
SQLException

updateRef

public void updateRef(String pColumnName,
                      Ref pValue)
               throws SQLException
No action — see ResultSet.updateRef(int, java.sql.Ref).

Specified by:
updateRef in interface ResultSet
Throws:
SQLException

updateRef

public void updateRef(int pColumnIndex,
                      Ref pValue)
               throws SQLException
No action — see ResultSet.updateRef(int, java.sql.Ref).

Specified by:
updateRef in interface ResultSet
Throws:
SQLException

updateRow

public void updateRow()
               throws SQLException
No action — see ResultSet.updateRow().

Specified by:
updateRow in interface ResultSet
Throws:
SQLException

updateShort

public void updateShort(String pColumnName,
                        short pValue)
                 throws SQLException
No action — see ResultSet.updateShort(int, short).

Specified by:
updateShort in interface ResultSet
Throws:
SQLException

updateShort

public void updateShort(int pColumnIndex,
                        short pValue)
                 throws SQLException
No action — see ResultSet.updateShort(int, short).

Specified by:
updateShort in interface ResultSet
Throws:
SQLException

updateString

public void updateString(String pColumnName,
                         String pValue)
                  throws SQLException
No action — see ResultSet.updateString(int, java.lang.String).

Specified by:
updateString in interface ResultSet
Throws:
SQLException

updateString

public void updateString(int pColumnIndex,
                         String pValue)
                  throws SQLException
No action — see ResultSet.updateString(int, java.lang.String).

Specified by:
updateString in interface ResultSet
Throws:
SQLException

updateTime

public void updateTime(String pColumnName,
                       Time pValue)
                throws SQLException
No action — see ResultSet.updateTime(int, java.sql.Time).

Specified by:
updateTime in interface ResultSet
Throws:
SQLException

updateTime

public void updateTime(int pColumnIndex,
                       Time pValue)
                throws SQLException
No action — see ResultSet.updateTime(int, java.sql.Time).

Specified by:
updateTime in interface ResultSet
Throws:
SQLException

updateTimestamp

public void updateTimestamp(String pColumnName,
                            Timestamp pValue)
                     throws SQLException
No action — see ResultSet.updateTimestamp(int, java.sql.Timestamp).

Specified by:
updateTimestamp in interface ResultSet
Throws:
SQLException

updateTimestamp

public void updateTimestamp(int pColumnIndex,
                            Timestamp pValue)
                     throws SQLException
No action — see ResultSet.updateTimestamp(int, java.sql.Timestamp).

Specified by:
updateTimestamp in interface ResultSet
Throws:
SQLException

setData

public void setData(ArrayList pData,
                    boolean pHasHeaders,
                    int pExpectedNumFields)
Set data for ResultSet.

Parameters:
pData - List of String[] arrays containing data
pHasHeaders - first line of data is headers

getMetaData

public ResultSetMetaData getMetaData()
                              throws SQLException
As per ResultSet.getMetaData().

Specified by:
getMetaData in interface ResultSet
Throws:
SQLException

findColumn

public int findColumn(String pColumnName)
               throws SQLException
As per ResultSet.findColumn(java.lang.String).

Specified by:
findColumn in interface ResultSet
Throws:
SQLException

absolute

public boolean absolute(int pRow)
                 throws SQLException
As per ResultSet.absolute(int).

Specified by:
absolute in interface ResultSet
Throws:
SQLException

first

public boolean first()
              throws SQLException
As per ResultSet.first().

Specified by:
first in interface ResultSet
Throws:
SQLException

last

public boolean last()
             throws SQLException
As per ResultSet.last().

Specified by:
last in interface ResultSet
Throws:
SQLException

isAfterLast

public boolean isAfterLast()
                    throws SQLException
As per ResultSet.isAfterLast().

Specified by:
isAfterLast in interface ResultSet
Throws:
SQLException

isBeforeFirst

public boolean isBeforeFirst()
                      throws SQLException
As per ResultSet.isBeforeFirst().

Specified by:
isBeforeFirst in interface ResultSet
Throws:
SQLException

isFirst

public boolean isFirst()
                throws SQLException
As per ResultSet.isFirst().

Specified by:
isFirst in interface ResultSet
Throws:
SQLException

isLast

public boolean isLast()
               throws SQLException
As per ResultSet.isLast().

Specified by:
isLast in interface ResultSet
Throws:
SQLException

next

public boolean next()
             throws SQLException
As per ResultSet.next().

Specified by:
next in interface ResultSet
Throws:
SQLException

previous

public boolean previous()
                 throws SQLException
As per ResultSet.previous().

Specified by:
previous in interface ResultSet
Throws:
SQLException

relative

public boolean relative(int pRows)
                 throws SQLException
As per ResultSet.relative(int).

Specified by:
relative in interface ResultSet
Throws:
SQLException

getRow

public int getRow()
           throws SQLException
As per ResultSet.getRow().

Specified by:
getRow in interface ResultSet
Throws:
SQLException

afterLast

public void afterLast()
               throws SQLException
As per ResultSet.afterLast().

Specified by:
afterLast in interface ResultSet
Throws:
SQLException

beforeFirst

public void beforeFirst()
                 throws SQLException
As per ResultSet.beforeFirst().

Specified by:
beforeFirst in interface ResultSet
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(String pColumnName)
                         throws SQLException
As per ResultSet.getBigDecimal(int).

Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(String pColumnName,
                                int pScale)
                         throws SQLException
As per ResultSet.getBigDecimal(int).

Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(int pColumnIndex)
                         throws SQLException
As per ResultSet.getBigDecimal(int).

Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getBigDecimal

public BigDecimal getBigDecimal(int pColumnIndex,
                                int pScale)
                         throws SQLException
As per ResultSet.getBigDecimal(int).

Specified by:
getBigDecimal in interface ResultSet
Throws:
SQLException

getObject

public Object getObject(String pColumnName)
                 throws SQLException
As per ResultSet.getObject(int).

Specified by:
getObject in interface ResultSet
Throws:
SQLException

getObject

public Object getObject(int pColumnIndex)
                 throws SQLException
As per ResultSet.getObject(int).

Specified by:
getObject in interface ResultSet
Throws:
SQLException

getString

public String getString(String pColumnName)
                 throws SQLException
As per ResultSet.getString(int).

Specified by:
getString in interface ResultSet
Throws:
SQLException

getString

public String getString(int pColumnIndex)
                 throws SQLException
As per ResultSet.getString(int).

Specified by:
getString in interface ResultSet
Throws:
SQLException

getBoolean

public boolean getBoolean(String pColumnName)
                   throws SQLException
As per ResultSet.getBoolean(int).

Specified by:
getBoolean in interface ResultSet
Throws:
SQLException

getBoolean

public boolean getBoolean(int pColumnIndex)
                   throws SQLException
As per ResultSet.getBoolean(int).

Specified by:
getBoolean in interface ResultSet
Throws:
SQLException

getByte

public byte getByte(String pColumnName)
             throws SQLException
As per ResultSet.getByte(int).

Specified by:
getByte in interface ResultSet
Throws:
SQLException

getByte

public byte getByte(int pColumnIndex)
             throws SQLException
As per ResultSet.getByte(int).

Specified by:
getByte in interface ResultSet
Throws:
SQLException

getBytes

public byte[] getBytes(String pColumnName)
                throws SQLException
As per ResultSet.getBytes(int).

Specified by:
getBytes in interface ResultSet
Throws:
SQLException

getBytes

public byte[] getBytes(int pColumnIndex)
                throws SQLException
As per ResultSet.getBytes(int).

Specified by:
getBytes in interface ResultSet
Throws:
SQLException

getDouble

public double getDouble(String pColumnName)
                 throws SQLException
As per ResultSet.getDouble(int).

Specified by:
getDouble in interface ResultSet
Throws:
SQLException

getDouble

public double getDouble(int pColumnIndex)
                 throws SQLException
As per ResultSet.getDouble(int).

Specified by:
getDouble in interface ResultSet
Throws:
SQLException

getFloat

public float getFloat(String pColumnName)
               throws SQLException
As per ResultSet.getFloat(int).

Specified by:
getFloat in interface ResultSet
Throws:
SQLException

getFloat

public float getFloat(int pColumnIndex)
               throws SQLException
As per ResultSet.getFloat(int).

Specified by:
getFloat in interface ResultSet
Throws:
SQLException

getInt

public int getInt(String pColumnName)
           throws SQLException
As per ResultSet.getInt(int).

Specified by:
getInt in interface ResultSet
Throws:
SQLException

getInt

public int getInt(int pColumnIndex)
           throws SQLException
As per ResultSet.getInt(int).

Specified by:
getInt in interface ResultSet
Throws:
SQLException

getAsciiStream

public InputStream getAsciiStream(String pColumnName)
                           throws SQLException
As per ResultSet.getAsciiStream(int).

Specified by:
getAsciiStream in interface ResultSet
Throws:
SQLException

getAsciiStream

public InputStream getAsciiStream(int pColumnIndex)
                           throws SQLException
As per ResultSet.getAsciiStream(int).

Specified by:
getAsciiStream in interface ResultSet
Throws:
SQLException

getBinaryStream

public InputStream getBinaryStream(String pColumnName)
                            throws SQLException
As per ResultSet.getBinaryStream(int).

Specified by:
getBinaryStream in interface ResultSet
Throws:
SQLException

getBinaryStream

public InputStream getBinaryStream(int pColumnIndex)
                            throws SQLException
As per ResultSet.getBinaryStream(int).

Specified by:
getBinaryStream in interface ResultSet
Throws:
SQLException

getUnicodeStream

public InputStream getUnicodeStream(String pColumnName)
                             throws SQLException
As per ResultSet.getUnicodeStream(int).

Specified by:
getUnicodeStream in interface ResultSet
Throws:
SQLException

getUnicodeStream

public InputStream getUnicodeStream(int pColumnIndex)
                             throws SQLException
As per ResultSet.getUnicodeStream(int).

Specified by:
getUnicodeStream in interface ResultSet
Throws:
SQLException

getCharacterStream

public Reader getCharacterStream(String pColumnName)
                          throws SQLException
As per ResultSet.getCharacterStream(int).

Specified by:
getCharacterStream in interface ResultSet
Throws:
SQLException

getCharacterStream

public Reader getCharacterStream(int pColumnIndex)
                          throws SQLException
As per ResultSet.getCharacterStream(int).

Specified by:
getCharacterStream in interface ResultSet
Throws:
SQLException

getURL

public URL getURL(String pColumnName)
           throws SQLException
As per ResultSet.getURL(int).

Specified by:
getURL in interface ResultSet
Throws:
SQLException

getURL

public URL getURL(int pColumnIndex)
           throws SQLException
As per ResultSet.getURL(int).

Specified by:
getURL in interface ResultSet
Throws:
SQLException

getDate

public Date getDate(String pColumnName)
             throws SQLException
As per ResultSet.getDate(int).

Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public Date getDate(String pColumnName,
                    Calendar pCalendar)
             throws SQLException
As per ResultSet.getDate(int).

Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public Date getDate(int pColumnIndex)
             throws SQLException
As per ResultSet.getDate(int).

Specified by:
getDate in interface ResultSet
Throws:
SQLException

getDate

public Date getDate(int pColumnIndex,
                    Calendar pCalendar)
             throws SQLException
As per ResultSet.getDate(int). Ignores pCalendar.

Specified by:
getDate in interface ResultSet
Throws:
SQLException

getTime

public Time getTime(String pColumnName)
             throws SQLException
As per ResultSet.getTime(int).

Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public Time getTime(String pColumnName,
                    Calendar pCalendar)
             throws SQLException
As per ResultSet.getTime(int).

Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public Time getTime(int pColumnIndex)
             throws SQLException
As per ResultSet.getTime(int).

Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTime

public Time getTime(int pColumnIndex,
                    Calendar pCalendar)
             throws SQLException
As per ResultSet.getTime(int). Ignores Calendar.

Specified by:
getTime in interface ResultSet
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(String pColumnName)
                       throws SQLException
As per ResultSet.getTimestamp(int).

Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(String pColumnName,
                              Calendar pCalendar)
                       throws SQLException
As per ResultSet.getTimestamp(int).

Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(int pColumnIndex)
                       throws SQLException
As per ResultSet.getTimestamp(int).

Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getTimestamp

public Timestamp getTimestamp(int pColumnIndex,
                              Calendar pCalendar)
                       throws SQLException
As per ResultSet.getTimestamp(int). Ignores Calendar.

Specified by:
getTimestamp in interface ResultSet
Throws:
SQLException

getLong

public long getLong(String pColumnName)
             throws SQLException
As per ResultSet.getLong(int).

Specified by:
getLong in interface ResultSet
Throws:
SQLException

getLong

public long getLong(int pColumnIndex)
             throws SQLException
As per ResultSet.getLong(int).

Specified by:
getLong in interface ResultSet
Throws:
SQLException

getShort

public short getShort(String pColumnName)
               throws SQLException
As per ResultSet.getShort(int).

Specified by:
getShort in interface ResultSet
Throws:
SQLException

getShort

public short getShort(int pColumnIndex)
               throws SQLException
As per ResultSet.getShort(int).

Specified by:
getShort in interface ResultSet
Throws:
SQLException

setDateFormat

public void setDateFormat(DateFormat pDateFormat)
Specify custom date format.

Parameters:
pDateFormat - custom data format

moveToLine

protected boolean moveToLine()
Move to correct data line.



Copyright © 2003-2006 Ricebridge