Data persistence
Each Resource type uses…
- An adapter
- A Service object that extends an adapter and mixin for a cache strategy
The Store Service…
- Is a facade for each service object (per resource type).
The service for a resource instance includes CRUD methods to persist resources. The ApplicationAdapter
defines these methods.
As a convenience, a ResourceOperationsMixin
provides a shortcut on for a resource to persist data via an injected service.
Method | Description |
---|---|
createResource |
Creates a new resource using POST |
updateResource |
Updates an existing resource using PATCH |
deleteResource |
Delete an existing resource using DELETE |
createRelationship |
Uses url from resource to POST a to-many relation |
updateRelationship |
Uses url from resource to PATCH relation, to-one or to-many (replaces all) |
deleteRelationship |
Uses url from resource to DELETE a to-many relation |