org.openwms.core.domain.system.usermanagement
Class Email

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.system.usermanagement.Email
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class Email
extends AbstractEntity
implements DomainObject<Long>

An Email represents the email address of an User.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Heiko Scherrer
See Also:
User, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
Email(String userName, String emailAddress)
          Create a new Email with an userName and an emailAddress.
 
Method Summary
 String getEmailAddress()
          Return the emailAddress.
 String getFullName()
          Return the fullName.
 Long getId()
          Return the technical key value.
 String getUserName()
          Returns the name of the User who owns this Email.
 long getVersion()
          Return the value of the optimistic locking field.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 void setEmailAddress(String emailAddress)
          Set the emailAddress.
 void setFullName(String fullName)
          Set the fullName.
 void setUserName(String userName)
          Assign the Email to an User.
 String toString()
          Return the emailAddress as String.
 
Methods inherited from class org.openwms.core.domain.AbstractEntity
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Email

public Email(String userName,
             String emailAddress)
Create a new Email with an userName and an emailAddress.

Parameters:
userName - The name of the User
emailAddress - The email address of the User
Throws:
IllegalArgumentException - when userName or emailAddress is null or empty
Method Detail

getId

public Long getId()
Return the technical key value.

Specified by:
getId in interface DomainObject<Long>
Returns:
The technical, unique key

isNew

public boolean isNew()
Check whether the instance is a transient or persisted one.

Specified by:
isNew in interface DomainObject<Long>
Returns:
true if transient (not persisted before), otherwise false

getUserName

public String getUserName()
Returns the name of the User who owns this Email.

Returns:
The userName as String

setUserName

public void setUserName(String userName)
Assign the Email to an User.

Parameters:
userName - Name of 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.

getVersion

public long getVersion()
Return the value of the optimistic locking field.

Specified by:
getVersion in interface DomainObject<Long>
Returns:
the version number

toString

public String toString()
Return the emailAddress as String.

Overrides:
toString in class Object
Returns:
the emailAddress
See Also:
Object.toString()


Copyright © 2005-2011 openwms.org. All Rights Reserved.