Association Membership Repository
Component Detail
Data Layer
medium complexity
backendmobile
0
Dependencies
3
Dependents
4
Entities
0
Integrations
Description
Data access layer responsible for all CRUD operations on user-to-association membership records, backed by the user_organization_roles table. Provides local caching of membership lists for offline use and exposes query methods used by the Membership Service and Context Management Service.
association-membership-repository
Responsibilities
- Query all associations and roles for a given user from user_organization_roles
- Cache membership list locally for offline and performance optimization
- Insert, update, and delete membership records
- Resolve organization and local association details for each membership
Interfaces
findMembershipsByUserId(userId: String): Future<List<UserOrganizationRole>>
findMembershipByUserAndOrg(userId: String, associationId: String): Future<UserOrganizationRole?>
insertMembership(membership: UserOrganizationRole): Future<void>
deleteMembership(userId: String, associationId: String): Future<void>
countMemberships(userId: String): Future<int>
getMembershipWithDetails(userId: String): Future<List<AssociationMembershipDetail>>
invalidateCache(userId: String): void
syncFromRemote(userId: String): Future<void>
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (4)
Data entities managed by this component