[ROOT] / doc / toc / ARCCore / Class / PCollection

GetKeysEqualToValue , ToString , TryGetP , TryGetV , TrySetPP


A class useful for storing a collection of entities (a table in RDBMS-terms) because it implements Indexing.

Uses Indexing for all keys ending with 'Id' (keys assumed to be foreign keys).

Example, for an entity type 'Order', you can create an inheriting class like this:
public class OrderCollection : PCollection {
}
in order to utilize indexing when searching for foreign keys in the 'Order'-collection, like 'Order/WHERE CustomerId = 42'
Note how TryParse choses a collection class with help from AllIPDerivedEntityCollectionClassesDict, but it does not necessarily have to inherit PCollection.

TODO: Consider introducing a generic type-parameter for the class for which we are a collection for.
TODO: See -PCollectionES- in ARCEvent for examples.


GetKeysEqualToValueReturns properties which themselves again have key and value equal to the given key and value.
ToStringTODO: Decide on what we actually want with ToString for this class.
TryGetPMade virtual 13 Jan 2022. Possibly the same could be done for all other methods here since _properties is Protected anyway.
TryGetVNote that 'normally' this method would be irrelevant for a PRich object because we will usually be an entity object (like 'Customer') not having an intrinsic value ourselves per se (because we will instead be containing a list of values).
TrySetPPReplaces default interface method TrySetPP.

Details

Generated 2024-12-21 15:57:45.503 UTC