Repository Service with Notification Support

INotifyRepositoryService<TModel> in assembly SanteDB.Core.Api version 2.1.151.0

Summary

A IRepositoryService which can notify other classes of changes to data

Events

EventTypeDescription

Inserting

EventHandler<DataPersistingEventArgs<TModel>>

Data is inserting

Inserted

EventHandler<DataPersistedEventArgs<TModel>>

Fired after data was inserted

Saving

EventHandler<DataPersistingEventArgs<TModel>>

Fired before saving

Saved

EventHandler<DataPersistedEventArgs<TModel>>

Fired after data was saved

Obsoleting

EventHandler<DataPersistingEventArgs<TModel>>

Fired before obsoleting

Obsoleted

EventHandler<DataPersistedEventArgs<TModel>>

Fired after data was obsoleted

Retrieving

EventHandler<DataRetrievingEventArgs<TModel>>

Retrieving the data

Retrieved

EventHandler<DataRetrievedEventArgs<TModel>>

Fired after data was retrieved

Querying

EventHandler<QueryRequestEventArgs<TModel>>

Fired after data was queried

Queried

EventHandler<QueryResultEventArgs<TModel>>

Fired after data was queried

Implementations

GenericLocalActRepository<TAct> - (SanteDB.Server.Core)

Represents an IRepositoryService which stores Acts and their derivative classes

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

GenericLocalClinicalDataRepository<TModel> - (SanteDB.Server.Core)

Represents generic local clinical data repository

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

GenericLocalConceptRepository<TModel> - (SanteDB.Server.Core)

Generic local concept repository with sufficient permissions

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

GenericLocalRepositoryEx<TModel> - (SanteDB.Server.Core)

Generic nullifiable local repository

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

GenericLocalSecurityRepository<TSecurityEntity> - (SanteDB.Server.Core)

Generic local security repository

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

LocalEntityRelationshipRepository - (SanteDB.Server.Core)

Represents a local entity relationship repository

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalEntityRelationshipRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalExtensionTypeRepository - (SanteDB.Server.Core)

Local extension types

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalExtensionTypeRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalManufacturedMaterialRepository - (SanteDB.Server.Core)

Local material persistence service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalManufacturedMaterialRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalPatientRepository - (SanteDB.Server.Core)

Local material persistence service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalPatientRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalProviderRepository - (SanteDB.Server.Core)

Provides operations for managing organizations.

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalProviderRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalAssigningAuthorityRepository - (SanteDB.Server.Core)

Represents a repository service for managing assigning authorities.

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalAssigningAuthorityRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalBatchRepository - (SanteDB.Server.Core)

Local batch repository service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalBatchRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

Local Repository Service - (SanteDB.Server.Core)

Represents a base class for entity repository services

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

GenericLocalMetadataRepository<TMetadata> - (SanteDB.Server.Core)

Provides generic basis for metadata editing

This service implementation is abstract or is a generic definition. It is intended to be implemented or constructed at runtime from other services and cannot be used directly

LocalMaterialRepository - (SanteDB.Server.Core)

Local material persistence service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalMaterialRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalSecurityApplicationRepository - (SanteDB.Server.Core)

Local security application repository

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalSecurityApplicationRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalSecurityDeviceRepository - (SanteDB.Server.Core)

Local security device repository

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalSecurityDeviceRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalSecurityPolicyRepository - (SanteDB.Server.Core)

Alter policies

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalSecurityPolicyRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalSecurityRoleRepositoryService - (SanteDB.Server.Core)

Represents a local security role service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalSecurityRoleRepositoryService, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalSecurityUserRepositoryService - (SanteDB.Server.Core)

Security user repository

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalSecurityUserRepositoryService, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalTemplateDefinitionRepositoryService - (SanteDB.Server.Core)

Represents a local metadata repository service

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalTemplateDefinitionRepositoryService, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalOrganizationRepository - (SanteDB.Server.Core)

Provides operations for managing organizations.

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalOrganizationRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalPlaceRepository - (SanteDB.Server.Core)

Place repository that uses local persistence

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalPlaceRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalUserEntityRepository - (SanteDB.Server.Core)

Localuser entity repository

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalUserEntityRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

LocalConceptRepository - (SanteDB.Server.Core)

Represents a service which is responsible for the maintenance of concepts using local persistence.

Service Registration

...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
	<serviceProviders>
		...
		<add type="SanteDB.Server.Core.Services.Impl.LocalConceptRepository, SanteDB.Server.Core, Version=2.1.151.0, Culture=neutral, PublicKeyToken=null" />
		...
	</serviceProviders>

Example Implementation

/// Example Implementation
using SanteDB.Core.Services;
/// Other usings here
public class MyNotifyRepositoryService<TModel> : SanteDB.Core.Services.INotifyRepositoryService<TModel> { 
	public String ServiceName => "My own INotifyRepositoryService`1 service";
	/// <summary>
	/// Data is inserting
	/// </summary>
	public event EventHandler<DataPersistingEventArgs<TModel>> Inserting;
	/// <summary>
	/// Fired after data was inserted
	/// </summary>
	public event EventHandler<DataPersistedEventArgs<TModel>> Inserted;
	/// <summary>
	/// Fired before saving
	/// </summary>
	public event EventHandler<DataPersistingEventArgs<TModel>> Saving;
	/// <summary>
	/// Fired after data was saved
	/// </summary>
	public event EventHandler<DataPersistedEventArgs<TModel>> Saved;
	/// <summary>
	/// Fired before obsoleting
	/// </summary>
	public event EventHandler<DataPersistingEventArgs<TModel>> Obsoleting;
	/// <summary>
	/// Fired after data was obsoleted
	/// </summary>
	public event EventHandler<DataPersistedEventArgs<TModel>> Obsoleted;
	/// <summary>
	/// Retrieving the data
	/// </summary>
	public event EventHandler<DataRetrievingEventArgs<TModel>> Retrieving;
	/// <summary>
	/// Fired after data was retrieved
	/// </summary>
	public event EventHandler<DataRetrievedEventArgs<TModel>> Retrieved;
	/// <summary>
	/// Fired after data was queried
	/// </summary>
	public event EventHandler<QueryRequestEventArgs<TModel>> Querying;
	/// <summary>
	/// Fired after data was queried
	/// </summary>
	public event EventHandler<QueryResultEventArgs<TModel>> Queried;
}

References

Last updated