Class 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 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 template
        name - the name of the mail template
        contentType - the content type for the mail template
        template - 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.
        Overrides:
        equals in class Object
        Parameters:
        object - the reference object with which to compare
        Returns:
        true if this object is the same as the object argument otherwise false
      • 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.
        Overrides:
        hashCode in class Object
        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.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object
      • onCreate

        protected void onCreate()
      • onUpdate

        protected void onUpdate()