Class MessageDAO

    • Constructor Detail

      • MessageDAO

        public MessageDAO​(java.sql.Connection con)
      • MessageDAO

        public MessageDAO​(java.sql.Connection con,
                          User user)
    • Method Detail

      • updateMessageTags

        public void updateMessageTags​(int messageId,
                                      java.util.Set<java.lang.Integer> tagIds)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getMessageTags

        public java.util.Set<java.lang.Integer> getMessageTags​(int messageId)
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteProcessMessages

        public void deleteProcessMessages​(int processId)
      • searchMessageList

        public void searchMessageList​(SearchResult<Message> searchResult,
                                      java.lang.Integer processId,
                                      java.lang.Integer typeId,
                                      java.lang.Integer direction,
                                      java.lang.Boolean processed,
                                      java.lang.Boolean withAttach,
                                      java.util.Date dateFrom,
                                      java.util.Date dateTo,
                                      java.lang.String from)
                               throws BGException
        Throws:
        BGException
      • searchMessageList

        public void searchMessageList​(SearchResult<Message> searchResult,
                                      java.lang.Integer processId,
                                      java.lang.Integer typeId,
                                      java.lang.Integer direction,
                                      java.lang.Boolean processed,
                                      java.lang.Boolean withAttach,
                                      java.util.Date dateFrom,
                                      java.util.Date dateTo,
                                      java.lang.String from,
                                      boolean reverseOrder)
                               throws BGException
        Throws:
        BGException
      • searchMessageList

        public void searchMessageList​(SearchResult<Message> searchResult,
                                      java.lang.Integer processId,
                                      java.lang.Integer typeId,
                                      java.lang.Integer direction,
                                      java.lang.Boolean processed,
                                      java.lang.Boolean withAttach,
                                      java.util.Date dateFrom,
                                      java.util.Date dateTo,
                                      java.lang.String from,
                                      boolean reverseOrder,
                                      java.util.Set<java.lang.Integer> tagIds)
                               throws BGException
        Throws:
        BGException
      • searchMessageList

        @Deprecated
        public void searchMessageList​(SearchResult<Message> searchResult,
                                      java.util.Collection<java.lang.Integer> processIds,
                                      java.lang.Integer typeId,
                                      java.lang.Integer direction,
                                      java.lang.Boolean processed,
                                      java.lang.Boolean withAttach,
                                      java.util.Date dateFrom,
                                      java.util.Date dateTo,
                                      java.lang.String from,
                                      boolean reverseOrder,
                                      java.util.Set<java.lang.Integer> tagIds)
                               throws BGException
        Deprecated.
        Throws:
        BGException
      • searchMessageList

        public void searchMessageList​(SearchResult<Message> searchResult,
                                      java.util.Collection<java.lang.Integer> processIds,
                                      java.util.Set<java.lang.Integer> typeIds,
                                      java.lang.Integer direction,
                                      java.lang.Boolean processed,
                                      java.lang.Boolean withAttach,
                                      java.util.Date dateFrom,
                                      java.util.Date dateTo,
                                      java.lang.String from,
                                      boolean reverseOrder,
                                      java.util.Set<java.lang.Integer> tagIds)
                               throws BGException
        Throws:
        BGException
      • getProcessMessageList

        public java.util.List<Message> getProcessMessageList​(int processId,
                                                             int beforeMessageId)
                                                      throws java.lang.Exception
        Retrieves process message list, sorted by ID.
        Parameters:
        processId - process ID.
        beforeMessageId - if > 0 - filter from message ID.
        Returns:
        Throws:
        java.lang.Exception
      • getProcessMessageTagMap

        public java.util.Map<java.lang.Integer,​java.util.Set<java.lang.Integer>> getProcessMessageTagMap​(int processId)
                                                                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getProcessMessageTagMap

        public java.util.Map<java.lang.Integer,​java.util.Set<java.lang.Integer>> getProcessMessageTagMap​(java.util.Collection<java.lang.Integer> processIds)
                                                                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getProcessMessageList

        public java.util.List<Message> getProcessMessageList​(java.util.Set<java.lang.Integer> processIds,
                                                             java.lang.String text)
                                                      throws java.lang.Exception
        Searches messages in processes.
        Parameters:
        processIds - process IDs.
        text - message substring.
        Returns:
        Throws:
        java.lang.Exception
      • getIsolationJoin

        public static java.lang.String getIsolationJoin​(User user)
      • getMessageFromRs

        public static Message getMessageFromRs​(java.sql.ResultSet rs,
                                               java.lang.String prefix)
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException