org.pojava.persistence.processor
Class ResultSetToProcessor<T>

java.lang.Object
  extended by org.pojava.persistence.processor.ResultSetToProcessor<T>
All Implemented Interfaces:
ResultSetProcessor

public class ResultSetToProcessor<T>
extends Object
implements ResultSetProcessor

Process a ResultSet into a method implementing the Processor interface.

Author:
John Pile

Constructor Summary
ResultSetToProcessor(TableMap<T> map, org.pojava.lang.Processor<T> processor)
          Constructor mapping a TableMap to a Processor.
 
Method Summary
 int process(ResultSet rs)
          Invoke the processor.process callback, passing each retrieved object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetToProcessor

public ResultSetToProcessor(TableMap<T> map,
                            org.pojava.lang.Processor<T> processor)
Constructor mapping a TableMap to a Processor.

Parameters:
map -
processor -
Method Detail

process

public int process(ResultSet rs)
            throws SQLException
Invoke the processor.process callback, passing each retrieved object.

Specified by:
process in interface ResultSetProcessor
Returns:
number of rows processed
Throws:
SQLException


Copyright © 2011. All Rights Reserved.