Implement a basic Domain class and Apex trigger
Implement a basic Domain class and accompanying Apex trigger with default and update logic based upon domain conventions.
- Create a basic Domain class named Accounts that extends fflib_SObjectDomain.
- Create a trigger named AccountsTrigger for Account that calls the fflib_SObjectDomain triggerHandler method for all trigger methods.
- Implement defaulting logic that executes when a record is inserted and sets the Description field to the value Domain classes rock!
- Implement update logic that calculates the Levenshtein distance between the phrase Domain classes rock! and whatever the contents of the Description field is when an Account is updated. Use the Apex String method getLevenshteinDistance(stringToCompare) and store the result in the Annual Revenue field.
Create a Selector class for the Account object
Create a Selector class for the Account object named AccountsSelector with a selectById method that accepts a set of Ids and returns a list of Accounts. Configure the Selector base class functionality to retrieve the fields Name, Description, and AnnualRevenue.