java.lang.Object
com.broadleafcommerce.customer.provider.jpa.domain.JpaCustomer
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.CustomerContextTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.policy.Owned, com.broadleafcommerce.data.tracking.core.search.Indexable, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking>, Serializable

@Entity @TrackableExtension({TENANT,CUSTOMER_CONTEXT}) public class JpaCustomer extends Object implements com.broadleafcommerce.data.tracking.core.CustomerContextTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.policy.Owned, com.broadleafcommerce.data.tracking.core.search.Indexable, com.broadleafcommerce.data.tracking.core.Temporal
See Also:
  • Field Details

  • Constructor Details

    • JpaCustomer

      public JpaCustomer()
  • Method Details

    • fromMe

      @NonNull public org.modelmapper.ModelMapper fromMe()
      Specified by:
      fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • toMe

      @NonNull public org.modelmapper.ModelMapper toMe()
      Specified by:
      toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • getBusinessDomainType

      public Class<?> getBusinessDomainType()
      Specified by:
      getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
    • getDisplay

      public Optional<String> getDisplay()
      Specified by:
      getDisplay in interface com.broadleafcommerce.data.tracking.core.Trackable
    • getOwnerIdentifier

      public String getOwnerIdentifier()
      Specified by:
      getOwnerIdentifier in interface com.broadleafcommerce.data.tracking.core.policy.Owned
    • getPhoneAsString

      public String getPhoneAsString()
    • setPhoneAsString

      public void setPhoneAsString(String phone)
    • getPhone

      public Phone getPhone()
    • setPhone

      public void setPhone(Phone phone)
    • getContextId

      public String getContextId()
      Specified by:
      getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
    • getFirstName

      public String getFirstName()
      See Also:
    • getMiddleName

      public String getMiddleName()
      See Also:
    • getLastName

      public String getLastName()
      See Also:
    • getFullName

      public String getFullName()
      See Also:
    • getUsername

      public String getUsername()
      See Also:
    • getEmail

      public String getEmail()
      See Also:
    • getExternalId

      public String getExternalId()
      See Also:
    • getDefaultCommunicationPreference

      public String getDefaultCommunicationPreference()
    • getAdditionalPhones

      public List<AdditionalPhone> getAdditionalPhones()
      See Also:
    • getAttributes

      public Map<String,Object> getAttributes()
      See Also:
    • getTaxId

      public String getTaxId()
      The tax id for this customer
    • getVatRegistrationId

      public String getVatRegistrationId()
      Optional VAT registration ID for this customer.
    • getDefaultPaymentAccountId

      @Deprecated public String getDefaultPaymentAccountId()
      Deprecated.
      since 1.7.2, in favor of using SavedPaymentMethod in PaymentTransactionServices to manage saved payment methods.
      See Also:
    • getSpecialType

      public String getSpecialType()
      See Also:
    • getTimestamp

      public Instant getTimestamp()
      Temporal state describing the time at which this item was last updated. Relates to the Temporal interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.
      Specified by:
      getTimestamp in interface com.broadleafcommerce.data.tracking.core.Temporal
      Returns:
      Temporal state describing the time at which this item was last updated
    • isActive

      public boolean isActive()
    • isLocked

      public boolean isLocked()
    • getDefaultAccountId

      public String getDefaultAccountId()
    • getTracking

      public com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking getTracking()
      Specified by:
      getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
    • setContextId

      public void setContextId(String contextId)
      Specified by:
      setContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
    • setFirstName

      public void setFirstName(String firstName)
      See Also:
    • setMiddleName

      public void setMiddleName(String middleName)
      See Also:
    • setLastName

      public void setLastName(String lastName)
      See Also:
    • setFullName

      public void setFullName(String fullName)
      See Also:
    • setUsername

      public void setUsername(String username)
      See Also:
    • setEmail

      public void setEmail(String email)
      See Also:
    • setExternalId

      public void setExternalId(String externalId)
      See Also:
    • setDefaultCommunicationPreference

      public void setDefaultCommunicationPreference(String defaultCommunicationPreference)
    • setAdditionalPhones

      public void setAdditionalPhones(List<AdditionalPhone> additionalPhones)
      See Also:
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      See Also:
    • setTaxId

      public void setTaxId(String taxId)
      The tax id for this customer
    • setVatRegistrationId

      public void setVatRegistrationId(String vatRegistrationId)
      Optional VAT registration ID for this customer.
    • setDefaultPaymentAccountId

      @Deprecated public void setDefaultPaymentAccountId(String defaultPaymentAccountId)
      Deprecated.
      since 1.7.2, in favor of using SavedPaymentMethod in PaymentTransactionServices to manage saved payment methods.
      See Also:
    • setSpecialType

      public void setSpecialType(String specialType)
      See Also:
    • setTimestamp

      public void setTimestamp(Instant timestamp)
      Temporal state describing the time at which this item was last updated. Relates to the Temporal interface and is primarily used during consumption of messages regarding changes in state to this domain. For example, a service consuming a change notification for this domain can compare the current persisted timestamp to this timestamp to determine if it already has a newer version, in which case, it can ignore. This is primarily a measure to ensure that ordering is not required for messages related to state change.
      Specified by:
      setTimestamp in interface com.broadleafcommerce.data.tracking.core.Temporal
      Parameters:
      timestamp - Temporal state describing the time at which this item was last updated
    • setActive

      public void setActive(boolean active)
    • setLocked

      public void setLocked(boolean locked)
    • setDefaultAccountId

      public void setDefaultAccountId(String defaultAccountId)
    • setTracking

      public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking tracking)
      Specified by:
      setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CustomerContextJpaTracking>
      Parameters:
      tracking - The tracking information for this customer.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object