org.postgresql.pljava.example
Class UsingProperties

java.lang.Object
  extended by org.postgresql.pljava.example.UsingProperties
All Implemented Interfaces:
PooledObject, ResultSetProvider

public class UsingProperties
extends Object
implements ResultSetProvider, PooledObject

Author:
Thomas Hallgren

Constructor Summary
UsingProperties(ObjectPool pool)
           
 
Method Summary
 void activate()
          The activate method is called when the instance is activated from its "passive" state.
 boolean assignRowValues(ResultSet receiver, int currentRow)
          This method is called once for each row that should be returned from a procedure that returns a set of rows.
 void close()
          Called after the last row has returned or when the query evaluator decides that it does not need any more rows.
static ResultSetProvider getProperties()
           
 void passivate()
          The passivate method is called before the instance enters the "passive" state.
 void remove()
          PLJava invokes this method before it ends the life of the pooled object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsingProperties

public UsingProperties(ObjectPool pool)
                throws IOException
Throws:
IOException
Method Detail

activate

public void activate()
Description copied from interface: PooledObject
The activate method is called when the instance is activated from its "passive" state.

Specified by:
activate in interface PooledObject

remove

public void remove()
Description copied from interface: PooledObject
PLJava invokes this method before it ends the life of the pooled object.

Specified by:
remove in interface PooledObject

passivate

public void passivate()
Description copied from interface: PooledObject
The passivate method is called before the instance enters the "passive" state.

Specified by:
passivate in interface PooledObject

assignRowValues

public boolean assignRowValues(ResultSet receiver,
                               int currentRow)
                        throws SQLException
Description copied from interface: ResultSetProvider
This method is called once for each row that should be returned from a procedure that returns a set of rows. The receiver is a SingleRowWriter writer instance that is used for capturing the data for the row.

Specified by:
assignRowValues in interface ResultSetProvider
Parameters:
receiver - Receiver of values for the given row.
currentRow - Row number. First call will have row number 0.
Returns:
true if a new row was provided, false if not (end of data).
Throws:
SQLException

close

public void close()
           throws SQLException
Description copied from interface: ResultSetProvider
Called after the last row has returned or when the query evaluator decides that it does not need any more rows.

Specified by:
close in interface ResultSetProvider
Throws:
SQLException

getProperties

public static ResultSetProvider getProperties()
                                       throws SQLException
Throws:
SQLException