DelegatedCRUDRepository<Domain, Entity extends EntityObject, ExternalRepo extends CRUDObjectBox<Entity> > class
abstract
Default implementation of CRUDRepository of type Domain & Entity extends EntityObject It's basically a delegate to the ObjectBox.
EXAMPLE: This is the implementation of ParentRepo.
class ParentRepo extends DelegatedCRUDRepository<ParentDomain, ParentEntity> {
@override
void doStuffInRepo(){
print('Doing Stuff in the repository layer...');
}
}
- Inheritance
-
- Object
- CRUDRepository<
Domain> - DelegatedCRUDRepository
- Implementers
Constructors
-
DelegatedCRUDRepository({required ExternalRepo externalRepo, required Converter<
Domain, Entity> converter}) - Default Constructor
Properties
-
converter
↔ Converter<
Domain, Entity> -
Converter of this repo, hadler of transaction domain <==> entity
getter/setter pair
- externalRepo ↔ ExternalRepo
-
External repo, the one who really do the operations.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
count(
) → int -
Count the amount of domains.
override
-
create(
Domain newObject) → Domain -
Create the domain
Return the domain after been persisted, the returned domain have the
properties assigned by the repo, like the new id.
override
-
delete(
Domain objectToDestroy) → void -
Destroy the domain.
override
-
deleteById(
int id) → void -
Destroy the domain.
override
-
dispose(
) → void -
override
-
edit(
Domain objectToEdit) → Domain -
Edit the domain
override
-
findAll(
) → List< Domain> -
Find all domains
override
-
findById(
int keyId) → Domain? -
Find the correspondent domain by it's Key Id.
override
-
init(
) → void -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited