# Interface IConfigObservationRepository

Namespace
  adas_core.Application.Repositories.Interfaces

Assembly
  adas-core.Application.dll

    public interface IConfigObservationRepository : IMongoRepository<ConfigObservation>

Inherited Members
  IMongoRepository<ConfigObservation>.Collection
  IMongoRepository<ConfigObservation>.GetCollectionName()
  IMongoRepository<ConfigObservation>.InsertOneAsync(ConfigObservation)
  IMongoRepository<ConfigObservation>.DeleteAsync(ObjectId)
  IMongoRepository<ConfigObservation>.UpdateOneAsync(ObjectId, ConfigObservation)

Extension Methods
  NumberUtils.IsNumber(object)
  NumberUtils.ToDouble(object)
  ObjectUtils.ToStr(object?)

## Methods

### Count()

Asynchronously retrieves the total count of items.

    Task<long> Count()

#### Returns

Task<long>

  A task that represents the asynchronous operation, containing the total count as a long.

### Delete(ObjectId)

Deletes the configuration observation identified by the specified identifier.

    Task<ConfigObservation?> Delete(ObjectId id)

#### Parameters

`id` ObjectId

  The 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 `null` if 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

`name` string

  The 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

`id` ObjectId

  The 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 `null` if no observation matches the specified identifier.

### FindByName(string)

Retrieves a configuration observation that matches the specified name.

    Task<ConfigObservation?> FindByName(string name)

#### Parameters

`name` string

  The 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

`codingSystem` string

  The coding system identifier used to look up the configuration observation.

`code` string

  The 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

`id` string

  The 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

`filter` PaginationFilter

  The 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

`code` string

  The code used to look up the configuration observation item, or null if not specified.

`codingSystem` string

  The coding system associated with the code, or null if not specified.

`name` string

  The name used to look up the configuration observation item, or null if not specified.

`originalName` string

  The 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

`configObservationItem` ConfigObservation

  The 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

`configObservation` ConfigObservation

  The configuration observation containing the updated values to persist.

#### Returns

Task<ConfigObservation>

  A task that resolves to the updated ConfigObservation, or `null` if the observation does not exist.