@Entity public class CategoryImpl extends java.lang.Object implements Category, Status, AdminMainEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
CategoryImpl.Presentation |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Date |
activeEndDate |
protected java.util.Date |
activeStartDate |
protected java.util.List<CategoryXref> |
allChildCategoryXrefs |
protected java.util.List<Category> |
allLegacyChildCategories |
protected java.util.List<CategoryXref> |
allParentCategoryXrefs |
protected java.util.List<CategoryProductXref> |
allProductXrefs |
protected ArchiveStatus |
archiveStatus |
protected java.util.List<CategoryAttribute> |
categoryAttributes |
protected java.util.Map<java.lang.String,java.lang.String> |
categoryImages
Deprecated.
|
protected java.util.Map<java.lang.String,Media> |
categoryMedia |
protected java.util.List<java.lang.Long> |
childCategoryIds |
protected java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
childCategoryURLMap
Deprecated.
|
protected java.util.List<CategoryXref> |
childCategoryXrefs |
protected java.util.List<RelatedProduct> |
crossSaleProducts |
protected Category |
defaultParentCategory |
protected java.lang.String |
description |
protected java.lang.String |
displayTemplate |
protected java.util.List<SearchFacet> |
excludedSearchFacets |
protected static java.util.Comparator<CategorySearchFacet> |
facetPositionComparator |
protected java.util.List<FeaturedProduct> |
featuredProducts |
protected java.util.List<RelatedProduct> |
filteredCrossSales |
protected java.util.List<FeaturedProduct> |
filteredFeaturedProducts |
protected java.util.List<RelatedProduct> |
filteredUpSales |
protected java.lang.String |
fulfillmentType |
protected java.lang.Long |
id |
protected java.lang.String |
inventoryType |
protected java.util.List<Category> |
legacyChildCategories |
protected java.lang.String |
longDescription |
protected java.lang.String |
name |
protected java.util.List<CategorySearchFacet> |
searchFacets |
protected java.lang.String |
taxCode |
protected java.util.List<RelatedProduct> |
upSaleProducts |
protected java.lang.String |
url |
protected java.lang.String |
urlKey |
MAIN_ENTITY_NAME_PROPERTY| Constructor and Description |
|---|
CategoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Category> |
buildCategoryHierarchy(java.util.List<Category> currentHierarchy)
Build category hierarchy by walking the default category tree up to the root category.
|
java.util.List<Category> |
buildFullCategoryHierarchy(java.util.List<Category> currentHierarchy)
Build the full category hierarchy by walking up the default category tree and the all parent
category tree.
|
java.util.List<java.lang.Long> |
createChildCategoryIds() |
java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
createChildCategoryURLMap() |
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getActiveEndDate()
Gets the active end date.
|
java.util.List<Product> |
getActiveProducts()
Deprecated.
|
java.util.List<CategoryProductXref> |
getActiveProductXrefs() |
java.util.Date |
getActiveStartDate()
Gets the active start date.
|
java.util.List<Category> |
getAllChildCategories()
Deprecated.
|
java.util.List<CategoryXref> |
getAllChildCategoryXrefs() |
java.util.List<Category> |
getAllParentCategories()
Deprecated.
|
java.util.List<CategoryXref> |
getAllParentCategoryXrefs() |
java.util.List<Product> |
getAllProducts()
Deprecated.
|
java.util.List<CategoryProductXref> |
getAllProductXrefs() |
java.lang.Character |
getArchived() |
CategoryAttribute |
getCategoryAttributeByName(java.lang.String name)
Convenience method to get a
CategoryAttribute by name |
java.util.List<CategoryAttribute> |
getCategoryAttributes()
Gets the attributes for this
Category. |
java.lang.String |
getCategoryImage(java.lang.String imageKey)
Deprecated.
|
java.util.Map<java.lang.String,java.lang.String> |
getCategoryImages()
Deprecated.
|
java.util.Map<java.lang.String,Media> |
getCategoryMedia()
Gets the category media map.
|
java.util.List<Category> |
getChildCategories()
Deprecated.
|
java.util.List<java.lang.Long> |
getChildCategoryIds()
Gets the child category ids.
|
java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
getChildCategoryURLMap()
Deprecated.
|
java.util.List<CategoryXref> |
getChildCategoryXrefs() |
java.util.List<RelatedProduct> |
getCrossSaleProducts()
Returns a list of cross sale products that are related to this category.
|
java.util.List<RelatedProduct> |
getCumulativeCrossSaleProducts()
Returns a list of the cross sale products in this category as well as
all cross sale products in all parent categories of this category.
|
java.util.List<FeaturedProduct> |
getCumulativeFeaturedProducts()
Returns a list of the featured products in this category as well as
all featured products in all parent categories of this category.
|
java.util.List<CategorySearchFacet> |
getCumulativeSearchFacets()
Returns a list of CategorySearchFacets that takes into consideration the search facets for this Category,
the search facets for all parent categories, and the search facets that should be excluded from this
Category.
|
java.util.List<RelatedProduct> |
getCumulativeUpSaleProducts()
Returns a list of the upsale products in this category as well as
all upsale products in all parent categories of this category.
|
Category |
getDefaultParentCategory()
Gets the default parent category.
|
java.lang.String |
getDescription()
Gets the description.
|
java.lang.String |
getDisplayTemplate()
Gets the display template.
|
java.util.List<SearchFacet> |
getExcludedSearchFacets()
Gets the excluded SearchFacets
|
java.util.List<FeaturedProduct> |
getFeaturedProducts()
Gets the featured products.
|
FulfillmentType |
getFulfillmentType()
Returns the default fulfillment type for skus in this category.
|
java.lang.String |
getGeneratedUrl()
Creates the SEO url starting from this category and recursing up the
hierarchy of default parent categories until the topmost category is
reached.
|
java.lang.Long |
getId()
Gets the primary key.
|
InventoryType |
getInventoryType()
Returns the type of inventory for this category
|
java.lang.String |
getLongDescription()
Gets the long description.
|
java.lang.String |
getMainEntityName() |
java.util.Map<java.lang.String,CategoryAttribute> |
getMappedCategoryAttributes()
Convenience method to return the
CategoryAttributes for the Category in an easily-consumable
form |
java.lang.String |
getName()
Gets the name.
|
java.util.List<CategorySearchFacet> |
getSearchFacets()
Returns all of the SearchFacets that are directly associated with this Category
|
java.lang.String |
getTaxCode()
Returns the tax code of this category.
|
java.util.List<RelatedProduct> |
getUpSaleProducts()
Returns a list of cross sale products that are related to this category.
|
java.lang.String |
getUrl()
Gets the url.
|
java.lang.String |
getUrlKey()
Gets the url key.
|
boolean |
hasAllChildCategories()
Checks for child categories.
|
boolean |
hasChildCategories()
Checks for child categories.
|
int |
hashCode() |
boolean |
isActive()
Checks if is active.
|
void |
setActiveEndDate(java.util.Date activeEndDate)
Sets the active end date.
|
void |
setActiveStartDate(java.util.Date activeStartDate)
Sets the active start date.
|
void |
setAllChildCategories(java.util.List<Category> childCategories)
Deprecated.
|
void |
setAllChildCategoryXrefs(java.util.List<CategoryXref> childCategories) |
void |
setAllParentCategories(java.util.List<Category> allParentCategories)
Deprecated.
|
void |
setAllParentCategoryXrefs(java.util.List<CategoryXref> allParentCategories) |
void |
setAllProducts(java.util.List<Product> allProducts)
Deprecated.
|
void |
setAllProductXrefs(java.util.List<CategoryProductXref> allProducts) |
void |
setArchived(java.lang.Character archived) |
void |
setCategoryAttributes(java.util.List<CategoryAttribute> categoryAttributes)
Sets the attributes for this
Category. |
void |
setCategoryImages(java.util.Map<java.lang.String,java.lang.String> categoryImages)
Deprecated.
|
void |
setCategoryMedia(java.util.Map<java.lang.String,Media> categoryMedia)
Sets the category media.
|
void |
setChildCategories(java.util.List<Category> childCategories)
Deprecated.
|
void |
setChildCategoryIds(java.util.List<java.lang.Long> childCategoryIds)
Sets the all child category ids.
|
void |
setChildCategoryURLMap(java.util.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap)
Deprecated.
|
void |
setChildCategoryXrefs(java.util.List<CategoryXref> childCategories) |
void |
setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
Sets the cross sale products that are related to this category.
|
void |
setDefaultParentCategory(Category defaultParentCategory)
Sets the default parent category.
|
void |
setDescription(java.lang.String description)
Sets the description.
|
void |
setDisplayTemplate(java.lang.String displayTemplate)
Sets the display template.
|
void |
setExcludedSearchFacets(java.util.List<SearchFacet> excludedSearchFacets)
Sets the SearchFacets that should not be rendered by this Category.
|
void |
setFeaturedProducts(java.util.List<FeaturedProduct> featuredProducts)
Sets the featured products.
|
void |
setFulfillmentType(FulfillmentType fulfillmentType)
Sets the default fulfillment type for skus in this category.
|
void |
setId(java.lang.Long id)
Sets the primary key.
|
void |
setInventoryType(InventoryType inventoryType)
Sets the type of inventory for this category
|
void |
setLongDescription(java.lang.String longDescription)
Sets the long description.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setSearchFacets(java.util.List<CategorySearchFacet> searchFacets)
Sets the SearchFacets that are directly associated with this Category
|
void |
setTaxCode(java.lang.String taxCode)
Sets the tax code of this category.
|
void |
setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
Sets the upsale products that are related to this category.
|
void |
setUrl(java.lang.String url)
Sets the url.
|
void |
setUrlKey(java.lang.String urlKey)
Sets the url key.
|
protected java.lang.Long id
protected java.lang.String name
protected java.lang.String url
protected java.lang.String urlKey
protected java.lang.String description
protected java.lang.String taxCode
protected java.util.Date activeStartDate
protected java.util.Date activeEndDate
protected java.lang.String displayTemplate
protected java.lang.String longDescription
protected Category defaultParentCategory
protected java.util.List<CategoryXref> allChildCategoryXrefs
protected java.util.List<CategoryXref> allParentCategoryXrefs
protected java.util.List<CategoryProductXref> allProductXrefs
@Deprecated protected java.util.Map<java.lang.String,java.lang.String> categoryImages
protected java.util.Map<java.lang.String,Media> categoryMedia
protected java.util.List<FeaturedProduct> featuredProducts
protected java.util.List<RelatedProduct> crossSaleProducts
protected java.util.List<RelatedProduct> upSaleProducts
protected java.util.List<CategorySearchFacet> searchFacets
protected java.util.List<SearchFacet> excludedSearchFacets
protected java.util.List<CategoryAttribute> categoryAttributes
protected java.lang.String inventoryType
protected java.lang.String fulfillmentType
protected ArchiveStatus archiveStatus
@Deprecated protected java.util.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap
protected java.util.List<java.lang.Long> childCategoryIds
protected java.util.List<CategoryXref> childCategoryXrefs
protected java.util.List<Category> legacyChildCategories
protected java.util.List<Category> allLegacyChildCategories
protected java.util.List<FeaturedProduct> filteredFeaturedProducts
protected java.util.List<RelatedProduct> filteredCrossSales
protected java.util.List<RelatedProduct> filteredUpSales
protected static java.util.Comparator<CategorySearchFacet> facetPositionComparator
public java.lang.Long getId()
Categorypublic void setId(java.lang.Long id)
Categorypublic java.lang.String getName()
Categorypublic void setName(java.lang.String name)
Categorypublic java.lang.String getUrl()
Category"redirect:"+currentCategory.getUrl();
from a controller.public void setUrl(java.lang.String url)
Category"redirect:"+currentCategory.getUrl();
from a controller.public java.lang.String getUrlKey()
Categorypublic java.lang.String getGeneratedUrl()
CategorygetGeneratedUrl in interface Categorypublic void setUrlKey(java.lang.String urlKey)
Categorypublic java.lang.String getDescription()
CategorygetDescription in interface Categorypublic void setDescription(java.lang.String description)
CategorysetDescription in interface Categorydescription - the new descriptionpublic java.util.Date getActiveStartDate()
CategorygetActiveStartDate in interface Categorypublic void setActiveStartDate(java.util.Date activeStartDate)
CategorysetActiveStartDate in interface CategoryactiveStartDate - the new active start datepublic java.util.Date getActiveEndDate()
CategorygetActiveEndDate in interface Categorypublic void setActiveEndDate(java.util.Date activeEndDate)
CategorysetActiveEndDate in interface CategoryactiveEndDate - the new active end datepublic boolean isActive()
Categorypublic java.lang.String getDisplayTemplate()
Categoryview = categoryTemplatePrefix + currentCategory.getDisplayTemplate();getDisplayTemplate in interface Categorypublic void setDisplayTemplate(java.lang.String displayTemplate)
Categoryview = categoryTemplatePrefix + currentCategory.getDisplayTemplate();setDisplayTemplate in interface CategorydisplayTemplate - the new display templatepublic java.lang.String getLongDescription()
CategorygetLongDescription in interface Categorypublic void setLongDescription(java.lang.String longDescription)
CategorysetLongDescription in interface CategorylongDescription - the new long descriptionpublic Category getDefaultParentCategory()
CategorygetDefaultParentCategory in interface Categorypublic void setDefaultParentCategory(Category defaultParentCategory)
CategorysetDefaultParentCategory in interface CategorydefaultParentCategory - the new default parent categorypublic java.util.List<CategoryXref> getAllChildCategoryXrefs()
getAllChildCategoryXrefs in interface Categorypublic java.util.List<CategoryXref> getChildCategoryXrefs()
getChildCategoryXrefs in interface Categorypublic void setChildCategoryXrefs(java.util.List<CategoryXref> childCategories)
setChildCategoryXrefs in interface Categorypublic void setAllChildCategoryXrefs(java.util.List<CategoryXref> childCategories)
setAllChildCategoryXrefs in interface Category@Deprecated public java.util.List<Category> getAllChildCategories()
CategorygetAllChildCategories in interface Categorypublic boolean hasAllChildCategories()
CategoryhasAllChildCategories in interface Category@Deprecated public void setAllChildCategories(java.util.List<Category> childCategories)
CategorysetAllChildCategories in interface CategorychildCategories - the list of child categories@Deprecated public java.util.List<Category> getChildCategories()
CategorygetChildCategories in interface Categorypublic boolean hasChildCategories()
CategoryhasChildCategories in interface Category@Deprecated public void setChildCategories(java.util.List<Category> childCategories)
CategorysetChildCategories in interface CategorychildCategories - the list of active child categories.public java.util.List<java.lang.Long> getChildCategoryIds()
CategorygetChildCategoryIds in interface Categorypublic void setChildCategoryIds(java.util.List<java.lang.Long> childCategoryIds)
CategorysetChildCategoryIds in interface CategorychildCategoryIds - the list of active child category ids.public java.util.List<java.lang.Long> createChildCategoryIds()
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getCategoryImages()
CategorygetCategoryImages in interface Category@Deprecated public java.lang.String getCategoryImage(java.lang.String imageKey)
CategorygetCategoryImage in interface CategoryimageKey - the image key@Deprecated public void setCategoryImages(java.util.Map<java.lang.String,java.lang.String> categoryImages)
CategorysetCategoryImages in interface CategorycategoryImages - the category images@Deprecated public java.util.Map<java.lang.String,java.util.List<java.lang.Long>> getChildCategoryURLMap()
CategoryCategory.getGeneratedUrl() values
for this category and all of its child categories. By calling get on this map using the
generated url for a given category, you will receive the list of immediate child categories.
This is inefficient, so its use is highly discouraged.getChildCategoryURLMap in interface Categorypublic java.util.Map<java.lang.String,java.util.List<java.lang.Long>> createChildCategoryURLMap()
@Deprecated public void setChildCategoryURLMap(java.util.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap)
CategorysetChildCategoryURLMap in interface Categorypublic java.util.List<Category> buildFullCategoryHierarchy(java.util.List<Category> currentHierarchy)
CategorybuildFullCategoryHierarchy in interface Categorypublic java.util.List<Category> buildCategoryHierarchy(java.util.List<Category> currentHierarchy)
CategorybuildCategoryHierarchy in interface Categorypublic java.util.List<CategoryXref> getAllParentCategoryXrefs()
getAllParentCategoryXrefs in interface Categorypublic void setAllParentCategoryXrefs(java.util.List<CategoryXref> allParentCategories)
setAllParentCategoryXrefs in interface Category@Deprecated public java.util.List<Category> getAllParentCategories()
CategorygetAllParentCategories in interface Category@Deprecated public void setAllParentCategories(java.util.List<Category> allParentCategories)
CategorysetAllParentCategories in interface CategoryallParentCategories - the list of parent categoriespublic java.util.List<FeaturedProduct> getFeaturedProducts()
CategorygetFeaturedProducts in interface Categorypublic void setFeaturedProducts(java.util.List<FeaturedProduct> featuredProducts)
CategorysetFeaturedProducts in interface CategoryfeaturedProducts - the featured productspublic java.util.List<RelatedProduct> getCrossSaleProducts()
CategorygetCrossSaleProducts in interface Categorypublic void setCrossSaleProducts(java.util.List<RelatedProduct> crossSaleProducts)
CategorysetCrossSaleProducts in interface CategoryCategory.getCrossSaleProducts()public java.util.List<RelatedProduct> getUpSaleProducts()
CategorygetUpSaleProducts in interface Categorypublic java.util.List<RelatedProduct> getCumulativeCrossSaleProducts()
CategorygetCumulativeCrossSaleProducts in interface Categorypublic java.util.List<RelatedProduct> getCumulativeUpSaleProducts()
CategorygetCumulativeUpSaleProducts in interface Categorypublic java.util.List<FeaturedProduct> getCumulativeFeaturedProducts()
CategorygetCumulativeFeaturedProducts in interface Categorypublic void setUpSaleProducts(java.util.List<RelatedProduct> upSaleProducts)
CategorysetUpSaleProducts in interface CategoryCategory.getUpSaleProducts()public java.util.List<CategoryProductXref> getActiveProductXrefs()
getActiveProductXrefs in interface Categorypublic java.util.List<CategoryProductXref> getAllProductXrefs()
getAllProductXrefs in interface Categorypublic void setAllProductXrefs(java.util.List<CategoryProductXref> allProducts)
setAllProductXrefs in interface Category@Deprecated public java.util.List<Product> getActiveProducts()
CategoryCategory's Products filtered by
active. If you want all of the Products (whether inactive or not) consider using
Category.getAllProducts().getActiveProducts in interface CategoryProducts for this CategoryProduct#isActive()}@Deprecated public java.util.List<Product> getAllProducts()
CategoryProduct instances associated with this
category.
Products are active or not. If
you need this functionality, use Category.getActiveProducts()getAllProducts in interface Category@Deprecated public void setAllProducts(java.util.List<Product> allProducts)
CategoryProduct instances associated with this
category.setAllProducts in interface CategoryallProducts - the list of products to associate with this categorypublic java.util.List<CategorySearchFacet> getSearchFacets()
CategorygetSearchFacets in interface Categorypublic void setSearchFacets(java.util.List<CategorySearchFacet> searchFacets)
CategorysetSearchFacets in interface Categorypublic java.util.List<SearchFacet> getExcludedSearchFacets()
CategorygetExcludedSearchFacets in interface Categorypublic void setExcludedSearchFacets(java.util.List<SearchFacet> excludedSearchFacets)
CategorysetExcludedSearchFacets in interface Categorypublic InventoryType getInventoryType()
CategorygetInventoryType in interface CategoryInventoryType for this categorypublic void setInventoryType(InventoryType inventoryType)
CategorysetInventoryType in interface CategoryinventoryType - the InventoryType for this categorypublic FulfillmentType getFulfillmentType()
CategorygetFulfillmentType in interface Categorypublic void setFulfillmentType(FulfillmentType fulfillmentType)
CategorysetFulfillmentType in interface Categorypublic java.util.List<CategorySearchFacet> getCumulativeSearchFacets()
CategoryCategorySearchFacet#getPosition()
method for each category level. That is, the facets on this Category will be ordered by their position
relative to each other with the ordered parent facets after that, etc.getCumulativeSearchFacets in interface Categorypublic java.util.Map<java.lang.String,Media> getCategoryMedia()
CategoryMedia instance stores information about the
media itself (image url, etc...)getCategoryMedia in interface Categorypublic void setCategoryMedia(java.util.Map<java.lang.String,Media> categoryMedia)
CategoryMedia instance stores information about the
media itself (image url, etc...)setCategoryMedia in interface CategorycategoryMedia - the category mediapublic java.util.List<CategoryAttribute> getCategoryAttributes()
CategoryCategory. In smaller sites, using these attributes might be preferred to
extending the domain object itself.getCategoryAttributes in interface Category#getMappedCategoryAttributes()}public void setCategoryAttributes(java.util.List<CategoryAttribute> categoryAttributes)
CategoryCategory. In smaller sites, using these attributes might be preferred to
extending the domain object and creating a new table to store custom properties.setCategoryAttributes in interface Categorypublic CategoryAttribute getCategoryAttributeByName(java.lang.String name)
CategoryCategoryAttribute by namegetCategoryAttributeByName in interface Category#getCategoryAttributes()}, {@link #getMappedCategoryAttributes()}public java.util.Map<java.lang.String,CategoryAttribute> getMappedCategoryAttributes()
CategoryCategoryAttributes for the Category in an easily-consumable
formgetMappedCategoryAttributes in interface Categorypublic java.lang.Character getArchived()
getArchived in interface Statuspublic void setArchived(java.lang.Character archived)
setArchived in interface Statuspublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String getMainEntityName()
getMainEntityName in interface AdminMainEntitypublic java.lang.String getTaxCode()
CategorygetTaxCode in interface Categorypublic void setTaxCode(java.lang.String taxCode)
CategorysetTaxCode in interface CategoryCopyright © 2018. All Rights Reserved.