UserDataHolder

open class UserDataHolder

Class for storing transaction data that should remain available to the transaction scope even after the transaction is committed.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun <T : Any> getOrCreate(key: Key<T>, init: () -> T): T

Returns the value for the specified key. If the key is not found, the init function is called, then its result is mapped to the key and returned.

Link copied to clipboard
fun <T : Any> getUserData(key: Key<T>): T?

Returns the value to which the specified key is mapped, as a value of type T.

Link copied to clipboard
fun <T : Any> putUserData(key: Key<T>, value: T)

Maps the specified key to the specified value.

Link copied to clipboard
fun <T : Any> removeUserData(key: Key<T>): Any?

Removes the specified key and its corresponding value.