Class JpaCatalog
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.jpa.tenant.domain.catalog.JpaCatalog
-
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
,com.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
,com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
,com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
,com.broadleafcommerce.data.tracking.core.Temporal
,com.broadleafcommerce.data.tracking.core.TenantTrackable<TenantJpaTracking>
,com.broadleafcommerce.data.tracking.core.Trackable
,com.broadleafcommerce.data.tracking.core.TypedTrackable<TenantJpaTracking>
,Serializable
@Entity public class JpaCatalog extends Object implements com.broadleafcommerce.data.tracking.core.TenantTrackable<TenantJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
Represents a catalog node in an overall catalog tree.Redundant domain that is originally maintained in the tenant service. This is redundant domain for microservices interested in tenant structure to perform local discrimination duties. This redundant domain is kept up-to-date via async streaming of changes from the tenant service. See
TenantPersistenceHandler
.- Author:
- Jeff Fischer
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JpaCatalog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
org.modelmapper.ModelMapper
fromMe()
Class<?>
getBusinessDomainType()
String
getContextId()
Currency
getDefaultCurrency()
Optional<String>
getDisplay()
Long
getLevel()
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes).Locale
getLocale()
String
getName()
The name for the catalogString
getOwningApplication()
Soft reference to the application contextId that owns this catalog.List<JpaCatalogRef>
getParents()
The parent nodes for this catalog, including additional mutability information.Instant
getTimestamp()
Temporal state describing the time at which this item was last updated.TenantJpaTracking
getTracking()
Retrieve the tracking information from the entityString
getVendorRef()
int
hashCode()
boolean
isHidden()
Whether or not this catalog is hidden from selection in the admin.void
setContextId(String contextId)
void
setDefaultCurrency(Currency defaultCurrency)
void
setHidden(boolean hidden)
Whether or not this catalog is hidden from selection in the admin.void
setLevel(Long level)
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes).void
setLocale(Locale locale)
void
setName(String name)
The name for the catalogvoid
setOwningApplication(String owningApplication)
Soft reference to the application contextId that owns this catalog.void
setParents(List<JpaCatalogRef> parents)
void
setTimestamp(Instant timestamp)
Temporal state describing the time at which this item was last updated.void
setTracking(TenantJpaTracking tracking)
Retrieve the tracking information from the entityvoid
setVendorRef(String vendorRef)
org.modelmapper.ModelMapper
toMe()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, postToMe, preFromMe, preToMe
-
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationState
-
-
-
-
Field Detail
-
PARENTS
public static final String PARENTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setParents
public void setParents(List<JpaCatalogRef> parents)
-
fromMe
@NonNull public org.modelmapper.ModelMapper fromMe()
- Specified by:
fromMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
@NonNull public org.modelmapper.ModelMapper toMe()
- Specified by:
toMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getBusinessDomainType
public Class<?> getBusinessDomainType()
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getDisplay
public Optional<String> getDisplay()
- Specified by:
getDisplay
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
-
getContextId
public String getContextId()
- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
-
getOwningApplication
public String getOwningApplication()
Soft reference to the application contextId that owns this catalog. This value can be null, in which case, this is a global catalog.- Returns:
- Soft reference to the application contextId that owns this catalog
-
getName
public String getName()
The name for the catalog- Specified by:
getName
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Returns:
- The name for the catalog
-
isHidden
public boolean isHidden()
Whether or not this catalog is hidden from selection in the admin.- Returns:
- Whether or not this catalog is hidden from selection in the admin
-
getLevel
public Long getLevel()
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes). This is primarily used for sorting in a given inheritance line.- Specified by:
getLevel
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Returns:
- The level for a catalog in the tree
-
getParents
public List<JpaCatalogRef> getParents()
The parent nodes for this catalog, including additional mutability information.- Returns:
- The parent nodes for this catalog
-
getTimestamp
public Instant getTimestamp()
Temporal state describing the time at which this item was last updated. Relates to theTemporal
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 interfacecom.broadleafcommerce.data.tracking.core.Temporal
- Returns:
- Temporal state describing the time at which this item was last updated
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- See Also:
Catalog.getLocale()
-
getDefaultCurrency
public Currency getDefaultCurrency()
- See Also:
Catalog.getDefaultCurrency()
-
getVendorRef
public String getVendorRef()
- See Also:
Catalog.getVendorRef()
-
getTracking
public TenantJpaTracking getTracking()
Retrieve the tracking information from the entity- Specified by:
getTracking
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Returns:
- Tracking information
-
setContextId
public void setContextId(String contextId)
- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
-
setOwningApplication
public void setOwningApplication(String owningApplication)
Soft reference to the application contextId that owns this catalog. This value can be null, in which case, this is a global catalog.- Parameters:
owningApplication
- Soft reference to the application contextId that owns this catalog
-
setName
public void setName(String name)
The name for the catalog- Specified by:
setName
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Parameters:
name
- The name for the catalog
-
setHidden
public void setHidden(boolean hidden)
Whether or not this catalog is hidden from selection in the admin.- Parameters:
hidden
- Whether or not this catalog is hidden from selection in the admin
-
setLevel
public void setLevel(Long level)
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes). This is primarily used for sorting in a given inheritance line.- Specified by:
setLevel
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Parameters:
level
- The level for a catalog in the tree
-
setTimestamp
public void setTimestamp(Instant timestamp)
Temporal state describing the time at which this item was last updated. Relates to theTemporal
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 interfacecom.broadleafcommerce.data.tracking.core.Temporal
- Parameters:
timestamp
- Temporal state describing the time at which this item was last updated
-
setLocale
public void setLocale(Locale locale)
- Specified by:
setLocale
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- See Also:
Catalog.getLocale()
-
setDefaultCurrency
public void setDefaultCurrency(Currency defaultCurrency)
- See Also:
Catalog.getDefaultCurrency()
-
setVendorRef
public void setVendorRef(String vendorRef)
- See Also:
Catalog.getVendorRef()
-
setTracking
public void setTracking(TenantJpaTracking tracking)
Retrieve the tracking information from the entity- Specified by:
setTracking
in interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<TenantJpaTracking>
- Parameters:
tracking
- Tracking information
-
canEqual
protected boolean canEqual(Object other)
-
-