Class AddressValidation
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.AddressValidation
- All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, Cacheable
A bean to store E-Mail Address validation data.
- Since:
- 1.0
- Version:
- 5.2
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAddressValidation(int id, String addr) Creates a new Address validation entry. -
Method Summary
Modifier and TypeMethodDescriptionReturns the new e-mail address.getHash()Returns the hashcode to be sent to the user to validate the address.booleanReturns whether the address is valid or not.voidsetAddress(String addr) Updates the user's e-mail address.voidUpdates the hash code sent to the user to validate the address.voidsetInvalid(boolean isInvalid) Updates whether the e-mail address is invalidated.Methods inherited from class DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.intbooleangetHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.inthashCode()voidsetID(int id) Update the database row ID of this bean.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.
-
Constructor Details
-
AddressValidation
Creates a new Address validation entry.- Parameters:
id- the Database ID of the Pilot or Applicant.addr- the new e-mail address- Throws:
NullPointerException- if addr is nullIllegalArgumentException- if id is zero or negative
-
-
Method Details
-
getAddress
-
getHash
Returns the hashcode to be sent to the user to validate the address.- Returns:
- the hash code
- See Also:
-
getIsValid
public boolean getIsValid()Returns whether the address is valid or not.- Returns:
- TRUE if the address is valid, otherwise FALSE
-
setHash
Updates the hash code sent to the user to validate the address.- Parameters:
hash- the new hash code- See Also:
-
setAddress
Updates the user's e-mail address.- Parameters:
addr- the new e-mail address- Throws:
NullPointerException- if addr is null- See Also:
-
setInvalid
public void setInvalid(boolean isInvalid) Updates whether the e-mail address is invalidated.- Parameters:
isInvalid- TRUE if invalidated, otherwise FALSE
-