Source<T> class
abstract
{@template Source} Parent type of all entries in a SourceList. Each Source subtype should know how to load data from a particular place. The field sourceType indicates whether that place is immediately accessible (and thus is a cache) or is remotely accessible and thus is the source of truth. {@endtemplate }
- Inheritance
-
- Object
- DataContract<
T> - Source
- Implementers
Properties
-
bindings
↔ Bindings<
T> -
All meta information about
Tnecessary to plug arbitrary data types into a Repository.getter/setter pair - hasBindings → bool
-
Proxy getter for whether bindings has been initialized, either by being
passed in via this constructor or by being set by the SourceList.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceType → SourceType
-
Indicator for whether this Source loads data from a store on-device, or
off-device.
no setter
Methods
-
delete(
DeleteOperation< T> operation) → Future<DeleteResult< T> > -
Clears an item with the given
DeleteOperation.itemIdif one exists.inherited -
getById(
ReadOperation< T> operation) → Future<ReadResult< T> > -
Loads the instance of
Twhose primary key is found atReadOperation.itemId.inherited -
getByIds(
ReadByIdsOperation< T> operation) → Future<ReadListResult< T> > -
Loads all instances of
Twhose primary key is in the set atReadByIdsOperation.itemIds.inherited -
getItems(
ReadListOperation< T> operation) → Future<ReadListResult< T> > -
Loads all instances of
Tthat satisfy any filtes or pagination onReadListOperation.details.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
SendMessageOperation< T> operation) → Future<WriteResult< T> > -
Sends a message object (e.g. for patching or decoupled creations).
inherited
-
setItem(
WriteOperation< T> operation) → Future<WriteResult< T> > -
Persists
WriteOperation.item.inherited -
setItems(
WriteListOperation< T> operation) → Future<WriteListResult< T> > -
Persists all
WriteListOperation.items.inherited -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited