org.kuali.common.jdbc.suppliers
Class ComplexStringSupplier

java.lang.Object
  extended by org.kuali.common.jdbc.suppliers.AbstractSupplier
      extended by org.kuali.common.jdbc.suppliers.ComplexStringSupplier
All Implemented Interfaces:
Comparable<SqlSupplier>, SqlSupplier

public final class ComplexStringSupplier
extends AbstractSupplier

Supply SQL from strings that may have more than one SQL statement each


Constructor Summary
ComplexStringSupplier(List<String> strings, SqlReader reader)
           
ComplexStringSupplier(String sql, SqlReader reader)
           
 
Method Summary
 void close()
          Close the supplier to free any resources it may have opened
protected  BufferedReader getBufferedReader(List<String> strings, int index)
          Extract a String from the list and open a BufferedReader that can read from it
 SqlMetaData getMetaData()
          Return SQL count and overall size
 SqlReader getReader()
           
 List<String> getSql()
          Return a list of SQL statements to execute.
 List<String> getStrings()
           
 void open()
          Open the supplier so it is ready to provide SQL
 
Methods inherited from class org.kuali.common.jdbc.suppliers.AbstractSupplier
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexStringSupplier

public ComplexStringSupplier(String sql,
                             SqlReader reader)

ComplexStringSupplier

public ComplexStringSupplier(List<String> strings,
                             SqlReader reader)
Method Detail

open

public void open()
Description copied from interface: SqlSupplier
Open the supplier so it is ready to provide SQL


getSql

public List<String> getSql()
Description copied from interface: SqlSupplier
Return a list of SQL statements to execute. Returns null when the SQL supply has been exhausted.


close

public void close()
Description copied from interface: SqlSupplier
Close the supplier to free any resources it may have opened


getBufferedReader

protected BufferedReader getBufferedReader(List<String> strings,
                                           int index)
Extract a String from the list and open a BufferedReader that can read from it


getMetaData

public SqlMetaData getMetaData()
Description copied from interface: SqlSupplier
Return SQL count and overall size


getStrings

public List<String> getStrings()

getReader

public SqlReader getReader()


Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.