Class CustomerPhoneImpl

java.lang.Object
org.broadleafcommerce.profile.core.domain.CustomerPhoneImpl
All Implemented Interfaces:
Serializable, MultiTenantCloneable<CustomerPhone>, CustomerPhone, CustomerPhoneAdminPresentation

@Entity public class CustomerPhoneImpl extends Object implements CustomerPhone, CustomerPhoneAdminPresentation
See Also:
  • Field Details

    • id

      protected Long id
    • phoneName

      protected String phoneName
    • customer

      protected Customer customer
    • phone

      protected Phone phone
  • Constructor Details

    • CustomerPhoneImpl

      public CustomerPhoneImpl()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface CustomerPhone
    • setId

      public void setId(Long id)
      Specified by:
      setId in interface CustomerPhone
    • getPhoneName

      public String getPhoneName()
      Specified by:
      getPhoneName in interface CustomerPhone
    • setPhoneName

      public void setPhoneName(String phoneName)
      Specified by:
      setPhoneName in interface CustomerPhone
    • getCustomer

      public Customer getCustomer()
      Specified by:
      getCustomer in interface CustomerPhone
    • setCustomer

      public void setCustomer(Customer customer)
      Specified by:
      setCustomer in interface CustomerPhone
    • getPhone

      public Phone getPhone()
      Specified by:
      getPhone in interface CustomerPhone
    • setPhone

      public void setPhone(Phone phone)
      Specified by:
      setPhone in interface CustomerPhone
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • createOrRetrieveCopyInstance

      public <G extends CustomerPhone> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
      Description copied from interface: MultiTenantCloneable
      Clone 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();

      //copy extended field values on myClone here

      return createResponse; }

      Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:

      public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException { CreateResponse createResponse = context.createOrRetrieveCopyInstance(this); MyClass myClone = createResponse.getClone();

      //copy extended field values on myClone here

      return createResponse; }

      Specified by:
      createOrRetrieveCopyInstance in interface MultiTenantCloneable<CustomerPhone>
      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