DelegatedCRUDRepo<Domain extends BasicDomainObject<IntIdentifier>, Entity extends BasicEntityObject, ExternalRepo extends CRUDRepositoryFramework<Entity>> class abstract

Default implementation of CRUDRepository of type Domain extends BasicDomainObject & Entity extends BasicEntityObject

EXAMPLE: This is the implementation of ParentRepo. See BasicDomainObject for ParentDomain's example code. See BasicEntityObject for ParentEntity's example code. See CRUDRepository for ParentRepo's example code.

  class ParentRepoImpl extends DefaultCRUDRepo<ParentDomain, ParentEntity>
      implements ParentRepo {
      @override
      void doStuffInRepo(){
        print('Doing Stuff in the repository layer...');
      }
  }
Inheritance

Constructors

DelegatedCRUDRepo({required ExternalRepo externalRepo, required GeneralConverter<Domain, Entity> converter})
Default Constructor

Properties

converter GeneralConverter<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