Class 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:
    Serialized Form
    • Constructor Detail

      • JpaCustomer

        public JpaCustomer()
    • Method Detail

      • 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
      • getContextId

        public String getContextId()
        Specified by:
        getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      • 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()
      • 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
      • 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)
      • 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.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object