java.lang.Object
com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenant
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Temporal, Serializable

@Entity public class JpaTenant extends Object implements com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, Serializable, com.broadleafcommerce.data.tracking.core.Temporal
Represents the distinct, completely independent operators within these services. Tenants share the same infrastructure, but should never share data.

For example, two companies might each have a tenant in one hosted Broadleaf instance, but their business is entirely isolated from each other.

This repository domain type specifically maps to the JAP repository domain.

See Also:
  • Constructor Details

    • JpaTenant

      public JpaTenant()
  • 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

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

      public String getId()
    • getName

      public String getName()
      See Also:
    • getIdentifierType

      public String getIdentifierType()
      See Also:
    • getIdentifierValue

      public String getIdentifierValue()
      See Also:
    • getDefaultLocale

      public Locale getDefaultLocale()
      See Also:
    • getAllowedLocales

      public List<Locale> getAllowedLocales()
      See Also:
    • getDefaultCurrency

      public Currency getDefaultCurrency()
      See Also:
    • getAllowedCurrencies

      public List<Currency> getAllowedCurrencies()
      See Also:
    • getLogoAsset

      public JpaTenantAsset getLogoAsset()
      See Also:
    • getAttributes

      public Map<String,Object> getAttributes()
      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
    • setId

      public void setId(String id)
    • setName

      public void setName(String name)
      See Also:
    • setIdentifierType

      public void setIdentifierType(String identifierType)
      See Also:
    • setIdentifierValue

      public void setIdentifierValue(String identifierValue)
      See Also:
    • setDefaultLocale

      public void setDefaultLocale(Locale defaultLocale)
      See Also:
    • setAllowedLocales

      public void setAllowedLocales(List<Locale> allowedLocales)
      See Also:
    • setDefaultCurrency

      public void setDefaultCurrency(Currency defaultCurrency)
      See Also:
    • setAllowedCurrencies

      public void setAllowedCurrencies(List<Currency> allowedCurrencies)
      See Also:
    • setLogoAsset

      public void setLogoAsset(JpaTenantAsset logoAsset)
      See Also:
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      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
    • 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