Delegate Based Key Value Repo
Delegate-based implementation of KeyValueRepo that composes separate read and write delegates.
Parameters
Delegate providing all ReadKeyValueRepo operations
Delegate providing all WriteKeyValueRepo operations
Type Parameters
The type of keys in the repository
The type of values in the repository
Constructors
Properties
This flow must emit data each time when data by Key has been removed with unset/unsetWithValues methods or in any other way
Functions
Applies the given diff to this KeyValueRepo: removes entries in MapDiff.removed, updates entries in MapDiff.changed, and adds entries in MapDiff.added.
Computes the diff between this KeyValueRepo and other, then applies the diff to this repo.
Wraps this KeyValueRepo (mapping keys to Lists) as a KeyValuesFromKeyValueRepo. Uses identity conversion for the list iterable.
Wraps this KeyValueRepo (mapping keys to Sets) as a KeyValuesFromKeyValueRepo. Converts lists to sets when persisting changes, ensuring value uniqueness per key.
Wraps this KeyValueRepo (mapping keys to iterables) as a KeyValuesFromKeyValueRepo, exposing a full one-to-many read-write interface.
Wraps this ReadKeyValueRepo as a ReadCRUDFromKeyValueRepo, exposing CRUD read operations.
Wraps this ReadKeyValueRepo (mapping keys to iterables) as a ReadKeyValuesFromKeyValueRepo, exposing a one-to-many read interface.
By default, will remove all the data of current repo using doAllWithCurrentPaging, keys and unset
Computes the difference between all entries in this ReadKeyValueRepo and the given other map.
This method should use sorted by Keys search and return the PaginationResult. By default, it should use ascending sort for Keys
This method should use sorted by Keys search and return the PaginationResult. By default, it should use ascending sort for Keys.
Creates a pagination starting from the first page with size equal to the total count of items in this ReadKeyValueRepo. This effectively creates a single page containing all items.
List overload of WriteKeyValueRepo.set accepting a list of pairs.
Vararg overload of WriteKeyValueRepo.set accepting pairs.
Single-entry overload of WriteKeyValueRepo.set.
Vararg overload of WriteKeyValueRepo.unset.
Will unset as batch data with values from toUnset. Must pass the Keys which were successfully removed in repo to onValueRemoved
Vararg overload of WriteKeyValueRepo.unsetWithValues.
This method should use sorted by Keys search and return the PaginationResult. By default, it should use ascending sort for Keys
Wraps this KeyValueRepo with a MapperRepo to expose a mapped KeyValueRepo.
Wraps this ReadKeyValueRepo with a MapperRepo to expose a mapped ReadKeyValueRepo.
Wraps this WriteKeyValueRepo with a MapperRepo to expose a mapped WriteKeyValueRepo.
Wraps this KeyValueRepo with inline conversion lambdas to expose a mapped KeyValueRepo.
Wraps this ReadKeyValueRepo with inline conversion lambdas to expose a mapped ReadKeyValueRepo.
Wraps this WriteKeyValueRepo with inline conversion lambdas to expose a mapped WriteKeyValueRepo.