Class InterestHelper
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public abstract class InterestHelper : MDOProviderBase, ISoListProvider, ISoList, IEnumerable<ISoListItem>, IEnumerable
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Constructors
InterestHelper(TableRowsBase, string, int)
Default constructor.
Declaration
protected InterestHelper(TableRowsBase selectedInterests, string tableName, int parentEntityId)
Parameters
Type | Name | Description |
---|---|---|
TableRowsBase | selectedInterests | List of the currently selected interests. This can either be a class of type ContIntRows or PersIntRows |
string | tableName | Name of the table holding the definition of the interests |
int | parentEntityId |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Fields
_parentEntityId
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
protected int _parentEntityId
Field Value
Type | Description |
---|---|
int |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin._selectedHeadingCollection
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
protected List<ISoListHeading> _selectedHeadingCollection
Field Value
Type | Description |
---|---|
List<ISoListHeading> |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin._selectedInterestIds
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
protected Dictionary<int, TableRowBase> _selectedInterestIds
Field Value
Type | Description |
---|---|
Dictionary<int, TableRowBase> |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin._selectedInterests
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
protected TableRowsBase _selectedInterests
Field Value
Type | Description |
---|---|
TableRowsBase |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin._selectedRootCollection
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
protected List<ISoListItem> _selectedRootCollection
Field Value
Type | Description |
---|---|
List<ISoListItem> |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Properties
SelectedHeadingItems
Get the list of heading items that are currently selected, i.e., have link rows to the parent entity.
Declaration
public List<ISoListHeading> SelectedHeadingItems { get; }
Property Value
Type | Description |
---|---|
List<ISoListHeading> |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SelectedRootItems
Get the list of root items that are currently selected, i.e., have link rows to the parent entity.
Declaration
public List<ISoListItem> SelectedRootItems { get; }
Property Value
Type | Description |
---|---|
List<ISoListItem> |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Methods
BuildMdoCollections()
Convert rows object to ISoList collections. Fetching of the MDO list runs in the base class, here we instantiate InterestMDOListItem objects instead of the more generic ones, so that we can add the extra information (selected & date).
Declaration
protected override void BuildMdoCollections()
Overrides
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.CreateInterest(int)
Create a new link row for the given interest, using the protected _parentEntityId as the entity id. ALSO: Add to the _selectedInterests collection, since TableRowsBase does not have a public Add operator.
Declaration
protected abstract TableRowBase CreateInterest(int interestId)
Parameters
Type | Name | Description |
---|---|---|
int | interestId | Interest id to link to |
Returns
Type | Description |
---|---|
TableRowBase | New row, which has already been added to the entity's link table collections |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.GetInterestDate(TableRowBase)
Get the interest date from the link row (which must be castable to the correct type)
Declaration
protected abstract DateTime GetInterestDate(TableRowBase row)
Parameters
Type | Name | Description |
---|---|---|
TableRowBase | row | Row, castable to the type needed by the subclass |
Returns
Type | Description |
---|---|
DateTime | Last changed date extracted from the row |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.GetInterestId(TableRowBase)
Get the interest id from the link row (which must be castable to the correct type)
Declaration
protected abstract int GetInterestId(TableRowBase row)
Parameters
Type | Name | Description |
---|---|---|
TableRowBase | row | Row, castable to the type needed by the subclass |
Returns
Type | Description |
---|---|
int | Interest ID the row links to |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.GetItemsAndHeadingsQuery()
Create a query for for reading the items and headings of the interest list, including any currently selected items (regardless of filtering; this is implemented in the base class). Searching is not supported.
Declaration
protected override ListTableRows.CustomSearch GetItemsAndHeadingsQuery()
Returns
Type | Description |
---|---|
ListTableRows.CustomSearch | Query for reading the items and headdings of a list. |
Overrides
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.IsItemSelected(int)
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
public bool IsItemSelected(int interestId)
Parameters
Type | Name | Description |
---|---|---|
int | interestId |
Returns
Type | Description |
---|---|
bool |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.ReadItemsAndHeadings()
Read all mdo items with heading information
Declaration
protected override void ReadItemsAndHeadings()
Overrides
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Refresh()
Base class for contact and person interest helpers. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists.
Declaration
public void Refresh()
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SetItemSelection(ISelectableListItem)
Extract the 'Selected' property from the elements, and synchronize the entity's link table with the present status. Deletions are performed immediately, additions need to be saved through entity.Save() (so always do an entity.Save() anyway!)
Declaration
public void SetItemSelection(ISelectableListItem item)
Parameters
Type | Name | Description |
---|---|---|
ISelectableListItem | item | Single MDO list item |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SetItemSelection(ISoList)
Extract the 'Selected' property from all elements, and synchronize the entity's link table with the present status. Deletions are performed immediately, additions need to be saved through entity.Save() (so always do an entity.Save() anyway!)
Declaration
public void SetItemSelection(ISoList list)
Parameters
Type | Name | Description |
---|---|---|
ISoList | list | Complete MDO list, with root, heading and history items. History items are IGNORED! |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SetItemSelection(List<ISelectableListItem>)
Extract the 'Selected' property from all elements, and synchronize the entity's link table with the present status. Deletions are performed immediately, additions need to be saved through entity.Save() (so always do an entity.Save() anyway!)
Declaration
public void SetItemSelection(List<ISelectableListItem> items)
Parameters
Type | Name | Description |
---|---|---|
List<ISelectableListItem> | items | List of MDO list items |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SetItemSelection(List<ISoListItem>)
Extract the 'Selected' property from all elements, and synchronize the entity's link table with the present status. Deletions are performed immediately, additions need to be saved through entity.Save() (so always do an entity.Save() anyway!)
Declaration
public void SetItemSelection(List<ISoListItem> selectableItems)
Parameters
Type | Name | Description |
---|---|---|
List<ISoListItem> | selectableItems | List of MDO list items. Items not of (a subtype of) ISelectableListItem are quietly ignored and do no harm. |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.SetItemSelection(int, bool)
Synchronize the entity's link table with the present status for the given interest. Deletions are performed immediately, additions need to be saved through entity.Save() (so always do an entity.Save() anyway!)
Declaration
public void SetItemSelection(int interestId, bool isSelected)
Parameters
Type | Name | Description |
---|---|---|
int | interestId | ID of interest to add or remove |
bool | isSelected | New status |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.Events
OnActiveInterestsChanged
Subscribe or unsubscribe to the event raised whenever the number of active interests are changed.
Declaration
public event ActiveInterestsChanged OnActiveInterestsChanged
Event Type
Type | Description |
---|---|
ActiveInterestsChanged |
Remarks
The MDO list is available in two flavours - as the standard list, with Root and Heading items; and as a subset, containing only those rows that have corresponding link rows to the parent entity.
In both cases, the actual items in the lists are of type ISelectableListItem, an interface that inherits from ISoListItem but adds two more properties: A settable bool Selected, and a read-only DateTime LastChanged (which is automatically maintained). The various SetItemSelection collections will accept a whole ISoList or various sub-objects of it, extract the Selected flags and update the entity data accordingly. Note that items that lose their Selected status cause immediate deletions, while new Selected items are not stored to the database until entity.Save() is called. Interests not in the incoming lists will not be touched. Note that you cannot add new interest items through this class, only link existing interest items to a particular contact or person. Add new interests is an ordinary list-editing task, to be done through SoAdmin.