Class MailMessage


  • @Entity
    public class MailMessage
    extends AuditableModel
    The model to store different kind of messages like system notifications, comments, email messages etc.
    • Constructor Detail

      • MailMessage

        public MailMessage()
    • Method Detail

      • setId

        public void setId​(Long id)
        Specified by:
        setId in class Model
      • getType

        public String getType()
      • setType

        public void setType​(String type)
      • getAuthor

        public User getAuthor()
      • setAuthor

        public void setAuthor​(User author)
      • setRecipients

        public void setRecipients​(Set<MailAddress> recipients)
      • addRecipient

        public void addRecipient​(MailAddress item)
        Add the given MailAddress item to the recipients collection.
        Parameters:
        item - the item to add
      • removeRecipient

        public void removeRecipient​(MailAddress item)
        Remove the given MailAddress item from the recipients collection.
        Parameters:
        item - the item to remove
      • clearRecipients

        public void clearRecipients()
        Clear the recipients collection.
      • getSubject

        public String getSubject()
      • setSubject

        public void setSubject​(String subject)
      • getBody

        public String getBody()
      • setBody

        public void setBody​(String body)
      • getSummary

        public String getSummary()
      • setSummary

        public void setSummary​(String summary)
      • getMessageId

        public String getMessageId()
        Unique message identifier
        Returns:
        the property value
      • setMessageId

        public void setMessageId​(String messageId)
      • getRelatedId

        public Long getRelatedId()
      • setRelatedId

        public void setRelatedId​(Long relatedId)
      • getRelatedModel

        public String getRelatedModel()
      • setRelatedModel

        public void setRelatedModel​(String relatedModel)
      • getRelatedName

        public String getRelatedName()
      • setRelatedName

        public void setRelatedName​(String relatedName)
      • setParent

        public void setParent​(MailMessage parent)
      • addReply

        public void addReply​(MailMessage item)
        Add the given MailMessage item to the replies collection.

        It sets item.parent = this to ensure the proper relationship.

        Parameters:
        item - the item to add
      • removeReply

        public void removeReply​(MailMessage item)
        Remove the given MailMessage item from the replies collection.
        Parameters:
        item - the item to remove
      • clearReplies

        public void clearReplies()
        Clear the replies collection.
      • addFlag

        public void addFlag​(MailFlags item)
        Add the given MailFlags item to the flags collection.

        It sets item.message = this to ensure the proper relationship.

        Parameters:
        item - the item to add
      • removeFlag

        public void removeFlag​(MailFlags item)
        Remove the given MailFlags item from the flags collection.
        Parameters:
        item - the item to remove
      • clearFlags

        public void clearFlags()
        Clear the flags collection.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object