EntityMapping Class Reference

Class to map external entity IDs to internal ones to ensure that there are no gaps in the numbering. More...

Inheritance diagram for EntityMapping:
IEntityMapping

List of all members.

Public Member Functions

IList< int > ToInternalID (IList< long > original_id_list)
 Get internal IDs of a list of given entities.
int ToInternalID (long original_id)
 Get internal ID of a given entity. If the given external ID is unknown, create a new internal ID for it and store the mapping.
IList< long > ToOriginalID (IList< int > internal_id_list)
 Get original (external) IDs of a list of given entities.
long ToOriginalID (int internal_id)
 Get original (external) ID of a given entity, if the given internal ID is unknown, throw an exception.

Properties

ICollection< int > InternalIDs [get]
 all internal entity IDs
ICollection< long > OriginalIDs [get]
 all original (external) entity IDs

Detailed Description

Class to map external entity IDs to internal ones to ensure that there are no gaps in the numbering.


Member Function Documentation

IList<int> ToInternalID ( IList< long >  original_id_list  )  [inline]

Get internal IDs of a list of given entities.

Parameters:
original_id_list the list of original (external) IDs
Returns:
a list of internal IDs

Implements IEntityMapping.

int ToInternalID ( long  original_id  )  [inline]

Get internal ID of a given entity. If the given external ID is unknown, create a new internal ID for it and store the mapping.

Parameters:
original_id the original (external) ID of the entity
Returns:
the internal ID of the entitiy

Implements IEntityMapping.

IList<long> ToOriginalID ( IList< int >  internal_id_list  )  [inline]

Get original (external) IDs of a list of given entities.

Parameters:
internal_id_list the list of internal IDs
Returns:
the list of original (external) IDs

Implements IEntityMapping.

long ToOriginalID ( int  internal_id  )  [inline]

Get original (external) ID of a given entity, if the given internal ID is unknown, throw an exception.

Parameters:
internal_id the internal ID of the entity
Returns:
the original (external) ID of the entitiy

Implements IEntityMapping.


Property Documentation

ICollection<int> InternalIDs [get]

all internal entity IDs

all internal entity IDs

Implements IEntityMapping.

ICollection<long> OriginalIDs [get]

all original (external) entity IDs

all original (external) entity IDs

Implements IEntityMapping.


The documentation for this class was generated from the following file:
Generated on Sun Nov 13 20:32:47 2011 for MyMediaLite by  doxygen 1.6.3