org.postgresql.pljava.jdbc
Class SingleRowWriter

java.lang.Object
  extended byorg.postgresql.pljava.jdbc.AbstractResultSet
      extended byorg.postgresql.pljava.jdbc.ObjectResultSet
          extended byorg.postgresql.pljava.jdbc.SingleRowResultSet
              extended byorg.postgresql.pljava.jdbc.SingleRowWriter
All Implemented Interfaces:
java.sql.ResultSet

public class SingleRowWriter
extends SingleRowResultSet

A single row, updateable ResultSet, specially made for functions and procedures that returns complex types or sets.


Field Summary
 
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
SingleRowWriter(TupleDesc tupleDesc)
           
 
Method Summary
 void cancelRowUpdates()
           
protected  java.lang.Object getObjectValue(int columnIndex)
           
 Tuple getTupleAndClear()
          Creates a tuple from the current row values and then cancel all row updates to prepare for a new row.
protected  TupleDesc getTupleDesc()
           
 boolean rowUpdated()
          Returns true if the row contains any non null values since all values of the row are null initially.
 void updateObject(int columnIndex, java.lang.Object x)
           
 
Methods inherited from class org.postgresql.pljava.jdbc.SingleRowResultSet
absolute, afterLast, beforeFirst, close, deleteRow, findColumn, first, getConcurrency, getCursorName, getFetchDirection, getFetchSize, getRow, getStatement, getType, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, relative, rowDeleted, rowInserted, setFetchDirection, setFetchSize, updateObject, updateRow
 
Methods inherited from class org.postgresql.pljava.jdbc.ObjectResultSet
clearWarnings, getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getMetaData, getNumber, getObject, getObject, getObjectValue, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL, getValue, getValue, getWarnings, refreshRow, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateRef, updateShort, updateString, updateTime, updateTimestamp, wasNull
 
Methods inherited from class org.postgresql.pljava.jdbc.AbstractResultSet
getArray, getAsciiStream, getBigDecimal, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getBytes, getCharacterStream, getClob, getDate, getDate, getDouble, getFloat, getInt, getLong, getObject, getObject, getRef, getShort, getString, getTime, getTime, getTimestamp, getTimestamp, getUnicodeStream, getURL, updateArray, updateAsciiStream, updateBigDecimal, updateBinaryStream, updateBlob, updateBoolean, updateByte, updateBytes, updateCharacterStream, updateClob, updateDate, updateDouble, updateFloat, updateInt, updateLong, updateNull, updateObject, updateObject, updateRef, updateShort, updateString, updateTime, updateTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleRowWriter

public SingleRowWriter(TupleDesc tupleDesc)
                throws java.sql.SQLException
Method Detail

getObjectValue

protected java.lang.Object getObjectValue(int columnIndex)
                                   throws java.sql.SQLException
Specified by:
getObjectValue in class ObjectResultSet
Throws:
java.sql.SQLException

rowUpdated

public boolean rowUpdated()
                   throws java.sql.SQLException
Returns true if the row contains any non null values since all values of the row are null initially.

Throws:
java.sql.SQLException

updateObject

public void updateObject(int columnIndex,
                         java.lang.Object x)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

cancelRowUpdates

public void cancelRowUpdates()
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getTupleAndClear

public Tuple getTupleAndClear()
                       throws java.sql.SQLException
Creates a tuple from the current row values and then cancel all row updates to prepare for a new row.

Returns:
The Tuple reflecting the current row values.
Throws:
java.sql.SQLException

getTupleDesc

protected final TupleDesc getTupleDesc()
Specified by:
getTupleDesc in class SingleRowResultSet


Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. Distributed under the terms shown in COPYRIGHT