Class Account
- java.lang.Object
-
- com.broadleafcommerce.customer.domain.Account
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class Account extends Object implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
A grouping ofCustomerswhich may represent things like a B2B business account or a telco account.- Author:
- Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Account()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)StringgetAccountNumber()A business-driven unique identifier for the accountStringgetAccountType()A simple categorization that can be used to group accounts or enforce business logic<T> TgetAttribute(String key)Map<String,Attribute>getAttributes()Dynamic attributes that are a part of the account.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.StringgetId()The context ID of the account.StringgetName()The name of the accountAccountRefgetParentAccount()The account's parent account.StringgetStatus()The status of this account.StringgetTaxId()The unique tax id for the account's related organizationinthashCode()voidsetAccountNumber(String accountNumber)A business-driven unique identifier for the accountvoidsetAccountType(String accountType)A simple categorization that can be used to group accounts or enforce business logicvoidsetAttributes(Map<String,Attribute> attributes)Dynamic attributes that are a part of the account.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetId(String id)The context ID of the account.voidsetName(String name)The name of the accountvoidsetParentAccount(AccountRef parentAccount)The account's parent account.voidsetStatus(String status)The status of this account.voidsetTaxId(String taxId)The unique tax id for the account's related organizationStringtoString()
-
-
-
Method Detail
-
getAttribute
public <T> T getAttribute(String key)
-
getId
public String getId()
The context ID of the account.- Returns:
- the context ID of the account
-
getParentAccount
public AccountRef getParentAccount()
The account's parent account. Users with access to the parent account also have access to this account.- Returns:
- the account's parent account
-
getStatus
public String getStatus()
The status of this account. By default, the account is active.- Returns:
- the status of this account
- See Also:
AccountStatus
-
getName
public String getName()
The name of the account- Returns:
- the name of the account
-
getAccountNumber
public String getAccountNumber()
A business-driven unique identifier for the account- Returns:
- a business-driven unique identifier for the account
-
getAccountType
public String getAccountType()
A simple categorization that can be used to group accounts or enforce business logic- Returns:
- a simple categorization that can be used to group accounts or enforce business logic
-
getTaxId
public String getTaxId()
The unique tax id for the account's related organization- Returns:
- the unique tax id for the account's related organization
-
getAttributes
public Map<String,Attribute> getAttributes()
Dynamic attributes that are a part of the account. This is an admin-entered field.- Returns:
- dynamic attributes that are a part of the account
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object.
-
setId
public void setId(String id)
The context ID of the account.- Parameters:
id- the context ID of the account
-
setParentAccount
public void setParentAccount(AccountRef parentAccount)
The account's parent account. Users with access to the parent account also have access to this account.- Parameters:
parentAccount- the account's parent account
-
setStatus
public void setStatus(String status)
The status of this account. By default, the account is active.- Parameters:
status- the status of this account- See Also:
AccountStatus
-
setName
public void setName(String name)
The name of the account- Parameters:
name- the name of the account
-
setAccountNumber
public void setAccountNumber(String accountNumber)
A business-driven unique identifier for the account- Parameters:
accountNumber- a business-driven unique identifier for the account
-
setAccountType
public void setAccountType(String accountType)
A simple categorization that can be used to group accounts or enforce business logic- Parameters:
accountType- a simple categorization that can be used to group accounts or enforce business logic
-
setTaxId
public void setTaxId(String taxId)
The unique tax id for the account's related organization- Parameters:
taxId- the unique tax id for the account's related organization
-
setAttributes
public void setAttributes(Map<String,Attribute> attributes)
Dynamic attributes that are a part of the account. This is an admin-entered field.- Parameters:
attributes- dynamic attributes that are a part of the account
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-