Class AbstractCrudServiceEnvers

    • Constructor Detail

      • AbstractCrudServiceEnvers

        public AbstractCrudServiceEnvers()
    • Method Detail

      • getRevision

        public <T> T getRevision​(Number n,
                                 Class<T> type)
        When more revisions of the same entity are found for this revision, the last is returned
        Specified by:
        getRevision in interface Auditing
        Type Parameters:
        T -
        Parameters:
        n -
        type -
        Returns:
      • getRevisionInfo

        public <T> List<RevInfo<T>> getRevisionInfo​(Serializable id,
                                                    Integer max,
                                                    Class<T> type)
        Description copied from interface: Auditing
        return a list holding revision information, newest come first
        Specified by:
        getRevisionInfo in interface Auditing
        max - the maximum to number of results to return, defaults to 5
        Returns:
      • previousState

        public <T extends EntityInterface> T previousState​(Serializable id,
                                                           Class<T> type,
                                                           int stepsBack)
        Description copied from interface: Auditing
        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
        Specified by:
        previousState in interface Auditing
        stepsBack - how may steps back in history, 1 is the first step back