Class Email

java.lang.Object
org.ameba.integration.jpa.BaseEntity
org.openwms.core.uaa.impl.Email
All Implemented Interfaces:
Serializable, org.ameba.integration.TypedEntity<Long>

@Entity public class Email extends org.ameba.integration.jpa.BaseEntity implements Serializable
An Email represents the email address of an User.
Author:
Heiko Scherrer
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    The email address as String (not nullable).
    private String
    The fullname of the User.
    private boolean
    Whether this email address is the primary email used in the system.
    private User
    Unique identifier of the Email (not nullable).
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Dear JPA...
     
    Email(User user, String emailAddress)
    Create a new Email.
     
    Email(User user, String emailAddress, boolean primary)
    Create a new Email.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    All fields.
    Return the emailAddress.
    Return the fullname.
    Returns the User.
    int
    All fields.
    boolean
     
    void
    setEmailAddress(String emailAddress)
    Set the emailAddress.
    void
    setFullname(String fullname)
    Set the fullname.
    void
    setPrimary(boolean primary)
     
    void
    setUser(User user)
    Set the user.
    Return the emailAddress as String.

    Methods inherited from class org.ameba.integration.jpa.BaseEntity

    getCreatedBy, getCreateDt, getLastModifiedBy, getLastModifiedDt, getOl, getPk, isNew, setCreatedBy, setCreateDt, setLastModifiedBy, setLastModifiedDt, setOl

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • user

      private User user
      Unique identifier of the Email (not nullable).
    • emailAddress

      private String emailAddress
      The email address as String (not nullable).
    • primary

      private boolean primary
      Whether this email address is the primary email used in the system.
    • fullname

      private String fullname
      The fullname of the User.
  • Constructor Details

    • Email

      protected Email()
      Dear JPA...
    • Email

      public Email(User user, String emailAddress)
      Create a new Email.
      Parameters:
      user - The User
      emailAddress - The email address of the User
      Throws:
      IllegalArgumentException - when userName or emailAddress is null or empty
    • Email

      public Email(User user, String emailAddress, boolean primary)
      Create a new Email.
      Parameters:
      user - The User
      emailAddress - The email address of the User
      primary - If the email is the primary address
      Throws:
      IllegalArgumentException - when userName or emailAddress is null or empty
  • Method Details

    • getUser

      public User getUser()
      Returns the User.
      Returns:
      The User
    • setUser

      public void setUser(User user)
      Set the user.
      Parameters:
      user - The user
    • getEmailAddress

      public String getEmailAddress()
      Return the emailAddress.
      Returns:
      The emailAddress.
    • setEmailAddress

      public void setEmailAddress(String emailAddress)
      Set the emailAddress.
      Parameters:
      emailAddress - The emailAddress to set.
    • getFullname

      public String getFullname()
      Return the fullname.
      Returns:
      The fullname.
    • setFullname

      public void setFullname(String fullname)
      Set the fullname.
      Parameters:
      fullname - The fullname to set.
    • isPrimary

      public boolean isPrimary()
    • setPrimary

      public void setPrimary(boolean primary)
    • equals

      public boolean equals(Object o)
      All fields.
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Return the emailAddress as String.
      Overrides:
      toString in class Object
      Returns:
      the emailAddress
      See Also: