|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zphinx.spine.vo.dto.SpineBean
com.zphinx.spine.members.AccountDetails
public class AccountDetails
AccountDetails represents the member's account details persisted within the system. Every Member/Principal can possess one of 6 account types namely
Copyright ©Zphinx Software Solutions
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.zphinx.spine.vo.dto.SpineBean |
|---|
SpineBean.PermissionFactory |
| Field Summary |
|---|
| Fields inherited from interface com.zphinx.spine.members.MemberAccount |
|---|
ACCOUNT_30_DAYS, ACCOUNT_NO_EXPIRE, ACCOUNT_ONE_DAY, ACCOUNT_ONE_WEEK, ACCOUNT_ONE_YEAR, ACCOUNT_THREE_DAYS, ACCOUNT_VARIABLE |
| Constructor Summary | |
|---|---|
AccountDetails()
Default constructor - sets the account expiration period to three 3 days |
|
AccountDetails(long accountId,
AccountTypeBean accountType)
Constructor which presets the account type and sets the default account expiration period to three days |
|
AccountDetails(long accountId,
long expire)
Constructor which presets the expiration time to a time defined above by the rules:
|
|
AccountDetails(String activationCode)
Constructor - Allows the developer to manually set the activation code and sets the default account expiration period to three days |
|
| Method Summary | |
|---|---|
void |
changeDetails(AccountTypeBean accountType,
long expire)
Amend the properties of this object with the given parameters |
Date |
getAccountCreationDate()
Gets the date this account was created |
Date |
getAccountExpirationDate()
Gets the expiration date of this account |
AccountTypeBean |
getAccountType()
Gets the type of account we created |
String |
getActivationCode()
Gets the activation code associated with this account |
long |
getExpiration()
Returns a string representation of the expiration date |
boolean |
isAccountTypeChanged()
Checks for changes in the users accountType |
boolean |
isInitialized()
Returns true if this object has been fully initialized |
void |
restoreDate(Date date)
Restores the expiration date to the parameter date. |
void |
setAccountCreationDate(Date accountCreationDate)
Sets the date this account was created |
void |
setAccountExpirationDate(Date accountExpirationDate)
Sets the expiration date of this account |
void |
setAccountType(AccountTypeBean accountTypeBean)
Sets the type of account we are creating |
void |
setActivationCode(String activationCode)
Sets the activation code for this account |
void |
setExpiration(long expiration)
Sets the expiration date of this account |
void |
setInitialized(boolean constructorExpiry)
Sets this object to the initialized state |
| Methods inherited from class com.zphinx.spine.vo.dto.SpineBean |
|---|
getCreationDate, getDescription, getId, getLocale, getModifiedDate, getName, getPermission, getSessionId, setCreationDate, setDescription, setId, setLocale, setModifiedDate, setName, setPermission, setSessionId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.zphinx.spine.members.MemberAccount |
|---|
getId, setId |
| Constructor Detail |
|---|
public AccountDetails()
public AccountDetails(String activationCode)
activationCode - The code to be associated with the activation of this account.
public AccountDetails(long accountId,
AccountTypeBean accountType)
throws SpineApplicationException
accountId - The account owners idaccountType - The type of account details object we are creating
SpineApplicationException - Throws an application exception if an error occurs while initializing this AccountDetails object
public AccountDetails(long accountId,
long expire)
throws SpineApplicationException
accountId - The account owners idexpire - The time in milliseconds when this account will expire
SpineApplicationException| Method Detail |
|---|
public Date getAccountExpirationDate()
getAccountExpirationDate in interface MemberAccount
public void setAccountExpirationDate(Date accountExpirationDate)
throws SpineApplicationException
setAccountExpirationDate in interface MemberAccountaccountExpirationDate - The accountExpirationDate to set.
SpineApplicationExceptionpublic long getExpiration()
public void setExpiration(long expiration)
throws SpineApplicationException
expiration - The accountExpirationDate to set.
SpineApplicationExceptionpublic AccountTypeBean getAccountType()
getAccountType in interface MemberAccountpublic void setAccountType(AccountTypeBean accountTypeBean)
setAccountType in interface MemberAccountaccountTypeBean - The accountTypeBean to set.public boolean isInitialized()
isInitialized in interface MemberAccountpublic void setInitialized(boolean constructorExpiry)
constructorExpiry - A boolean indicating if this object has been initialized
public void changeDetails(AccountTypeBean accountType,
long expire)
throws SpineApplicationException
changeDetails in interface MemberAccountaccountType - The type of account details object we are creatingexpire - The time in milliseconds when this account will expire
SpineApplicationExceptionpublic String getActivationCode()
public void setActivationCode(String activationCode)
activationCode - The activationCode to set.public Date getAccountCreationDate()
public void setAccountCreationDate(Date accountCreationDate)
accountCreationDate - The accountCreationDate to set.public void restoreDate(Date date)
date - The expiration date to setpublic boolean isAccountTypeChanged()
isAccountTypeChanged in interface MemberAccount
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||