Package org.fryske_akademy.services
Interface Auditing
-
- All Superinterfaces:
CrudReadService
- All Known Implementing Classes:
AbstractCrudServiceEnvers
public interface Auditing extends CrudReadService
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E> List<RevInfo<E>>changes(E e, Integer max)<T> TgetRevision(Number n, Class<T> type)get historical data for a certain revision<T> List<RevInfo<T>>getRevisionInfo(Serializable id, Integer max, Class<T> type)return a list holding revision information, newest come first<T> List<Number>getRevisionNumbers(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, find, findAll, findDynamic, findExactlyOne, findNative, findNative, findOne, getDefaultPageSize, stream, streamAll, streamDynamic, streamNative
-
-
-
-
Method Detail
-
getRevisionNumbers
<T> List<Number> getRevisionNumbers(Serializable id, Class<T> type)
return list of revision numbers, first is the oldest- Parameters:
id-- Returns:
-
getRevision
<T> T getRevision(Number n, Class<T> type)
get historical data for a certain revision- Type Parameters:
T-- Parameters:
n-type-- Returns:
-
getRevisionInfo
<T> List<RevInfo<T>> getRevisionInfo(Serializable id, Integer max, Class<T> type)
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
-
-