Class Customer
- java.lang.Object
-
- com.broadleafcommerce.search.customer.core.domain.Customer
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.search.api.domain.Indexable<String>
public class Customer extends Object implements com.broadleafcommerce.search.api.domain.Indexable<String>, com.broadleafcommerce.data.tracking.core.ContextStateAware
The indexable customer payload received from the web request for retrieving customers, to be mapped into a document for the search engine.
-
-
Constructor Summary
Constructors Constructor Description Customer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String name, Object value)Add a value to the JSON data.protected booleancanEqual(Object other)booleanequals(Object o)ObjectgetAttribute(String name)Get a value from the JSON data.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStategetContextState()Trackable context state information for this customer.StringgetId()The context ID of the customer.Map<String,Object>getJsonMap()JSON data for the customer object which isn't already stored in other fields.List<com.broadleafcommerce.search.api.domain.translation.Translation>getTranslations()Customers are not translatable, so no translations are provided.com.broadleafcommerce.search.api.type.IndexableTypegetType()inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)Trackable context state information for this customer.voidsetId(String id)The context ID of the customer.voidsetJsonMap(Map<String,Object> jsonMap)JSON data for the customer object which isn't already stored in other fields.StringtoString()
-
-
-
Method Detail
-
getType
public final com.broadleafcommerce.search.api.type.IndexableType getType()
- Specified by:
getTypein interfacecom.broadleafcommerce.search.api.domain.Indexable<String>
-
getTranslations
public List<com.broadleafcommerce.search.api.domain.translation.Translation> getTranslations()
Customers are not translatable, so no translations are provided.- Specified by:
getTranslationsin interfacecom.broadleafcommerce.search.api.domain.Indexable<String>- Returns:
- empty list
-
addAttribute
public void addAttribute(String name, Object value)
Add a value to the JSON data. Necessary for populating the JSON from the payload.- Parameters:
name- the attribute namevalue- the attribute value
-
getAttribute
public Object getAttribute(String name)
Get a value from the JSON data. Necessary for populating the JSON from the payload.- Parameters:
name- the attribute name
-
getJsonMap
public Map<String,Object> getJsonMap()
JSON data for the customer object which isn't already stored in other fields.- Specified by:
getJsonMapin interfacecom.broadleafcommerce.search.api.domain.Indexable<String>- Returns:
- JSON customer object data
-
getId
public String getId()
The context ID of the customer.- Specified by:
getIdin interfacecom.broadleafcommerce.search.api.domain.Indexable<String>- Returns:
- the context ID of the customer
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
Trackable context state information for this customer.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- trackable context state information
-
setJsonMap
public void setJsonMap(Map<String,Object> jsonMap)
JSON data for the customer object which isn't already stored in other fields.- Parameters:
jsonMap- JSON customer object data
-
setId
public void setId(String id)
The context ID of the customer.- Parameters:
id- the context ID of the customer
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
Trackable context state information for this customer.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- trackable context state information
-
canEqual
protected boolean canEqual(Object other)
-
-