Package africa.absa.inception.mail
Class MailTemplate
- java.lang.Object
-
- africa.absa.inception.mail.MailTemplate
-
- All Implemented Interfaces:
Serializable
@Entity public class MailTemplate extends Object implements Serializable
The MailTemplate class holds the information for a mail template.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MailTemplate()Constructs a new MailTemplate.MailTemplate(String id, String name, MailTemplateContentType contentType, byte[] template)Constructs a new MailTemplate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Indicates whether some other object is "equal to" this one.MailTemplateContentTypegetContentType()Returns the content type for the mail template.LocalDateTimegetCreated()Returns the date and time the mail template was created.StringgetId()Returns the ID for the mail template.StringgetName()Returns the name of the mail template.byte[]getTemplate()Returns the Apache FreeMarker template for the mail template.LocalDateTimegetUpdated()Returns the date and time the mail template was last updated.inthashCode()Returns a hash code value for the object.protected voidonCreate()protected voidonUpdate()voidsetContentType(MailTemplateContentType contentType)Set the content type for the mail template.voidsetId(String id)Set the ID for the mail template.voidsetName(String name)Set the name of the mail template.voidsetTemplate(byte[] template)Set the Apache FreeMarker template for the mail template.StringtoString()Returns a string representation of the object.
-
-
-
Constructor Detail
-
MailTemplate
public MailTemplate()
Constructs a new MailTemplate.
-
MailTemplate
public MailTemplate(String id, String name, MailTemplateContentType contentType, byte[] template)
Constructs a new MailTemplate.- Parameters:
id- the ID for the mail templatename- the name of the mail templatecontentType- the content type for the mail templatetemplate- the Apache FreeMarker template for the mail template
-
-
Method Detail
-
equals
public boolean equals(Object object)
Indicates whether some other object is "equal to" this one.
-
getContentType
public MailTemplateContentType getContentType()
Returns the content type for the mail template.- Returns:
- the content type for the mail template
-
getCreated
public LocalDateTime getCreated()
Returns the date and time the mail template was created.- Returns:
- the date and time the mail template was created
-
getId
public String getId()
Returns the ID for the mail template.- Returns:
- the ID for the mail template
-
getName
public String getName()
Returns the name of the mail template.- Returns:
- the name of the mail template
-
getTemplate
public byte[] getTemplate()
Returns the Apache FreeMarker template for the mail template.- Returns:
- the Apache FreeMarker template for the mail template
-
getUpdated
public LocalDateTime getUpdated()
Returns the date and time the mail template was last updated.- Returns:
- the date and time the mail template was last updated
-
hashCode
public int hashCode()
Returns a hash code value for the object.
-
setContentType
public void setContentType(MailTemplateContentType contentType)
Set the content type for the mail template.- Parameters:
contentType- the content type for the mail template
-
setId
public void setId(String id)
Set the ID for the mail template.- Parameters:
id- the ID for the mail template
-
setName
public void setName(String name)
Set the name of the mail template.- Parameters:
name- the name of the mail template
-
setTemplate
public void setTemplate(byte[] template)
Set the Apache FreeMarker template for the mail template.- Parameters:
template- the Apache FreeMarker template for the mail template
-
toString
public String toString()
Returns a string representation of the object.
-
onCreate
protected void onCreate()
-
onUpdate
protected void onUpdate()
-
-