Class Catalog
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog
-
- All Implemented Interfaces:
ContextStateAware
public class Catalog extends Object implements ContextStateAware
Represents a catalog node in an overall catalog tree.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description Catalog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
ContextState
getContextState()
A subset ofTracking
information to expose the context state for this object.Currency
getDefaultCurrency()
DefaultCurrency
associated with this catalog, or null.Boolean
getHidden()
Whether or not this catalog is hidden from selection in the admin.String
getId()
The context id, which is a separate identifier from the database primary key.Long
getLevel()
The level for a catalog in the tree going from least (root nodes) to highest (leaf nodes).Locale
getLocale()
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.String
getName()
The name for the catalogString
getOwningApplication()
Soft reference to the application contextId that owns this catalog.List<CatalogRef>
getParents()
The parent nodes for this catalog, including additional mutability information.String
getVendorRef()
Soft reference to the vendor associated with this catalog.int
hashCode()
void
setContextState(ContextState contextState)
A subset ofTracking
information to expose the context state for this object.void
setDefaultCurrency(Currency defaultCurrency)
DefaultCurrency
associated with this catalog, or null.void
setHidden(Boolean hidden)
Whether or not this catalog is hidden from selection in the admin.void
setId(String id)
The context id, which is a separate identifier from the database primary key.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)
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.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<CatalogRef> parents)
The parent nodes for this catalog, including additional mutability information.void
setVendorRef(String vendorRef)
Soft reference to the vendor associated with this catalog.String
toString()
-
-
-
Method Detail
-
getId
public String getId()
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicitly provided upon entity creation.- Returns:
- Separate identifier from the database primary key
-
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- Returns:
- The name for the catalog
-
getHidden
public Boolean getHidden()
Whether or not this catalog is hidden from selection in the admin. This also indicates the catalog is not available for mutation via theowningApplication
. Note that mutability of a catalog assigned to an application (seeApplicationCatalogRef.getId()
) is controlled via the properties onApplicationCatalogRef
.- Returns:
- Whether or not this catalog is hidden from selection in the admin
-
getParents
public List<CatalogRef> getParents()
The parent nodes for this catalog, including additional mutability information.- Returns:
- The parent nodes for this catalog
-
getLocale
public Locale getLocale()
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.- Returns:
- the
Locale
for all of the items contained within
-
getDefaultCurrency
public Currency getDefaultCurrency()
DefaultCurrency
associated with this catalog, or null.- Returns:
- the default currency associated with this catalog or null
-
getVendorRef
public String getVendorRef()
Soft reference to the vendor associated with this catalog. This value can be null, in which case, no vendor is associated.- Returns:
- Soft reference to the vendor associated with this catalog.
-
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.This value is solely maintained on the server and is not intended to be communicated or updated via the API.
- Returns:
- The level for a catalog in the tree
-
getContextState
public ContextState getContextState()
A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfaceContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setId
public void setId(String id)
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicitly provided upon entity creation.- Parameters:
id
- Separate identifier from the database primary key
-
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- 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. This also indicates the catalog is not available for mutation via theowningApplication
. Note that mutability of a catalog assigned to an application (seeApplicationCatalogRef.getId()
) is controlled via the properties onApplicationCatalogRef
.- Parameters:
hidden
- Whether or not this catalog is hidden from selection in the admin
-
setParents
public void setParents(List<CatalogRef> parents)
The parent nodes for this catalog, including additional mutability information.- Parameters:
parents
- The parent nodes for this catalog
-
setLocale
public void setLocale(Locale locale)
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.- Parameters:
locale
- theLocale
that all items within this catalog applies to
-
setDefaultCurrency
public void setDefaultCurrency(Currency defaultCurrency)
DefaultCurrency
associated with this catalog, or null.- Parameters:
the
- default currency associated with this catalog
-
setVendorRef
public void setVendorRef(String vendorRef)
Soft reference to the vendor associated with this catalog. This value can be null, in which case, no vendor is associated.- Parameters:
vendorRef
- Soft reference to the vendor associated with this catalog.
-
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.This value is solely maintained on the server and is not intended to be communicated or updated via the API.
- Parameters:
level
- The level for a catalog in the tree
-
setContextState
public void setContextState(ContextState contextState)
A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfaceContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-