Interface IConfigObservationRepository
- Namespace
- adas_core.Application.Repositories.Interfaces
- Assembly
- adas-core.Application.dll
public interface IConfigObservationRepository : IMongoRepository<ConfigObservation>
- Inherited Members
- Extension Methods
Methods
Count()
Asynchronously retrieves the total count of items.
Task<long> Count()
Returns
Delete(ObjectId)
Deletes the configuration observation identified by the specified identifier.
Task<ConfigObservation?> Delete(ObjectId id)
Parameters
idObjectIdThe unique identifier of the configuration observation to delete.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous delete operation. The task result contains the deleted configuration observation, or
nullif no observation with the specified identifier was found.
FindAll()
Retrieves all configuration observations available in the system.
Task<ICollection<ConfigObservation>> FindAll()
Returns
- Task<ICollection<ConfigObservation>>
A task that represents the asynchronous operation. The task result contains a collection of ConfigObservation instances.
FindAllByName(string)
Asynchronously retrieves all ConfigObservation records matching the specified name.
Task<List<ConfigObservation>> FindAllByName(string name)
Parameters
namestringThe name used to look up the configuration observations.
Returns
- Task<List<ConfigObservation>>
A task that represents the asynchronous operation. The task result contains a list of ConfigObservation objects matching the given name, or an empty list if none are found.
FindAllIds()
Asynchronously retrieves all available identifiers, returning them as a list of MongoDB.Bson.ObjectId values.
Task<List<ObjectId>> FindAllIds()
Returns
- Task<List<ObjectId>>
A Task<TResult> that represents the asynchronous operation, containing a list of all MongoDB.Bson.ObjectId instances found.
FindById(ObjectId)
Asynchronously retrieves a configuration observation by its unique identifier, returning null when no matching observation exists.
Task<ConfigObservation?> FindById(ObjectId id)
Parameters
idObjectIdThe unique identifier of the configuration observation to locate.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous operation. The task result contains the ConfigObservation if found, or
nullif no observation matches the specified identifier.
FindByName(string)
Retrieves a configuration observation that matches the specified name.
Task<ConfigObservation?> FindByName(string name)
Parameters
namestringThe name of the configuration observation to find.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous operation. The task result contains the matching ConfigObservation if found; otherwise, null.
GetByCodeSysAndCode(string?, string?)
Retrieves a ConfigObservation matching the specified coding system and code.
Task<ConfigObservation?> GetByCodeSysAndCode(string? codingSystem, string? code)
Parameters
codingSystemstringThe coding system identifier used to look up the configuration observation.
codestringThe code value within the specified coding system used to look up the configuration observation.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous operation. The task result contains the matching ConfigObservation if found; otherwise,
null.
GetConfigNames()
Asynchronously retrieves the list of available configuration names.
Task<List<string>> GetConfigNames()
Returns
- Task<List<string>>
A task that represents the asynchronous operation, containing the list of configuration names.
GetConfigNames(string)
Asynchronously retrieves a list of configuration names associated with the specified identifier.
Task<List<string>> GetConfigNames(string id)
Parameters
idstringThe identifier used to look up the configuration names.
Returns
- Task<List<string>>
A task that represents the asynchronous operation, containing a list of configuration names.
GetPaginatedItems(PaginationFilter)
Retrieves a paginated collection of configuration observations based on the specified filter.
Task<ICollection<ConfigObservation>> GetPaginatedItems(PaginationFilter filter)
Parameters
filterPaginationFilterThe pagination filter that defines the page size, page number, and any additional criteria used to retrieve the observations.
Returns
- Task<ICollection<ConfigObservation>>
A task that represents the asynchronous operation, containing a collection of ConfigObservation items that match the pagination criteria.
GetSingleConfigObservationItem(string?, string?, string?, string?)
Retrieves a single ConfigObservation item matching the provided criteria, or null if no matching item is found.
Task<ConfigObservation?> GetSingleConfigObservationItem(string? code, string? codingSystem, string? name, string? originalName)
Parameters
codestringThe code used to look up the configuration observation item, or null if not specified.
codingSystemstringThe coding system associated with the code, or null if not specified.
namestringThe name used to look up the configuration observation item, or null if not specified.
originalNamestringThe original name used to look up the configuration observation item, or null if not specified.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous operation. The task result contains the matching ConfigObservation item, or null if no item matches the specified criteria.
InsertOneAsyncAndReturn(ConfigObservation)
Asynchronously inserts the specified configuration observation item and returns the persisted entity.
Task<ConfigObservation> InsertOneAsyncAndReturn(ConfigObservation configObservationItem)
Parameters
configObservationItemConfigObservationThe configuration observation to insert.
Returns
- Task<ConfigObservation>
A task that represents the asynchronous insert operation, containing the inserted ConfigObservation.
Update(ConfigObservation)
Updates an existing configuration observation in the underlying store.
Returns the updated observation, or null when no matching observation is found.
Task<ConfigObservation?> Update(ConfigObservation configObservation)
Parameters
configObservationConfigObservationThe configuration observation containing the updated values to persist.
Returns
- Task<ConfigObservation>
A task that resolves to the updated ConfigObservation, or
nullif the observation does not exist.