Interface IRatingStatisticsRepository

This interface represents the data access layer for rating statistics that exposes functionality to retrieve and update rating statistics in an underlying rating statistics store.

Namespace: EPiServer.Social.Ratings.Core
Assembly: EPiServer.Social.Ratings.Core.dll
Version: 1.5.4
Syntax
public interface IRatingStatisticsRepository

Methods

Get(Criteria<RatingStatisticsFilter>)

Gets a page of rating statistics from the underlying data store, as described by the specified criteria.

Declaration
ResultPage<RatingStatistics> Get(Criteria<RatingStatisticsFilter> criteria)
Parameters
Type Name Description
Criteria<RatingStatisticsFilter> criteria

Criteria by which to filter rating statistics

Returns
Type Description
ResultPage<RatingStatistics>

Page of rating statistics

Get<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension>)

Gets a page of composite rating statistics from the underlying data store, as described by the specified criteria.

Declaration
ResultPage<Composite<RatingStatistics, TExtension>> Get<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<RatingStatisticsFilter, TExtension> criteria

Criteria by which to filter composite rating statistics

Returns
Type Description
ResultPage<Composite<RatingStatistics, TExtension>>

Page of rating statistics

Type Parameters
Name Description
TExtension

GetAsync(Criteria<RatingStatisticsFilter>)

Gets a page of rating statistics from the underlying data store, as described by the specified criteria.

Declaration
Task<ResultPage<RatingStatistics>> GetAsync(Criteria<RatingStatisticsFilter> criteria)
Parameters
Type Name Description
Criteria<RatingStatisticsFilter> criteria

Criteria by which to filter rating statistics

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<RatingStatistics>>

Page of composite rating statistics

GetAsync<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension>)

Gets a page of composite rating statistics from the underlying data store, as described by the specified criteria.

Declaration
Task<ResultPage<Composite<RatingStatistics, TExtension>>> GetAsync<TExtension>(CompositeCriteria<RatingStatisticsFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<RatingStatisticsFilter, TExtension> criteria

Criteria by which to filter composite rating statistics

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Composite<RatingStatistics, TExtension>>>

Page of composite rating statistics

Type Parameters
Name Description
TExtension

Update<TExtension>(Reference, TExtension)

Updates the extension data for a rating statistic with the specified target.

Declaration
Composite<RatingStatistics, TExtension> Update<TExtension>(Reference target, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Reference target

Target of the rating statistics to be updated

TExtension extension

Extended data supporting the rating statistic

Returns
Type Description
Composite<RatingStatistics, TExtension>

An rating statistic composed with the specified extension data

Type Parameters
Name Description
TExtension

Type of data applied as an extension of the rating statistics

Exceptions
Type Condition
System.ArgumentException

Thrown when the specified statistics data is invalid.

System.ArgumentNullException

Thrown when the specified statistics data is invalid.

RatingStatisticsDoNotExistException

Thrown when the rating statistics for the specified target does not exists.

UpdateAsync<TExtension>(Reference, TExtension)

Updates the extension data for a rating statistic with the specified target.

Declaration
Task<Composite<RatingStatistics, TExtension>> UpdateAsync<TExtension>(Reference target, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Reference target

Target of the rating statistics to be updated

TExtension extension

Extended data supporting the rating statistic

Returns
Type Description
System.Threading.Tasks.Task<Composite<RatingStatistics, TExtension>>

An rating statistic composed with the specified extension data

Type Parameters
Name Description
TExtension

Type of data applied as an extension of the rating statistics

Exceptions
Type Condition
System.ArgumentException

Thrown when the specified statistics data is invalid.

System.ArgumentNullException

Thrown when the specified statistics data is invalid.

RatingStatisticsDoNotExistException

Thrown when the rating statistics for the specified target does not exists.

arrow_upward