|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
P
- The type or any supertype of the Prevalent System you intend to perform the transaction and query upon. R
- The type of object which should be returned. public interface TransactionWithQuery<P,R>
A Transaction that also returns a result or throws an Exception after executing.
A "PersonCreation" Transaction, for example, may return the Person it created. Without this, to retrieve the newly created Person, the caller would have to issue a Query like: "What was the last Person I created?".
Looking at the Prevayler demos is by far the best way to learn how to use this class.
Transaction
Method Summary | |
---|---|
R |
executeAndQuery(P prevalentSystem,
Date executionTime)
Performs the necessary modifications on the given prevalentSystem and also returns an object or throws an Exception. |
Method Detail |
---|
R executeAndQuery(P prevalentSystem, Date executionTime) throws Exception
) to execute this TransactionWithQuery on the given Prevalent System. See org.prevayler.demos for usage examples.
prevalentSystem
- The system on which this TransactionWithQuery will execute.executionTime
- The time at which this TransactionWithQuery is being executed. Every Transaction executes completely within a single moment in time. Logically, a Prevalent System's time does not pass during the execution of a Transaction.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |