Repository<V extends Entity> class
abstract
Base interface for defining persistence endpoints. Can be plugged into SunnyStore
for convenient API access
- Implementers
- Available extensions
Constructors
Properties
- apis → ApiRegistry?
-
A reference back to the api registry
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- mtype → MSchemaRef
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clone(
V source) → V - Copies values from one entity into another. This clone operation is important because it allows
-
create(
V body) → Future< V> -
delete(
String id) → Future< DeleteResponse> -
initialize(
V entity) → V -
instantiate(
[dynamic json]) → V -
keyToId(
MKey? key) → String? -
list(
{double? limit, double? offset}) → Future< MModelList< V> > -
load(
String id) → Future< V> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
X toSave) → Future< X> -
Available on Repository<
X> , provided by the RepositoryExtensions extension -
takeFrom(
V source, V target) → void -
Copies all data from
source
intotarget
. Used when you want to maintain a reference totarget
, but want to inject new values fromsource
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String id, V body) → Future< ChangeResult>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited