org.apache.lokahi.core.common.interfaces
Interface ReadOnlyBroker<T extends Dao>

All Known Subinterfaces:
TMCBroker<T>
All Known Implementing Classes:
CachingBroker, DerbyBroker, OracleBroker, XMLBroker

public interface ReadOnlyBroker<T extends Dao>

Allows reads to implementing datastores.

Version:
$Id: ReadOnlyBroker.java,v 1.3 2006/03/07 20:18:52 drtobes Exp $
Author:
Stephen Toback

Method Summary
 T getObject(java.lang.Class<T> c, java.lang.String statement, boolean cache, java.lang.Object... params)
          Gets a singular object from the datastore.
 java.util.Collection<T> getObjects(java.lang.Class<T> c, boolean cache, java.lang.String statement, java.lang.Object... params)
          Gets a collection of objects from the datastore.
 

Method Detail

getObject

T getObject(java.lang.Class<T> c,
            java.lang.String statement,
            boolean cache,
            java.lang.Object... params)
                        throws java.sql.SQLException
Gets a singular object from the datastore.

Parameters:
c - Class of the expected object return.
statement - key to get the object from the datastore.
cache - true a cached object will suffice.
params - objects to look up the desired object by.
Returns:
object of Class c populated.
Throws:
java.sql.SQLException

getObjects

java.util.Collection<T> getObjects(java.lang.Class<T> c,
                                   boolean cache,
                                   java.lang.String statement,
                                   java.lang.Object... params)
                                               throws java.sql.SQLException
Gets a collection of objects from the datastore.

Parameters:
c - Class of the expected object return.
statement - key to get the object from the datastore.
cache - true a cached object will suffice.
params - objects to look up the desired object by.
Returns:
object of Class c populated.
Throws:
java.sql.SQLException