|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.catalog.domain.CategoryImpl
@Entity public class CategoryImpl
| Field Summary | |
|---|---|
protected java.util.Date |
activeEndDate
|
protected java.util.Date |
activeStartDate
|
protected java.util.List<Category> |
allChildCategories
|
protected java.util.List<Category> |
allParentCategories
|
protected java.util.List<Product> |
allProducts
|
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<Category> |
childCategories
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
childCategoryURLMap
|
protected Category |
defaultParentCategory
|
protected java.lang.String |
description
|
protected java.lang.String |
displayTemplate
|
protected java.util.List<FeaturedProduct> |
featuredProducts
|
protected java.lang.Long |
id
|
protected java.lang.String |
longDescription
|
protected java.lang.String |
name
|
protected java.lang.String |
url
|
protected java.lang.String |
urlKey
|
| Constructor Summary | |
|---|---|
CategoryImpl()
|
|
| Method Summary | |
|---|---|
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.Date |
getActiveStartDate()
Gets the active start date. |
java.util.List<Category> |
getAllChildCategories()
Gets the child categories. |
java.util.List<Category> |
getAllParentCategories()
Retrieve all parent categories |
java.util.List<Product> |
getAllProducts()
Retrieve all the Product instances associated with 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()
Gets the child categories. |
java.util.Map<java.lang.String,java.util.List<java.lang.Long>> |
getChildCategoryURLMap()
Gets the child category url map. |
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<FeaturedProduct> |
getFeaturedProducts()
Gets the featured products. |
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. |
java.lang.String |
getLongDescription()
Gets the long description. |
java.lang.String |
getName()
Gets the name. |
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)
Sets the list of child categories (active and inactive) |
void |
setAllParentCategories(java.util.List<Category> allParentCategories)
Sets the list of parent categories |
void |
setAllProducts(java.util.List<Product> allProducts)
Set all the Product instances associated with 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)
Sets the all child categories. |
void |
setChildCategoryURLMap(java.util.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap)
Included to support the HydratedCacheJPAListener |
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 |
setFeaturedProducts(java.util.List<FeaturedProduct> featuredProducts)
Sets the featured products. |
void |
setId(java.lang.Long id)
Sets the primary key. |
void |
setLongDescription(java.lang.String longDescription)
Sets the long description. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setUrl(java.lang.String url)
Sets the url. |
void |
setUrlKey(java.lang.String urlKey)
Sets the url key. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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.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<Category> allChildCategories
protected java.util.List<Category> allParentCategories
protected java.util.List<Product> allProducts
@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.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap
protected java.util.List<Category> childCategories
| Constructor Detail |
|---|
public CategoryImpl()
| Method Detail |
|---|
public java.lang.Long getId()
Category
getId in interface Categorypublic void setId(java.lang.Long id)
Category
setId in interface Categoryid - the new primary keypublic java.lang.String getName()
Category
getName in interface Categorypublic void setName(java.lang.String name)
Category
setName in interface Categoryname - the new namepublic java.lang.String getUrl()
Category"redirect:"+currentCategory.getUrl();
from a controller.
getUrl in interface Categorypublic void setUrl(java.lang.String url)
Category"redirect:"+currentCategory.getUrl();
from a controller.
setUrl in interface Categoryurl - the new url for the presentation layer component for this categorypublic java.lang.String getUrlKey()
Category
getUrlKey in interface Categorypublic java.lang.String getGeneratedUrl()
Category
getGeneratedUrl in interface Categorypublic void setUrlKey(java.lang.String urlKey)
Category
setUrlKey in interface CategoryurlKey - the new url key for this category to appear in the SEO urlpublic java.lang.String getDescription()
Category
getDescription in interface Categorypublic void setDescription(java.lang.String description)
Category
setDescription in interface Categorydescription - the new descriptionpublic java.util.Date getActiveStartDate()
Category
getActiveStartDate in interface Categorypublic void setActiveStartDate(java.util.Date activeStartDate)
Category
setActiveStartDate in interface CategoryactiveStartDate - the new active start datepublic java.util.Date getActiveEndDate()
Category
getActiveEndDate in interface Categorypublic void setActiveEndDate(java.util.Date activeEndDate)
Category
setActiveEndDate in interface CategoryactiveEndDate - the new active end datepublic boolean isActive()
Category
isActive in interface 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()
Category
getLongDescription in interface Categorypublic void setLongDescription(java.lang.String longDescription)
Category
setLongDescription in interface CategorylongDescription - the new long descriptionpublic Category getDefaultParentCategory()
Category
getDefaultParentCategory in interface Categorypublic void setDefaultParentCategory(Category defaultParentCategory)
Category
setDefaultParentCategory in interface CategorydefaultParentCategory - the new default parent categorypublic java.util.List<Category> getAllChildCategories()
Category
getAllChildCategories in interface Categorypublic boolean hasAllChildCategories()
Category
hasAllChildCategories in interface Categorypublic void setAllChildCategories(java.util.List<Category> childCategories)
Category
setAllChildCategories in interface CategorychildCategories - the list of child categoriespublic java.util.List<Category> getChildCategories()
Category
getChildCategories in interface Categorypublic boolean hasChildCategories()
Category
hasChildCategories in interface Categorypublic void setChildCategories(java.util.List<Category> childCategories)
Category
setChildCategories in interface CategorychildCategories - the list of active child categories.@Deprecated public java.util.Map<java.lang.String,java.lang.String> getCategoryImages()
Category
getCategoryImages in interface Category@Deprecated public java.lang.String getCategoryImage(java.lang.String imageKey)
Category
getCategoryImage in interface CategoryimageKey - the image key
@Deprecated public void setCategoryImages(java.util.Map<java.lang.String,java.lang.String> categoryImages)
Category
setCategoryImages in interface CategorycategoryImages - the category imagespublic 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 lifecycle for this map is maintained via the HydratedCacheJPAListener. This listener
keeps this map in a separate cache from the normal Hibernate level 2 cache, but will honor
cache region settings for this entity, resulting in this map being evicted from its cache
when this entity is removed from the Hibernate level 2 cache.
getChildCategoryURLMap in interface CategoryHydratedSetuppublic java.util.Map<java.lang.String,java.util.List<java.lang.Long>> createChildCategoryURLMap()
public void setChildCategoryURLMap(java.util.Map<java.lang.String,java.util.List<java.lang.Long>> childCategoryURLMap)
CategoryHydratedCacheJPAListener
setChildCategoryURLMap in interface CategoryHydratedSetuppublic java.util.List<Category> getAllParentCategories()
Category
getAllParentCategories in interface Categorypublic void setAllParentCategories(java.util.List<Category> allParentCategories)
Category
setAllParentCategories in interface CategoryallParentCategories - the list of parent categoriespublic java.util.List<FeaturedProduct> getFeaturedProducts()
Category
getFeaturedProducts in interface Categorypublic void setFeaturedProducts(java.util.List<FeaturedProduct> featuredProducts)
Category
setFeaturedProducts in interface CategoryfeaturedProducts - the featured productspublic java.util.List<Product> getAllProducts()
CategoryProduct instances associated with this
category.
getAllProducts in interface Categorypublic 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.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 int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||