Repository class abstract

Base class for repository services.

Repositories are services that provide an abstract interface for (preferably CRUD) operations on a data source.

This service initializes a DatabaseAdapter by calling initializeAdapter which must be implemented by the inheriting class. It opens a single connection and keeps it alive during it's life cycle.

Configuration values: ignoreMigration: ignore schema migration while initializing (optional)

See also: CRUDRepository

Inheritance
Implementers

Constructors

Repository(String? config)

Properties

configPath ConfigPath?
finalinherited
environment Environment
Fetch the environment configuration from ConfigService.
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

config<T>(String path) → T
Fetches a configuration value from ConfigService.
inherited
configObject<T extends TransferObjectBase>(String path, TransferBean<T> bean) → T
Fetches a configuration value from ConfigService and parse it into the TransferObject.
inherited
initialize() Future<void>
override
initializeAdapter() Future<DatabaseAdapter<DatabaseConnection>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<void>
override
toString() String
A string representation of this object.
inherited
transaction<T>(Future<T> delegate(DatabaseContext context)) Future<T>
Executes delegate inside of a database transaction.

Operators

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