diff --git a/jOOQ/src/main/java/org/jooq/TransactionContext.java b/jOOQ/src/main/java/org/jooq/TransactionContext.java index 82c0cbe211..a2c76edca6 100644 --- a/jOOQ/src/main/java/org/jooq/TransactionContext.java +++ b/jOOQ/src/main/java/org/jooq/TransactionContext.java @@ -67,6 +67,27 @@ public interface TransactionContext extends Scope { @NotNull TransactionContext transaction(Transaction transaction); + /** + * The result of a {@link TransactionalCallable} or + * {@link ContextTransactionalCallable}, if the transaction has completed + * successfully. + * + * @return The result. May be null if the transaction hasn't + * completed yet, or if there was no result (e.g. in a + * {@link TransactionalRunnable} or + * {@link ContextTransactionalRunnable}), or if the result is + * null. + */ + @Nullable + Object result(); + + /** + * Set the result of the {@link TransactionalCallable} or + * {@link ContextTransactionalCallable}. + */ + @NotNull + TransactionContext result(Object result); + /** * The exception that has caused the rollback. *