Class JpaTenantCatalog
java.lang.Object
com.broadleafcommerce.tenant.provider.jpa.domain.JpaTenantCatalog
- 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<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>
,com.broadleafcommerce.data.tracking.core.Trackable
,com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>
,com.broadleafcommerce.translation.domain.Translatable
,Serializable
@Entity
@PolicyVariance(TENANT_TRACKABLE_APP_CONTEXT)
public class JpaTenantCatalog
extends Object
implements com.broadleafcommerce.data.tracking.core.TenantTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.Temporal, com.broadleafcommerce.translation.domain.Translatable
Represents a catalog node in an overall catalog tree.
This repository domain type specifically maps to the JPA repository domain.
As a Trackable, this entity is also aware of archival state. If archived
(Tracking.getArchived()
), a Sandbox entity will not be returned by fetch queries.
As a Trackable, this entity is aware of change audit information and will keep track of changes
made during creation or updates in the Tracking.getChangeDetails()
field. ChangeDetails
are not permanent on this entity and will be moved to a permanent audit store on an async
interval.
- Author:
- Jeff Fischer
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
org.modelmapper.ModelMapper
fromMe()
Class<?>
getLevel()
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes).getName()
The name for the catalogSoft reference to the application contextId that owns this catalog.The parent nodes for this catalog, including additional mutability information.Temporal state describing the time at which this item was last updated.com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking
Retrieve the tracking information from the entitygetType()
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
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes).void
void
The name for the catalogvoid
setOwningApplication
(String owningApplication) Soft reference to the application contextId that owns this catalog.void
setParents
(List<JpaTenantCatalogRef> parents) void
setTimestamp
(Instant timestamp) Temporal state describing the time at which this item was last updated.void
setTracking
(com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking tracking) Retrieve the tracking information from the entityvoid
void
setVendorRef
(String vendorRef) org.modelmapper.ModelMapper
toMe()
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
Methods inherited from interface com.broadleafcommerce.data.tracking.core.Trackable
getNotificationStates, getNotificationStates, setNotificationStates
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TypedTrackable
setTracking
-
Field Details
-
PARENTS
- See Also:
-
-
Constructor Details
-
JpaTenantCatalog
public JpaTenantCatalog()
-
-
Method Details
-
setParents
-
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
- Specified by:
getBusinessDomainType
in interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getDisplay
- Specified by:
getDisplay
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
-
getContextId
- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Specified by:
getContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Specified by:
getContextId
in interfacecom.broadleafcommerce.translation.domain.Translatable
-
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
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
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. This is a calculated field.- Specified by:
getLevel
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Returns:
- The level for a catalog in the tree
-
getParents
The parent nodes for this catalog, including additional mutability information.- Returns:
- The parent nodes for this catalog
-
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
- Specified by:
getLocale
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- See Also:
-
getDefaultCurrency
- See Also:
-
getVendorRef
- See Also:
-
getType
- See Also:
-
getTracking
public com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking getTracking()Retrieve the tracking information from the entity- Specified by:
getTracking
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
- Returns:
- Tracking information
-
setContextId
- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Specified by:
setContextId
in interfacecom.broadleafcommerce.data.tracking.core.Trackable
-
setOwningApplication
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
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
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. This is a calculated field.- Specified by:
setLevel
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- Parameters:
level
- The level for a catalog in the tree
-
setTimestamp
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
- Specified by:
setLocale
in interfacecom.broadleafcommerce.data.tracking.core.filtering.domain.CatalogBasicInfo
- See Also:
-
setDefaultCurrency
- See Also:
-
setVendorRef
- See Also:
-
setType
- See Also:
-
setTracking
public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking tracking) Retrieve the tracking information from the entity- Specified by:
setTracking
in interfacecom.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.TenantJpaTracking>
- Parameters:
tracking
- Tracking information
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-