[ROOT] / doc / toc / ARCDoc / Class / Apple

AddName , GetName , Name , ToString , TryGetName , TryGetP , TryGetV


The most 'standard' way of implementing an entity-class in AgoRapide, by just inheriting PRich.

It is somewhat memory-hungry (due to inheriting PRich) but very easy to implement.
Can store any property, not only just those contained in AppleP enum.

Note that apart from the convenience method Name (which is not obligatory to implement), the Apple class itself is totally empty.

All the descriptions of this class (except this text) are found in AppleP something which is consistent with the principle of TaggingOfPropertyKeys.

See also MemoryConsumption / PropertyAccess.

Related examples of entity classes, all of which implement IP and offer the properties 'Name' and 'Colour' but which differ in their storage mechanisms:
Apple: The most 'standard' way of implementing an entity-class in AgoRapide, by just inheriting PRich.
Orange Inherits PExact<TEnumType> for probably the best compromise between memory consumption and easy of development.
Banana: Implements IP directly and uses traditional property storage for optimum MemoryConsumption efficiency.


AddNameConvenience method, not obligatory.
GetNameConvenience method, not obligatory.
NameConvenience method, not obligatory.
ToStringTODO: Decide on what we actually want with ToString for this class.
TryGetNameConvenience method, not obligatory.
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).

Details

Generated 2024-11-14 04:09:28.593 UTC