org.nhindirect.config.store
Class Domain

java.lang.Object
  extended by org.nhindirect.config.store.Domain

@Entity
public class Domain
extends Object


Constructor Summary
Domain()
          Construct a Domain.
Domain(String aName)
          Construct a Domain.
 
Method Summary
 Collection<Address> getAddresses()
          Get a colection of addresses.
 Calendar getCreateTime()
          Get the value of createTime.
 String getDomainName()
          Get the value of domainName.
 Long getId()
          Get the value of id.
 Long getPostmasterAddressId()
          Get the value of postmasterAddressId.
 String getPostMasterEmail()
          If we have an email address id, then search through the collection of addresses to find an id match and return it.
 EntityStatus getStatus()
          Get the value of status.
 Calendar getUpdateTime()
          Get the value of updateTime.
 boolean isValid()
          Verify the Domain is valid.
 void setAddresses(Collection<Address> addresses)
          Set the value of addresses.
 void setCreateTime(Calendar timestamp)
          Set the value of createTime.
 void setDomainName(String aName)
          Set the value of domainName.
 void setId(Long anId)
          Set the value of id.
 void setPostmasterAddressId(Long anId)
          Set the value of postmasterAddressId.
 void setPostMasterEmail(String email)
          Process according to the following table:
 void setStatus(EntityStatus aStatus)
          Set the value of status.
 void setUpdateTime(Calendar timestamp)
          Set the value of updateTime.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Domain

public Domain()
Construct a Domain.


Domain

public Domain(String aName)
Construct a Domain.

Parameters:
aName - The domain name.
Method Detail

getId

public Long getId()
Get the value of id.

Returns:
the value of id.

setId

public void setId(Long anId)
Set the value of id.

Parameters:
anId - The value of id.

getDomainName

public String getDomainName()
Get the value of domainName.

Returns:
the value of domainName.

getCreateTime

public Calendar getCreateTime()
Get the value of createTime.

Returns:
the value of createTime.

getPostmasterAddressId

public Long getPostmasterAddressId()
Get the value of postmasterAddressId.

Returns:
the value of postmasterAddressId.

setPostmasterAddressId

public void setPostmasterAddressId(Long anId)
Set the value of postmasterAddressId.

Parameters:
anId - The value of postmasterAddressId.

getUpdateTime

public Calendar getUpdateTime()
Get the value of updateTime.

Returns:
the value of updateTime.

getStatus

public EntityStatus getStatus()
Get the value of status.

Returns:
the value of status.

setDomainName

public void setDomainName(String aName)
Set the value of domainName.

Parameters:
aName - The value of domainName.

setCreateTime

public void setCreateTime(Calendar timestamp)
Set the value of createTime.

Parameters:
timestamp - The value of createTime.

setUpdateTime

public void setUpdateTime(Calendar timestamp)
Set the value of updateTime.

Parameters:
timestamp - The value of updateTime.

setStatus

public void setStatus(EntityStatus aStatus)
Set the value of status.

Parameters:
aStatus - The value of status.

getPostMasterEmail

public String getPostMasterEmail()
If we have an email address id, then search through the collection of addresses to find an id match and return it.

Returns:
the postmaster email address.

setPostMasterEmail

public void setPostMasterEmail(String email)
Process according to the following table:

id name action
0/Null 0/Null None
Not Null 0/Null Set Id to null. Don't remove the Address
0/Null Not Null Add to Address if not there, set Id
Not Null Not Null if id.address = address then None, otherwise update id

Parameters:
email - The postmaster email address.

getAddresses

public Collection<Address> getAddresses()
Get a colection of addresses.

Returns:
a collection of addresses.

setAddresses

public void setAddresses(Collection<Address> addresses)
Set the value of addresses.

Parameters:
addresses - the value of addresses

isValid

public boolean isValid()
Verify the Domain is valid.

Returns:
true if the Domain is valid, false otherwise.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.