Class AccessTracker
×News: OpenXava 7.7 released - March 9 · Read more
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:Mapinvalid input: '<'String, Object> oldChangedValues = new HashMapinvalid input: '<'String, Object>(); oldChangedValues.put("address", "C/. Doctor Pesset"); // The old address Mapinvalid input: '<'String, Object> newChangedValues = new HashMapinvalid input: '<'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
-