|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.CompassCallbackWithoutResult
public abstract class CompassCallbackWithoutResult
Simple convenience class for the CompassCallback implementation. Allows implementing a doInCompass version without a result, i.e without the need for a return statement.
| Constructor Summary | |
|---|---|
CompassCallbackWithoutResult()
|
|
| Method Summary | |
|---|---|
Object |
doInCompass(CompassSession session)
Gets called by CompassTemplate.execute with an active
Compass Session. |
protected abstract void |
doInCompassWithoutResult(CompassSession session)
Gets called by CompassTemplate.execute with an active
Compass Session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompassCallbackWithoutResult()
| Method Detail |
|---|
public Object doInCompass(CompassSession session)
throws CompassException
CompassCallbackCompassTemplate.execute with an active
Compass Session. Does not need to care about activating or closing the
Session, or handling transactions.
If called within a thread-bound Compass transaction (initiated by an outer compass transaction abstraction), the code will simply get executed on the outer compass transaction with its transactional semantics.
Allows for returning a result object created within the callback, i.e. a domain object or a hits of domain objects. Note that there's special support for single step actions: see CompassTemplate.find etc. A thrown RuntimeException is treated as application exception, it gets propagated to the caller of the template.
doInCompass in interface CompassCallback<Object>CompassException
protected abstract void doInCompassWithoutResult(CompassSession session)
throws CompassException
CompassTemplate.execute with an active
Compass Session. Does not need to care about activating or closing the
Session, or handling transactions.
If called without a thread-bound Compass transaction (initiated by an outer compass transaction abstraction), the code will simply get executed on the outer compass transaction with its transactional semantics.
session -
CompassException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||