Skip to content

Instantly share code, notes, and snippets.

@Mycoola
Last active May 27, 2023 14:35
Show Gist options
  • Save Mycoola/db3f4f84bdc2b08b3f6ddc2d96815433 to your computer and use it in GitHub Desktop.
Save Mycoola/db3f4f84bdc2b08b3f6ddc2d96815433 to your computer and use it in GitHub Desktop.
TriggerHandler Interface
public interface TriggerHandler {
    void beforeInsert(List<SObject> newRecords);
    void beforeUpdate(List<SObject> oldRecords, List<SObject> newRecords, Map<ID, SObject> oldRecordMap, Map<ID, SObject> newRecordMap);
    void beforeDelete(List<SObject> oldRecords, Map<ID, SObject> oldRecordMap);
    void afterInsert(List<SObject> newRecords, Map<ID, SObject> newRecordMap);
    void afterUpdate(List<SObject> oldRecords, List<SObject> newRecords, Map<ID, SObject> oldRecordMap, Map<ID, SObject> newRecordMap);
    void afterDelete(List<SObject> oldRecords, Map<ID, SObject> oldRecordMap);
    void afterUndelete(List<SObject> newRecords, Map<ID, SObject> newRecordMap);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment