Class SILVERMAILMessageBeanRepository

    • Constructor Detail

      • SILVERMAILMessageBeanRepository

        public SILVERMAILMessageBeanRepository()
    • Method Detail

      • countByCriteria

        public long countByCriteria​(SilvermailCriteria criteria)
        Finds user notifications according to the given criteria.
        Parameters:
        criteria - the user notification criteria.
        Returns:
        the list corresponding to the given criteria.
      • findByCriteria

        public SilverpeasList<SILVERMAILMessageBean> findByCriteria​(SilvermailCriteria criteria)
        Finds user notifications according to the given criteria.
        Parameters:
        criteria - the user notification criteria.
        Returns:
        the list corresponding to the given criteria.
      • markAsReadAllMessagesByUserIdAndFolderId

        public long markAsReadAllMessagesByUserIdAndFolderId​(String userId,
                                                             String folderId)
        Marks as read all the messages of folder specified by given identifier which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        folderId - the identifier of a folder.
        Returns:
        the number of message marked as read.
      • markAsReadMessagesByUserIdAndByIds

        public long markAsReadMessagesByUserIdAndByIds​(String userId,
                                                       Collection<String> ids)
        Marks as read the messages specified by given identifiers which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        ids - the identifiers of user notifications.
        Returns:
        the number of message marked as read.
      • getLongTextIdsOfAllMessagesByUserIdAndFolderId

        public List<String> getLongTextIdsOfAllMessagesByUserIdAndFolderId​(String userId,
                                                                           String folderId)
        Gets all long text ids of the messages of folder specified by given identifier which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        folderId - the identifier of a folder.
        Returns:
        a list of string identifier.
      • deleteAllMessagesByUserIdAndFolderId

        public long deleteAllMessagesByUserIdAndFolderId​(String userId,
                                                         String folderId)
        Deletes all the messages of folder specified by given identifier which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        folderId - the identifier of a folder.
        Returns:
        the number of message deleted.
      • getLongTextIdsOfMessagesByUserIdAndByIds

        public List<String> getLongTextIdsOfMessagesByUserIdAndByIds​(String userId,
                                                                     Collection<String> ids)
        Gets all long text ids of the messages specified by given identifiers which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        ids - the identifiers of user notifications.
        Returns:
        a list of string identifier.
      • deleteMessagesByUserIdAndByIds

        public long deleteMessagesByUserIdAndByIds​(String userId,
                                                   Collection<String> ids)
        Deletes the messages specified by given identifiers which belong to the user represented by the given identifier.
        Parameters:
        userId - the identifier of a user.
        ids - the identifiers of user notifications.
        Returns:
        the number of message marked as read.