RemoteRepository<D extends EntityModel, R extends EntitySearchModel> class
abstract
RemoteRepository
is an abstract class that extends DataRepository
and provides additional functionality for remote repositories.
- Inheritance
-
- Object
- DataRepository<
D, R> - RemoteRepository
- Implementers
- AttributesRemoteRepository
- BoundaryRemoteRepository
- FacilityRemoteRepository
- IndividualRemoteRepository
- ProductRemoteRepository
- ProductVariantRemoteRepository
- ProjectFacilityRemoteRepository
- ProjectProductVariantRemoteRepository
- ProjectRemoteRepository
- ProjectResourceRemoteRepository
- ProjectStaffRemoteRepository
- UserRemoteRepository
Constructors
-
RemoteRepository(Dio dio, {required Map<
ApiOperation, String> actionMap, required String entityName, bool isPlural = false, bool isSearchResponsePlural = false})
Properties
-
actionMap
→ Map<
ApiOperation, String> -
final
- bulkCreatePath → String
-
no setter
- bulkDeletePath → String
-
no setter
- bulkUpdatePath → String
-
no setter
- createPath → String
-
no setter
- dio → Dio
-
final
- entityName → String
-
final
- entityNamePlural → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPlural → bool
-
final
- isSearchResponsePlural → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchPath → String
-
no setter
- type → DataModelType
-
The
type
getter returns the type of the data model.no setterinherited - updatePath → String
-
no setter
Methods
-
bulkCreate(
List< EntityModel> entities) → FutureOr<Response> -
bulkDelete(
List< EntityModel> entities) → FutureOr<Response> -
bulkUpdate(
List< EntityModel> entities) → FutureOr<Response> -
create(
D entity) → FutureOr< Response> -
The
create
method creates a new entity.override -
delete(
D entity) → FutureOr< Response> -
The
delete
method deletes an existing entity.override -
downSync(
R query, {int? offSet, int? limit}) → FutureOr< Map< String, dynamic> > -
dumpError(
List< EntityModel> entities, DataOperation operation) → FutureOr<Response> -
executeFuture<
T> ({required Future< T> future()}) → FutureOr<T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
search(
R query, {int? offSet, int? limit}) → FutureOr< List< D> > -
The
search
method searches for entities that match the given query.override -
singleCreate(
D entity) → FutureOr< Response> -
toString(
) → String -
A string representation of this object.
inherited
-
update(
EntityModel entity) → FutureOr< Response> -
The
update
method updates an existing entity.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited