Root / Assembly / ARCCore / Class / IK
|Description||IK = Interface Key / Index key. |
The key is what describes the different elements in a PropertyStreamLine line.
One specific implementation of this interface, PK (Property Key), describes the actual properties related to an entity.
Example, for a PropertyStreamLine like:
'dt/Customer/42/PhoneNumber = 90534333'
'dt' would correspond to dt (data). Parsed as IKString
(if the data storage is implicitly storing only data then this prefix will often have been removed before parsing the rest of the keys keys).
'Customer' would be a IKType, that is a key pointing to a collection of all objects of type 'Customer'.
(in RDBMS-terms pointing to a table called Customers)
'42' would be a IKLong (IKString if it had not been an integer), that is, a general identifier for a specific entity.
(in RDBMS-terms a primary key)
'PhoneNumber' would be a PK, describing this specific field, and how the value '90534333' should be validated and parsed.
(in RDBMS-terms the Field in the schema for the Table)
Instances implementing this interface is suitable for use as key in hierarchical object stores like PRich.
See TryParse for details about about how the different sub-classes of IK are utilizied for a given PropertyStreamLine.
|LongDescription||All implementations are supposed to be immutable.|
Some notes about IEquatable<IK>:
Note how IEquatable<IK> is implemented in the different implementing classes.
Equality is always based on the string representation (ToString) because IKString may be used instead of IKType or PK (for instance depending on whether we have StandardAgoRapideCode or ApplicationSpecificCode).
(in other words, a IKString may perfectly well be seen as equal to a IKType or even PK.)
Note how GetHashCode is also essential to include. If not then dictionaries with this class as key will simply not work.
Note that default implementation of Equals(IK other) and GetHashCode() in this interface is not possible (because these methods are implemented for any class anyway (as Equals / -GetHashCode-), so that would take precedence over a default interface method).
Note that Equals(IK other) and GetHashCode() must be implemented identically in all implementing classes, that is,based on ToString(). See -GetHashCode- / Equals for examples.
Generated 2020-10-13 11:11:03.830 UTC