Class MailMessage


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

    • MailMessage

      public MailMessage()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in class Model
    • 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)
    • getFrom

      public MailAddress getFrom()
    • setFrom

      public void setFrom(MailAddress from)
    • getRecipients

      public Set<MailAddress> getRecipients()
    • 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)
    • getRoot

      public MailMessage getRoot()
    • setRoot

      public void setRoot(MailMessage root)
    • getParent

      public MailMessage getParent()
    • setParent

      public void setParent(MailMessage parent)
    • getReplies

      public List<MailMessage> getReplies()
    • setReplies

      public void setReplies(List<MailMessage> replies)
    • 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.
    • getFlags

      public List<MailFlags> getFlags()
    • setFlags

      public void setFlags(List<MailFlags> flags)
    • 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.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object