Package org.openbravo.dal.core
Class TriggerHandler
- java.lang.Object
-
- org.openbravo.dal.core.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 Summary
Constructors Constructor Description TriggerHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the SessionStatus from the threadlocal, must be done in case of rollbackvoid
disable()
Disables all triggers in the databasevoid
enable()
Enables triggers in the databasestatic TriggerHandler
getInstance()
boolean
isDisabled()
-
-
-
Method Detail
-
getInstance
public static TriggerHandler getInstance()
-
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
-
-