01: package org.romaframework.core.command;
02:
03: import org.romaframework.aspect.persistence.PersistenceAspect;
04:
05: /**
06: * Mark the command as transactional
07: * @author Giordano Maestro(giordano.maestro@assetdata.it) 20/set/07
08: *
09: */
10: public abstract class TransactionCommand implements Command {
11:
12: public final Object execute(CommandContext iContext) {
13: PersistenceAspect db = ((TransactionalCommandContext) iContext)
14: .getDb();
15: return execute(db, iContext);
16: }
17:
18: protected abstract Object execute(PersistenceAspect db,
19: CommandContext iContext);
20:
21: }
|