Mapper Key Value Repo
Full key-value repository adapter that applies type mapping via MapperRepo. Composes MapperReadKeyValueRepo and MapperWriteKeyValueRepo for read and write delegation.
Parameters
The underlying KeyValueRepo to delegate operations to
The MapperRepo providing bidirectional key/value type conversions
Type Parameters
The outer key type exposed by this repo
The outer value type exposed by this repo
The inner key type used by the underlying to repo
The inner value type used by the underlying to repo
Constructors
Properties
Provides a mapper for converting keys between inner and outer types.
This flow must emit data each time when data by Key has been removed with unset/unsetWithValues methods or in any other way
Provides a mapper for converting values between inner and outer types.
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.
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.
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.