HistoryService¶
-
public interface
HistoryService
¶ The
HistoryService
provides methods related with processing historical changes on the given instance of entity.
Methods¶
countHistoryRecords¶
getHistoryForInstance¶
-
List
getHistoryForInstance
(Object instance, QueryParams queryParams)¶ Returns the historical data for the given instance. This method return historical data only for objects that are not in the MDS trash. For trash instances the return value will be incorrect.
Parameters: - instance – an instance created from the given entity definition.
- queryParams – Query parameters such as page number, size of page and sort direction. If null method will return all history records.
Returns: a list of historical data related with the given instance.
getSingleHistoryInstance¶
record¶
-
void
record
(Object instance)¶ Records changes made on the given instance of entity. The first historical data should be equal to data inside the given instance. Two instance of historical data should be connected using appropriate fields (defined in history class definition). This method should be used only for instances that are not in the MDS trash.
Parameters: - instance – an instance created from the given entity definition.