Package com.axelor.mail.db
Class MailMessage
- java.lang.Object
-
- com.axelor.db.Model
-
- com.axelor.auth.db.AuditableModel
-
- com.axelor.mail.db.MailMessage
-
@Entity public class MailMessage extends AuditableModel
The model to store different kind of messages like system notifications, comments, email messages etc.
-
-
Constructor Summary
Constructors Constructor Description MailMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFlag(MailFlags item)
Add the givenMailFlags
item to theflags
collection.void
addRecipient(MailAddress item)
Add the givenMailAddress
item to therecipients
collection.void
addReply(MailMessage item)
Add the givenMailMessage
item to thereplies
collection.void
clearFlags()
Clear theflags
collection.void
clearRecipients()
Clear therecipients
collection.void
clearReplies()
Clear thereplies
collection.boolean
equals(Object obj)
User
getAuthor()
String
getBody()
List<MailFlags>
getFlags()
MailAddress
getFrom()
Long
getId()
String
getMessageId()
Unique message identifierMailMessage
getParent()
Set<MailAddress>
getRecipients()
Long
getRelatedId()
String
getRelatedModel()
String
getRelatedName()
List<MailMessage>
getReplies()
MailMessage
getRoot()
String
getSubject()
String
getSummary()
String
getType()
int
hashCode()
void
removeFlag(MailFlags item)
Remove the givenMailFlags
item from theflags
collection.void
removeRecipient(MailAddress item)
Remove the givenMailAddress
item from therecipients
collection.void
removeReply(MailMessage item)
Remove the givenMailMessage
item from thereplies
collection.void
setAuthor(User author)
void
setBody(String body)
void
setFlags(List<MailFlags> flags)
void
setFrom(MailAddress from)
void
setId(Long id)
void
setMessageId(String messageId)
void
setParent(MailMessage parent)
void
setRecipients(Set<MailAddress> recipients)
void
setRelatedId(Long relatedId)
void
setRelatedModel(String relatedModel)
void
setRelatedName(String relatedName)
void
setReplies(List<MailMessage> replies)
void
setRoot(MailMessage root)
void
setSubject(String subject)
void
setSummary(String summary)
void
setType(String type)
String
toString()
-
Methods inherited from class com.axelor.auth.db.AuditableModel
getCreatedBy, getCreatedOn, getUpdatedBy, getUpdatedOn
-
Methods inherited from class com.axelor.db.Model
getArchived, getVersion, isSelected, setArchived, setSelected, setVersion
-
-
-
-
Method Detail
-
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 givenMailAddress
item to therecipients
collection.- Parameters:
item
- the item to add
-
removeRecipient
public void removeRecipient(MailAddress item)
Remove the givenMailAddress
item from therecipients
collection.- Parameters:
item
- the item to remove
-
clearRecipients
public void clearRecipients()
Clear therecipients
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 givenMailMessage
item to thereplies
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 givenMailMessage
item from thereplies
collection.- Parameters:
item
- the item to remove
-
clearReplies
public void clearReplies()
Clear thereplies
collection.
-
addFlag
public void addFlag(MailFlags item)
Add the givenMailFlags
item to theflags
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 givenMailFlags
item from theflags
collection.- Parameters:
item
- the item to remove
-
clearFlags
public void clearFlags()
Clear theflags
collection.
-
-