Service<T extends Modelable> class abstract base

Manager service for data of type T.

Implementers

Constructors

Service(String repositoryId, T fromModelFactory(Model))
Creates a new Service.

Properties

fromModelFactory ↔ T Function(Model)
Factory to create an instance of T from a Model.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
repository Repository
Data repository.
latefinal
repositoryId String
Id of the repository.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear({String? userId}) Future<void>
Performs repository.clear().
count({String? userId, Where? where}) Future<int>
Performs repository.count().
create(T item, {String? wantedId}) Future<String>
Creates a new entry in the repository. Returns the id of the new entry.
delete(T item) Future<void>
Performs repository.delete().
deleteWhere(Where where) Future<void>
Performs repository.deleteWhere().
get(String id) Future<T>
Performs repository.get().
getAll({String? userId, Where? where, String? orderBy, bool descending = true}) Future<List<T>>
Performs repository.getAll().
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(T item) Future<void>
Performs repository.update().

Operators

operator ==(Object other) bool
The equality operator.
inherited