RevisableDataRepository<T extends DataObject> mixin

An interface with default DataRepository adapter for Components providing CRUD functionality for revisable DataObject collections.

Superclass constraints

Properties

bean → DataBean<T>
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

any({Filter filter = Filter.empty, bool locked = false, bool skipLocked = false}) → Future<bool>
Returns true if any element matches the filter.
inherited
atomic<R>(Future<R> delegate()) → Future<R>
Runs all calls to this repository from inside delegate inside an atomic transaction.
inherited
count({Filter filter = Filter.empty}) → Future<int>
Returns the count of all elements that match filter.
inherited
create(T element, {DateTime? from}) → Future<T>
Creates a new element.
override
createRevision(T data, {DateTime? from, required int type}) → Future<RevisionData<T>>
Create a new element revision.
deleteAll({required Filter filter}) → Future<int>
Deletes all elements matching the filter.
inherited
deleteById(dynamic id, {DateTime? from}) → Future<bool>
Find and delete an element by its DataBean.idField value.
override
first({Filter filter = Filter.empty, Sort sort = Sort.empty, int offset = 0, bool locked = false, bool skipLocked = false}) → Future<T?>
Returns the first element that matches the filter.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAll({Filter filter = Filter.empty, Sort sort = Sort.empty, int? offset, int? limit, bool locked = false, bool skipLocked = false}) → Future<List<T>>
Read all elements respecting filter, sort, offset and limit values.
override
readById(dynamic id, {bool locked = false, bool skipLocked = false}) → Future<T?>
Find and read an element by its DataBean.idField value.
override
readRevisionsById(dynamic id, {int? offset, int? limit, bool locked = false, bool skipLocked = false}) → Future<List<RevisionData<T>>>
Find an element by its DataBean.idField value and reads all revisions of the element respecting offset and limit values.
revisableReadAll({Filter filter = Filter.empty, Sort sort = Sort.empty, int? offset, int? limit, bool locked = false, bool skipLocked = false}) → Future<List<RevisionData<T>>>
Read all elements with RevisionData respecting filter, sort, offset and limit values.
revisableReadById(dynamic id, {int? version, bool locked = false, bool skipLocked = false}) → Future<RevisionData<T>?>
Find and read an element with RevisionData by its DataBean.idField value.
toString() → String
A string representation of this object.
inherited
updateAll({required Filter filter, required Map<DataField<T, dynamic>, dynamic> values}) → Future<int>
Updates the given values of all elements matching the filter.
inherited
updateById(T element, {DateTime? from}) → Future<bool>
Find and update an element by its DataBean.idField value.
override

Operators

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