Interface IFormRecordMessageDao

    • Method Detail

      • getByUuid

        FormRecordMessage getByUuid​(IEntityContext ec,
                                    UUID uuid)
        Finds the message for the given UUID.
        Parameters:
        ec - entity context for accessing the database
        uuid - the UUID of the message
        Returns:
        The message with the given UUID
      • getByUuidAndUser

        FormRecordMessage getByUuidAndUser​(IEntityContext ec,
                                           UUID uuid,
                                           IUser requestingUser)
        Finds the message for the given UUID, which the given user can access.
        Parameters:
        ec - entity context for accessing the database
        uuid - the UUID of the message
        requestingUser - user requesting the messages.
        Returns:
        The message with the given UUID which the given user can access and null otherwise.
        See Also:
        getByUser(IEntityContext, IUser)
      • getByUser

        PagedResult<FormRecordMessage> getByUser​(IEntityContext ec,
                                                 IUser user,
                                                 int page,
                                                 int pageSize)
        Finds all form record messages the given user has access to.
        Parameters:
        ec - entity context for database transactions.
        user - to get the form record messages for.
        page - to get.
        pageSize - size of the page to get.
        Returns:
        a list of form record messages the user has access to ordered by their creation instant (desc).
        See Also:
        getByUser(IEntityContext, IUser)
      • getUnreadByUser

        PagedResult<FormRecordMessage> getUnreadByUser​(IEntityContext ec,
                                                       IUser user,
                                                       int page,
                                                       int pageSize)
        Finds all unread form record messages the given user has access to. Unread messages can only be gotten for users with UserProfiles. For users without a profile all messages will be returned.
        Parameters:
        ec - entity context for database transactions.
        user - to get the unread form record messages for.
        page - to get.
        pageSize - size of the page to get.
        Returns:
        a list of form record messages the user has access to ordered by their creation instant (desc).
        See Also:
        getByUser(IEntityContext, IUser)
      • getByChatAndUser

        PagedResult<FormRecordMessage> getByChatAndUser​(IEntityContext ec,
                                                        UUID chatUuid,
                                                        IUser user,
                                                        int page,
                                                        int pageSize)
        Finds the messages for the form record chat given by its UUID if the given user can access the chat.
        Parameters:
        ec - entity context for accessing the database.
        chatUuid - the UUID of the chat
        user - to get the form record messages for.
        page - to get.
        pageSize - size of the page to get.
        Returns:
        a list of form record messages the user has access to ordered by their creation instant (desc). null if the chat given by the UUID could not be found.
        See Also:
        getByUser(IEntityContext, IUser)
      • getAllBySenderUserProfile

        List<FormRecordMessage> getAllBySenderUserProfile​(IEntityContext ec,
                                                          UserProfile sender)
        Returns all messages sent by the given user profile.
        Parameters:
        ec - the entity context
        sender - the user profile of the sender
        Returns:
        all messages of the sender