Class Mail

Object
Mail
All Implemented Interfaces:
Serializable

@Entity public class Mail extends Object implements Serializable
Contents of mail someone has sent. For a list of receivers of the mail, see MailReceiver.
Author:
maartenl
See Also:
  • Field Details

    • ID_OLD_FADED_YELLOW_PARCHMENT

      public static final long ID_OLD_FADED_YELLOW_PARCHMENT
      See Also:
    • ID_CRUMPLED_PIECE_OF_PAPER

      public static final long ID_CRUMPLED_PIECE_OF_PAPER
      See Also:
    • ID_HANDWRITTEN_FOLDED_INKSPATTERED_LETTER

      public static final long ID_HANDWRITTEN_FOLDED_INKSPATTERED_LETTER
      See Also:
    • ID_SHORT_RUSHED_SQUARESHAPED_MEMO

      public static final long ID_SHORT_RUSHED_SQUARESHAPED_MEMO
      See Also:
    • ID_EMBOSSED_BEAUTIFULLY_WRITTEN_LEAFLET

      public static final long ID_EMBOSSED_BEAUTIFULLY_WRITTEN_LEAFLET
      See Also:
    • ID_EMBOSSED_BEAUTIFULLY_WRITTEN_INVITATION

      public static final long ID_EMBOSSED_BEAUTIFULLY_WRITTEN_INVITATION
      See Also:
    • ITEMS

      public static final List<Long> ITEMS
      Contains the item ids of the different items that represent letters/mail. The readdescription of said letters looks a little like the following:

      "stuffletterhead letterbody letterfooter"

      That way, the letterhead, letterbody and letterfooter are automatically replaced.
  • Constructor Details

    • Mail

      public Mail()
  • Method Details

    • getId

      public Long getId()
    • setId

      public void setId(Long id)
    • getSubject

      public String getSubject()
      The subject or title of the mail.
      Returns:
      String containing the subject.
    • setSubject

      public void setSubject(String subject)
      See Also:
    • getWhensent

      public LocalDateTime getWhensent()
    • setWhensent

      public void setWhensent(LocalDateTime whensent)
    • getBody

      public String getBody()
    • setBody

      public void setBody(String body)
    • getDeleted

      public Boolean getDeleted()
      Indicates wether or not the original send of the mail, has deleted the mail. This has no effect on the mail received, these are still viewable by the receivers.
    • setDeleted

      public void setDeleted(Boolean deleted)
      See Also:
    • getToname

      public String getToname()

      Returns the receiver(s) of the mail. as originally typed. For example, "Jim", but also "Jim, Hank", but also possible is "guild", "deputies", "everybody", "guild: The Inner Flame".

      As such there is no hard relation to persons or anything of the kind. It's just a string.

      Returns:
      comma separated list of all people receiving the mail
    • setToname

      public void setToname(String toname)
      Sets the receiver of the mail.
      See Also:
    • getName

      public Person getName()
      Returns the sender of the mail.
      Returns:
      the person sending the mail.
    • setName

      public void setName(Person name)
      Sets the sender of the mail.
      Parameters:
      name - sender of the mail
    • hashCode

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

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object