CRUDRepository<Domain extends BasicDomainObject<IntIdentifier>> class abstract

AbstractRepository of CRUD operations, of type Domain extends BasicDomainObject. Generally not implemented, instead extends the use case from DefaultCRUDRepo.

See AbstractRepository for general info.

EXAMPLE: This is the definition of Parent CRUDRepository, it need to be implemented after, implementation example at DefaultCRUDRepo.

See BasicDomainObject for ParentDomain's example code.

  abstract class ParentRepo extends CRUDRepository<ParentDomain> {
    //define in here the methods of this repo, implemented it [DefaultCRUDRepo]
    void doStuffInRepo();
  }
Inheritance
Implementers

Constructors

CRUDRepository()

Properties

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. By default calling the length of findAll().
create(Domain newObject) → Domain
Create the domain.
delete(Domain objectToDestroy) → void
Destroy the domain.
deleteById(int id) → void
Destroy the domain by it's id.
dispose() → void
edit(Domain objectToEdit) → Domain
Edit the domain.
findAll() List<Domain>
Find all domains.
findById(int keyId) → Domain?
Find the correspondent domain by it's Key Id.
init() → void
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