Expense Type Cache Adapter
Component Detail
Infrastructure
low complexity
mobile
0
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Low-level infrastructure adapter responsible for persisting and retrieving the expense type catalogue from the device's local SQLite database. Handles serialisation of the JSON rules field (mutual-exclusivity groups, documentation flags, thresholds) to and from SQLite column storage. Abstracts storage implementation from the Expense Type Store.
expense-type-cache-adapter
Responsibilities
- Write the serialised expense type catalogue to local SQLite
- Read and deserialise the catalogue on demand
- Store and retrieve the catalogue version integer for staleness checks
- Wipe persisted catalogue on logout or org context switch
Interfaces
writeCatalogue(orgId: string, catalogue: ExpenseTypeCatalogue): Future<void>
readCatalogue(orgId: string): Future<ExpenseTypeCatalogue?>
writeVersion(orgId: string, version: int): Future<void>
readVersion(orgId: string): Future<int>
deleteCatalogue(orgId: string): Future<void>
Relationships
Related Data Entities (1)
Data entities managed by this component