apex-enterprise-patterns / fflib-apex-common-samplecode

Samples application illustrating the Apex Enterprise Patterns library
BSD 3-Clause "New" or "Revised" License
205 stars 105 forks source link

Example of using domains of arbitrary ApexTypes #50

Open cropredyHelix opened 1 year ago

cropredyHelix commented 1 year ago

When the domain class was split into triggerHandler and domain classes, the PR #300 author @wimvelzeboer mentioned that domains could now be arbitrary ApexTypes

It would be nice to see this sample repo extended to show such an example. This would include:

As I understand it, such domains of arbitrary ApexTypes extend fflib_Objects but I believe to implement factories and mocking support, some changes are needed in fflib_Application.cls to support something other than SObjectTypes as keys to the constructor class.