Interface AccountPatchReviewStore

    • Method Detail

      • markReviewed

        boolean markReviewed​(PatchSet.Id psId,
                             Account.Id accountId,
                             String path)
                      throws com.google.gwtorm.server.OrmException
        Marks the given file in the given patch set as reviewed by the given user.
        Parameters:
        psId - patch set ID
        accountId - account ID of the user
        path - file path
        Returns:
        true if the reviewed flag was updated, false if the reviewed flag was already set
        Throws:
        com.google.gwtorm.server.OrmException - thrown if updating the reviewed flag failed
      • markReviewed

        void markReviewed​(PatchSet.Id psId,
                          Account.Id accountId,
                          Collection<String> paths)
                   throws com.google.gwtorm.server.OrmException
        Marks the given files in the given patch set as reviewed by the given user.
        Parameters:
        psId - patch set ID
        accountId - account ID of the user
        paths - file paths
        Throws:
        com.google.gwtorm.server.OrmException - thrown if updating the reviewed flag failed
      • clearReviewed

        void clearReviewed​(PatchSet.Id psId,
                           Account.Id accountId,
                           String path)
                    throws com.google.gwtorm.server.OrmException
        Clears the reviewed flag for the given file in the given patch set for the given user.
        Parameters:
        psId - patch set ID
        accountId - account ID of the user
        path - file path
        Throws:
        com.google.gwtorm.server.OrmException - thrown if clearing the reviewed flag failed
      • clearReviewed

        void clearReviewed​(PatchSet.Id psId)
                    throws com.google.gwtorm.server.OrmException
        Clears the reviewed flags for all files in the given patch set for all users.
        Parameters:
        psId - patch set ID
        Throws:
        com.google.gwtorm.server.OrmException - thrown if clearing the reviewed flags failed
      • findReviewed

        Optional<AccountPatchReviewStore.PatchSetWithReviewedFiles> findReviewed​(PatchSet.Id psId,
                                                                                 Account.Id accountId)
                                                                          throws com.google.gwtorm.server.OrmException
        Find the latest patch set, that is smaller or equals to the given patch set, where at least, one file has been reviewed by the given user.
        Parameters:
        psId - patch set ID
        accountId - account ID of the user
        Returns:
        optionally, all files the have been reviewed by the given user that belong to the patch set that is smaller or equals to the given patch set
        Throws:
        com.google.gwtorm.server.OrmException - thrown if accessing the reviewed flags failed