Interface IAssociationRepository
The IAssociationRepository interface describes a component capable of persisting, deleting, and retrieving group association data from an underlying data store.
Namespace: EPiServer.Social.Groups.Core
Assembly: EPiServer.Social.Groups.Core.dll
Version: 1.5.4Syntax
public interface IAssociationRepository
Methods
Add(Association)
Adds a new group association to the underlying data store.
Declaration
Association Add(Association association)
Parameters
| Type | Name | Description |
|---|---|---|
| Association | association | Association to be added |
Returns
| Type | Description |
|---|---|
| Association | Association which was added |
Add<TExtension>(Association, TExtension)
Adds a new group association with extension data to the underlying data store.
Declaration
Composite<Association, TExtension> Add<TExtension>(Association association, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Association | association | Association to be added |
| TExtension | extension | Extension data to be added |
Returns
| Type | Description |
|---|---|
| Composite<Association, TExtension> | Composite of Association and extension data which was added |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
AddAsync(Association)
Asynchronously adds a association within the underlying data store.
Declaration
Task<Association> AddAsync(Association association)
Parameters
| Type | Name | Description |
|---|---|---|
| Association | association | Association to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Association> | Association which was added |
AddAsync<TExtension>(Association, TExtension)
Asynchronously adds a association with extension data within the underlying data store.
Declaration
Task<Composite<Association, TExtension>> AddAsync<TExtension>(Association association, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Association | association | Association to be added |
| TExtension | extension | Extension data to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Association, TExtension>> | Composite of Association and TExtension which was added |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Get(Criteria<AssociationFilter>)
Retrieves a page of group associations from the underlying data store, as described by the specified criteria.
Declaration
ResultPage<Association> Get(Criteria<AssociationFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<AssociationFilter> | criteria | Criteria by which to filter group associations |
Returns
| Type | Description |
|---|---|
| ResultPage<Association> | Page of group associations |
Get(AssociationId)
Retrieves a single Assocation based upon an AssociationId from the underlying data store
Declaration
Association Get(AssociationId id)
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | id | association id of the desired association |
Returns
| Type | Description |
|---|---|
| Association | The requested association |
Get<TExtension>(CompositeCriteria<AssociationFilter, TExtension>)
Retrieves a page of group associations and extension data from the underlying data store, as described by the specified criteria.
Declaration
ResultPage<Composite<Association, TExtension>> Get<TExtension>(CompositeCriteria<AssociationFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<AssociationFilter, TExtension> | criteria |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<Association, TExtension>> | A result page of type composite of type group and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Get<TExtension>(AssociationId)
Gets a association composed with associated extension data, as identified by the specified ID.
Declaration
Composite<Association, TExtension> Get<TExtension>(AssociationId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | id | ID of the item to be retrieved |
Returns
| Type | Description |
|---|---|
| Composite<Association, TExtension> | A association composed with associated extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the association |
GetAsync(Criteria<AssociationFilter>)
Asynchronously retrieves a page of associations, from the underlying data store, as specified by the provided criteria.
Declaration
Task<ResultPage<Association>> GetAsync(Criteria<AssociationFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<AssociationFilter> | criteria | Filters the result set of associations |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Association>> | Page of associations filtered according to the specified criteria |
GetAsync(AssociationId)
Asynchronously retrieves a association, represented by the specified ID, from the underlying data store.
Declaration
Task<Association> GetAsync(AssociationId associationId)
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | associationId | ID fo the association to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Association> | Association which was retrieved |
GetAsync<TExtension>(CompositeCriteria<AssociationFilter, TExtension>)
Asynchronously retrieves a result page of composites. Each composite contains a association and its extension data, from the underlying data store, as specified by the provided criteria.
Declaration
Task<ResultPage<Composite<Association, TExtension>>> GetAsync<TExtension>(CompositeCriteria<AssociationFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<AssociationFilter, TExtension> | criteria | Filters the result set of associations and the extension data |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<Association, TExtension>>> | Page of composites that contain associations and their extension data filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
GetAsync<TExtension>(AssociationId)
Asynchronously retrieves a association with extension data, represented by the specified ID, from the underlying data store.
Declaration
Task<Composite<Association, TExtension>> GetAsync<TExtension>(AssociationId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | id | ID fo the association to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Association, TExtension>> | Composite that contains a association and its extension data based on the criteria provided. |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
IsAssociated(GroupId, Reference)
Returns true if the specified resource is an association of the specified group, false otherwise.
Declaration
bool IsAssociated(GroupId group, Reference resource)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | group | ID of the group |
| Reference | resource | Reference representing the resource whose associationship should be verfied |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the specified resource is an association of the specified group, false otherwise |
Remove(AssociationId)
Removes an existing group association from the underlying data store.
Declaration
void Remove(AssociationId association)
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | association | ID of the association to be removed |
RemoveAsync(AssociationId)
Asynchronously removes an existing association from the underlying data store.
Declaration
Task RemoveAsync(AssociationId associationId)
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | associationId | ID of the association to be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Update<TExtension>(AssociationId, TExtension)
Update an association in the repository with new extension data
Declaration
Composite<Association, TExtension> Update<TExtension>(AssociationId associationId, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | associationId | AssociationId used to filter collection with |
| TExtension | extension | Extension data to be added |
Returns
| Type | Description |
|---|---|
| Composite<Association, TExtension> | Composite of the Association and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
UpdateAsync<TExtension>(AssociationId, TExtension)
Asynchronously updates an existing association with extension data within the underlying data store
Declaration
Task<Composite<Association, TExtension>> UpdateAsync<TExtension>(AssociationId associationId, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| AssociationId | associationId | Association to be updated |
| TExtension | extension | Extension Data to be updated |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Association, TExtension>> | Association which was updated |
Type Parameters
| Name | Description |
|---|---|
| TExtension |