Package org.openxava.util
Class AccessTracker
java.lang.Object
org.openxava.util.AccessTracker
Use to notify of changes in the data.
All changes done using MapFacade are tracked automatically. If you changes data using JPA, JDBC, etc. you should call the method in this class to track the database changes.
- Since:
- 5.9
- Author:
- Javier Paniza
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidstatic voidmodified(String modelName, Map key, Map<String, Object> oldChangedValues, Map<String, Object> newChangedValues) You have to put the same property in both maps, oldChangeValues and newChangedValues, with old and new value.static void
-
Constructor Details
-
AccessTracker
public AccessTracker()
-
-
Method Details
-
consulted
-
created
-
modified
public static void modified(String modelName, Map key, Map<String, Object> oldChangedValues, Map<String, Object> newChangedValues) You have to put the same property in both maps, oldChangeValues and newChangedValues, with old and new value. An example:Map<String, Object> oldChangedValues = new HashMap<String, Object>(); oldChangedValues.put("address", "C/. Doctor Pesset"); // The old address Map<String, Object> newChangedValues = new HashMap<String, Object>(); newChangedValues.put("address", "C/. Almudaina"); // The new address AccessTracking.modified("Customer", key, oldChangedValues, newChangedValues);If oldChangeValues and newChangedValues are empty the tracker can ignore the call. -
removed
-
executed
- Since:
- 7.2
-