get abstract method

Future<Map<String, dynamic>> get(
  1. String key,
  2. DbPrincipal principal, {
  3. SearchPolicy? searchPolicy,
  4. RepositoryTransaction? transaction,
})

Retrieves an entity from the collection identified by the key parameter.

This method expects a principal parameter, which identifies the user performing the request. Implementations are advised to confirm if the entity being returned belongs to a tenant related to the principal.

If a non-empty value is passed to the permission parameter, the implementation of this method is expected to validate if the user represented by the principal does have the permission before actually returning the entity. Otherwise, an error is thrown.

Implementation

Future<Map<String, dynamic>> get(
  String key,
  DbPrincipal principal, {
  SearchPolicy? searchPolicy,
  RepositoryTransaction? transaction,
});