Package org.fryske_akademy.services
Interface Auditing
- All Superinterfaces:
CrudReadService
- All Known Implementing Classes:
AbstractCrudServiceEnvers
Generic interface for entity history.
- Author:
- eduard
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.fryske_akademy.services.CrudReadService
CrudReadService.SORTORDER -
Method Summary
Modifier and TypeMethodDescription<T> TgetRevision(Number n, Class<T> type) get historical data for a certain revisiongetRevisionInfo(Serializable id, Integer max, Class<T> type) return a list holding revision information, newest come firstgetRevisionNumbers(Serializable id, Class<T> type) return list of revision numbers, first is the oldest<T extends EntityInterface>
TpreviousState(Serializable id, Class<T> type, @jakarta.validation.constraints.Positive int stepsBack) Return the state before the last crud operation on an entity, or null when not found (or for insert).Methods inherited from interface org.fryske_akademy.services.CrudReadService
count, countDynamic, find, find, findAll, findDynamic, findExactlyOne, findJpql, findNative, findNative, findNative, findOne, getDefaultPageSize, stream, streamAll, streamDynamic, streamNative
-
Method Details
-
getRevisionNumbers
return list of revision numbers, first is the oldest- Parameters:
id-- Returns:
-
getRevision
get historical data for a certain revision- Type Parameters:
T-- Parameters:
n-type-- Returns:
-
getRevisionInfo
return a list holding revision information, newest come first- Type Parameters:
T-- Parameters:
id-max- the maximum to number of results to return, defaults to 5type-- Returns:
-
previousState
<T extends EntityInterface> T previousState(Serializable id, Class<T> type, @Positive @jakarta.validation.constraints.Positive int stepsBack) Return the state before the last crud operation on an entity, or null when not found (or for insert). This can be used to build undo functionality- Parameters:
id-type-stepsBack- how may steps back in history, 1 is the first step back
-
changes
- Type Parameters:
E-- Parameters:
e-max-- Returns:
-