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
The email address as String (not nullable).
The fullname of the User
.
private boolean
Whether this email address is the primary email used in the system.
Unique identifier of the Email
(not nullable).
-
Constructor Summary 
Constructors
-
Method Summary 
boolean
int
boolean
void
void
void
void
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
-
Field Details 
-
user 
Unique identifier of the Email
(not nullable).
-
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 
The fullname of the User
.
-
Constructor Details 
-
Email 
protected Email()
Dear JPA...
-
Email 
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 
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 
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)
-
-
hashCode 
public int hashCode()
All fields.
- Overrides:
hashCode
in class Object
-
toString 
Return the emailAddress as String.
- Overrides:
toString
in class Object
- Returns:
- the emailAddress
- See Also:
-