Interface Auditing

    • 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 5
        type -
        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

        <E> List<RevInfo<E>> changes​(E e,
                                     Integer max)
        Type Parameters:
        E -
        Parameters:
        e -
        max -
        Returns: