document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /*
  2. * @author: Sumitkumar Shingavi (sumi.shingavi@gmail.com)
  3. * @created_date: 04/18/2015
  4. * @description: Handler class for AccountTrigger
  5. */
  6. public class AccountTriggerHandler {
  7.  
  8. public void onBeforeInsert(List<Account> lTriggerNew, Map<Id, Account> mTriggerNew) {
  9. //Call AccountTriggerActions methods from here
  10. }
  11.  
  12. public void onAfterInsert(List<Account> lTriggerNew, Map<Id, Account> mTriggerNew) {
  13. //Call AccountTriggerActions methods from here
  14. }
  15.  
  16. public void onBeforeUpdate(List<Account> lTriggerNew, Map<Id, Account> mTriggerNew, Map<Id, Account> mTriggerOld) {
  17. //Call AccountTriggerActions methods from here
  18. }
  19.  
  20. public void onAfterUpdate(List<Account> lTriggerNew, Map<Id, Account> mTriggerNew, Map<Id, Account> mTriggerOld) {
  21. //Call AccountTriggerActions methods from here
  22.  
  23. //Just a sample if you have a batch which might kick this trigger and if it is calling
  24. if(!System.isBatch()) {
  25. //This will be only required if someWebserviceFutureCall is @future method called from Trigger
  26. AccountTriggerActions.actionCallingWSFutureCall(lTriggerNew, mTriggerNew, mTriggerOld);
  27. }
  28. }
  29.  
  30. public void onBeforeDelete(List<Account> lTriggerOld, Map<id, Account> mTriggerOld) {
  31. //Call AccountTriggerActions methods from here
  32. }
  33.  
  34. public void onAfterDelete(List<Account> lTriggerOld, Map<id, Account> mTriggerOld) {
  35. //Call AccountTriggerActions methods from here
  36. }
  37.  
  38. public void onAfterUndelete(List<Account> lTriggerOld, Map<id, Account> mTriggerOld) {
  39. //Call AccountTriggerActions methods from here
  40. }
  41. }
');