Class CustomerAttributeImpl
java.lang.Object
org.broadleafcommerce.profile.core.domain.CustomerAttributeImpl
- All Implemented Interfaces:
Serializable,MultiTenantCloneable<CustomerAttribute>,ValueAssignable<String>,CustomerAttribute
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends CustomerAttribute>
CreateResponse<G>Clone this entity for the purpose of multiple tenancy.booleanGets the associated customer.getId()Gets the id.getName()The namegetValue()The valueinthashCode()voidsetCustomer(Customer customer) Sets the associated customer.voidSets the id.voidThe namevoidThe valuetoString()
-
Field Details
-
id
The id. -
name
The name. -
value
The value. -
customer
The customer.
-
-
Constructor Details
-
CustomerAttributeImpl
public CustomerAttributeImpl()
-
-
Method Details
-
getId
Description copied from interface:CustomerAttributeGets the id.- Specified by:
getIdin interfaceCustomerAttribute- Returns:
- the id
-
setId
Description copied from interface:CustomerAttributeSets the id.- Specified by:
setIdin interfaceCustomerAttribute- Parameters:
id- the new id
-
getValue
Description copied from interface:ValueAssignableThe value- Specified by:
getValuein interfaceValueAssignable<String>- Returns:
- The value
-
setValue
Description copied from interface:ValueAssignableThe value- Specified by:
setValuein interfaceValueAssignable<String>- Parameters:
value- The value
-
getName
Description copied from interface:ValueAssignableThe name- Specified by:
getNamein interfaceValueAssignable<String>- Returns:
- The name
-
setName
Description copied from interface:ValueAssignableThe name- Specified by:
setNamein interfaceValueAssignable<String>- Parameters:
name- The name
-
toString
-
getCustomer
Description copied from interface:CustomerAttributeGets the associated customer.- Specified by:
getCustomerin interfaceCustomerAttribute- Returns:
- the customer
-
setCustomer
Description copied from interface:CustomerAttributeSets the associated customer.- Specified by:
setCustomerin interfaceCustomerAttribute
-
hashCode
public int hashCode() -
equals
-
createOrRetrieveCopyInstance
public <G extends CustomerAttribute> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException Description copied from interface:MultiTenantCloneableClone this entity for the purpose of multiple tenancy. Note, extending classes should follow this pattern:public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context); if (createResponse.isAlreadyPopulated()) { return createResponse; } MyClass myClone = createResponse.getClone();Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity://copy extended field values on myClone here
return createResponse; }
public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponsecreateResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone(); //copy extended field values on myClone here
return createResponse; }
- Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<CustomerAttribute>- Parameters:
context- a context object providing persistence and library functionality for copying entities- Returns:
- the resulting copy container, possibly already persisted
- Throws:
CloneNotSupportedException- if there's a problem detected with the cloning configuration
-