Created
November 1, 2012 23:41
-
-
Save mailtoharshit/3997579 to your computer and use it in GitHub Desktop.
ControlledTriggerHelper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//TODO: This class will stop allowing trigger to fire-in twice | |
public class ControlledTriggerHelper { | |
// initialize a variable to hold state | |
private static boolean alreadyModified = false; | |
// get the state | |
public static boolean isAlreadyModified() { | |
return alreadyModified; | |
} | |
// set this to true to keep track of and avoid recursive updates. | |
// Generally set after first time through | |
// a trigger. We can access this in the trigger and avoid recursive updates. | |
public static void setAlreadyModified() { | |
alreadyModified = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment