Class TriggerHandler


  • public class TriggerHandler
    extends Object
    Supports disabling and again enabling of database triggers. The user of this class should call disable() after beginning the transaction and enable at the end, before committing.
    Author:
    martintaal
    • Constructor Detail

      • TriggerHandler

        public TriggerHandler()
    • Method Detail

      • disable

        public void disable()
        Disables all triggers in the database
      • isDisabled

        public boolean isDisabled()
        Returns:
        true if the database triggers are disabled, false in other cases.
      • clear

        public void clear()
        Clears the SessionStatus from the threadlocal, must be done in case of rollback
      • enable

        public void enable()
        Enables triggers in the database