Skip to content

Commit

Permalink
Add Transaction to lifecycle hooks for #1530 (#1531) / Wrong methods …
Browse files Browse the repository at this point in the history
…fixed
  • Loading branch information
Tapac committed Jul 28, 2022
1 parent 267ff7d commit 096682c
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ interface StatementInterceptor {
fun beforeExecution(transaction: Transaction, context: StatementContext) {}
fun afterExecution(transaction: Transaction, contexts: List<StatementContext>, executedStatement: PreparedStatementApi) {}

fun beforeCommit(transaction: Transaction) { beforeCommit() }

@Deprecated("using beforeCommit with transaction")
//@Deprecated("using beforeCommit with transaction", level = DeprecationLevel.ERROR) \\ next version
//@Deprecated("using beforeCommit with transaction", level = DeprecationLevel.HIDDEN) \\ next version, backward compatibility
fun beforeCommit() {}
fun afterCommit(transaction: Transaction) { afterCommit() }
fun beforeCommit(transaction: Transaction) {}

@Deprecated("using afterCommit with transaction")
//@Deprecated("using afterRollback with transaction", level = DeprecationLevel.ERROR) \\ next version
//@Deprecated("using afterRollback with transaction", level = DeprecationLevel.HIDDEN) \\ next version, backward compatibility
//@Deprecated("using afterCommit with transaction", level = DeprecationLevel.ERROR) \\ next version
//@Deprecated("using afterCommit with transaction", level = DeprecationLevel.HIDDEN) \\ next version, backward compatibility
fun afterCommit() {}
fun afterCommit(transaction: Transaction) { afterCommit() }

fun beforeRollback(transaction: Transaction) {}
fun afterRollback(transaction: Transaction) {}

@Deprecated("using afterRollback with transaction")
//@Deprecated("using afterRollback with transaction", level = DeprecationLevel.ERROR) \\ next version
//@Deprecated("using afterRollback with transaction", level = DeprecationLevel.HIDDEN) \\ next version, backward compatibility
fun afterRollback() {}
fun afterRollback(transaction: Transaction) { afterRollback() }

fun keepUserDataInTransactionStoreOnCommit(userData: Map<Key<*>, Any?>): Map<Key<*>, Any?> = emptyMap()
}
Expand Down

0 comments on commit 096682c

Please sign in to comment.