Interface UserHistoryDAO

    • Method Detail

      • findByUserId

        List<UserHistory> findByUserId​(long userId)
        This method selects all histories of a given user.
        Parameters:
        userId - identifier of the suer
        Returns:
        list of histories ordered by date
      • createUserHistory

        void createUserHistory​(User user,
                               String eventType,
                               String comment,
                               String ip,
                               String sessionId)
        Creates an user history entry
        Parameters:
        user - The user that made the operation
        eventType - The event type
        comment - The comment provided by the user
        ip - The remote IP
        sessionId - The user session id
      • cleanOldHistories

        void cleanOldHistories​(int ttl)
        This method deletes all the user history entries oldest than the given days from now. If ttl is 0 or -1, the cancellation is not made.
        Parameters:
        ttl - The maximum number of days over which the history is considered old