From fe089cc2b2eac73cb6c1217eab85d8d87112ceb7 Mon Sep 17 00:00:00 2001 From: Yossi Mesika Date: Sun, 26 May 2019 21:40:31 +0300 Subject: [PATCH] UML describing the RxRepo query providers --- .../uml/query-providers-high-level.puml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 rxrepo-core/uml/query-providers-high-level.puml diff --git a/rxrepo-core/uml/query-providers-high-level.puml b/rxrepo-core/uml/query-providers-high-level.puml new file mode 100644 index 00000000..a137150e --- /dev/null +++ b/rxrepo-core/uml/query-providers-high-level.puml @@ -0,0 +1,46 @@ +@startuml + +rectangle RxRepo { + + interface Repository { + +entities(meta: MetaClassWithKey): EntitySet + +{static}fromProvider(provider: QueryProvider, decorators: UnaryOperator...): Repository + } + class DefaultRepository implements Repository { + -entitySetMap: Map, EntitySet> + } + + interface EntitySet { + +update() + +observe() + +query() + +find() + +findAll() + +findFirst() + +clear() + +delete() + +deleteAll() + } + class DefaultEntitySet> implements EntitySet + + interface QueryProvider { + +insertOrUpdate(entity: S): Single + +insertOrUpdate(metaClass: MetaClassWithKey, key: K, entityUpdater: Function): Maybe + +query(query: QueryInfo): Observable + +liveQuery(query: QueryInfo): Observable> + +aggregate(query: QueryInfo, aggregator: Aggregator): Single + +update(update: UpdateInfo): Observable + +delete(delete: DeleteInfo): Single + } + interface QueryPublisher { + +subscribe(queryListener: QueryPublisher.QueryListener) + } + class SqlQueryProvider implements QueryProvider + class CacheQueryProviderDecorator implements QueryProvider + class InterceptingQueryProvider implements QueryProvider, QueryPublisher +} + +DefaultRepository "1" o-- "*" DefaultEntitySet: <> +DefaultEntitySet .> QueryProvider: <> + +@enduml