Mapper Write CRUDRepo
A WriteCRUDRepo wrapper that maps between different key, value, and input types. Allows adapting a repository to work with different type systems for both reading and writing.
Parameters
The underlying repository to wrap
The mapper for keys and values
The mapper for input types
Type Parameters
The external ID type
The external object type for read operations
The external input type for write operations
The internal ID type
The internal object type for read operations
The internal input type for write operations
Constructors
Properties
Flow that emits the ID of each deleted object after a successful deleteById call.
Provides a mapper for converting keys between inner and outer types.
Flow that emits each newly created object after a successful create call.
Mirrors WriteCRUDRepo.deletedObjectsIdsFlow under the name onDeletedObjectsIds for consistency with KV repos naming.
Mirrors WriteCRUDRepo.newObjectsFlow under the name onNewObjects for consistency with KV repos naming.
Mirrors WriteCRUDRepo.updatedObjectsFlow under the name onUpdatedObjects for consistency with KV repos naming.
Flow that emits each updated object after a successful update call.
Provides a mapper for converting values between inner and outer types.
Functions
Creates new objects from the given list of input values. Successfully created objects must be emitted via newObjectsFlow.
Vararg overload of WriteCRUDRepo.create for convenience.
Deletes objects with the given list of IDs. Successfully deleted IDs must be emitted via deletedObjectsIdsFlow.
Vararg overload of WriteCRUDRepo.deleteById for convenience.
Converts a key from the outer type to the inner type.
Converts a value from the outer type to the inner type.
Converts a value from the inner type to the outer type.
Batch-updates objects using the given list of ID-value pairs. Successfully updated objects must be emitted via updatedObjectsFlow.
Updates the object identified by id with the given value. Successfully updated object must be emitted via updatedObjectsFlow.
Vararg overload of WriteCRUDRepo.update for convenience.