|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceBrokerCallback
Callback interface for OJB PersistenceBroker code. To be used with PersistenceBrokerTemplate's execute method, assumably often as anonymous classes within a method implementation.
The typical implementation will call PersistenceBroker CRUD to perform some operations on persistent objects.
PersistenceBrokerTemplate
Method Summary | |
---|---|
Object |
doInPersistenceBroker(org.apache.ojb.broker.PersistenceBroker pb)
Gets called by PersistenceBrokerTemplate.execute with an active
PersistenceBroker. |
Method Detail |
---|
Object doInPersistenceBroker(org.apache.ojb.broker.PersistenceBroker pb) throws org.apache.ojb.broker.PersistenceBrokerException, org.apache.ojb.broker.accesslayer.LookupException, SQLException
PersistenceBrokerTemplate.execute
with an active
PersistenceBroker. Does not need to care about activating or closing the
PersistenceBroker, or handling transactions.
Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects. A thrown RuntimeException is treated as application exception, it gets propagated to the caller of the template.
pb
- active PersistenceBroker
null
if none
org.apache.ojb.broker.PersistenceBrokerException
- in case of OJB errors
org.apache.ojb.broker.accesslayer.LookupException
- if thrown by OJB lookup methods
SQLException
- in case of errors on direct JDBC accessPersistenceBrokerTemplate.execute(org.springframework.orm.ojb.PersistenceBrokerCallback)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |