|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.AbstractEpDomainImpl com.elasticpath.domain.impl.AbstractPersistenceImpl com.elasticpath.domain.impl.AbstractEntityImpl com.elasticpath.domain.catalog.impl.CategoryImpl
public class CategoryImpl
The default implementation of Category
.
Field Summary | |
---|---|
static long |
serialVersionUID
Serial version id. |
Constructor Summary | |
---|---|
CategoryImpl()
Default constructor. |
Method Summary | |
---|---|
void |
addChild(Category category)
Add the given category as a child. |
void |
addOrUpdateLocaleDependantFields(LocaleDependantFields ldf)
Sets the LocaleDependantFields . |
int |
compareTo(java.lang.Object object)
Compares this category with the specified object for order. |
boolean |
equals(Category cat)
Returns true if this category equals the given category. |
boolean |
equals(java.lang.Object obj)
Returns true if this category equals the given object. |
void |
executeBeforePersistAction()
Update the last modified date. |
AttributeValueGroup |
getAttributeValueGroup()
Get the attribute value group. |
java.util.Set |
getAvailableChildren()
Get the available child categories. |
CategoryType |
getCategoryType()
Returns the category type. |
java.util.Set |
getChildren()
Get the child categories. |
java.lang.String |
getCode()
Returns the category code. |
java.lang.String |
getDisplayName(java.util.Locale locale)
Returns the display name of the given locale. |
java.util.Date |
getEndDate()
Get the end date. |
java.lang.String |
getGuid()
Return the guid. |
boolean |
getHasSubCategories()
Return the flag to indicate whether this category has subCategories or not. |
java.util.Date |
getLastModifiedDate()
Returns the date when the category was last modified. |
int |
getLevel()
Get category level. |
LocaleDependantFields |
getLocaleDependantFields(java.util.Locale locale)
Returns the LocaleDependantFields of the given locale. |
java.util.Map |
getLocaleDependantFieldsMap()
Gets the all LocaleDependantFields as a map. |
LocaleDependantFields |
getLocaleDependantFieldsWithoutFallBack(java.util.Locale locale)
Returns the LocaleDependantFields of the given locale without a fallback. |
int |
getOrdering()
Get the ordering number. |
Category |
getParent()
Get the parent category of this category. |
java.util.Stack |
getPath()
Get the path from the root category to this category on the tree. |
java.util.List |
getPathAsList()
Returns the category path as a List . |
java.lang.String |
getSeoUrl(java.util.Locale locale,
int pageNumber)
Returns the SEO URL, E.g. |
java.lang.String |
getSeoUrlWithoutSuffix(java.util.Locale locale)
Returns the SEO URL without the suffix, E.g. |
java.util.Date |
getStartDate()
Get the start date that this category will become available to customers. |
java.lang.String |
getTemplate()
Gets the display template of this category. |
java.lang.String |
getTemplateWithFallBack(java.lang.String defaultTemplate)
Get the display template name of this category. |
java.util.Set |
getTopSellers()
Returns the top sellers for this category. |
int |
hashCode()
Generate the hash code. |
boolean |
isAvailable()
Returns true if the category is available to be displayed. |
boolean |
isHidden()
Returns true if the product should not be displayed (e.g. |
void |
removeChild(Category category)
Remove the given category from the children list. |
void |
setAttributeValueGroup(AttributeValueGroup attributeValueGroup)
Set the attribute value group. |
void |
setCategoryType(CategoryType categoryType)
Set the CategoryType . |
void |
setCode(java.lang.String code)
Sets the category code. |
void |
setDefaultValues()
Set default values for those fields that need default values. |
void |
setEndDate(java.util.Date endDate)
Set the end date. |
void |
setGuid(java.lang.String guid)
Set the guid. |
void |
setHidden(boolean hidden)
Set to true if the product should not be displayed. |
void |
setLastModifiedDate(java.util.Date lastModifiedDate)
Set the date when the category was last modified. |
void |
setLocaleDependantFieldsMap(java.util.Map localeDependantFieldsMap)
Sets all LocaleDependantFields with the given map. |
void |
setOrdering(int ordering)
Set the ordering number. |
void |
setParent(Category newParent)
Set the parent cateogry. |
void |
setParentOneWay(Category newParent)
Set the parent cateogry. |
void |
setStartDate(java.util.Date startDate)
Set the start date that this category will become valid. |
void |
setTopSellers(java.util.Set topSellers)
Sets the top sellers for this category. |
Methods inherited from class com.elasticpath.domain.impl.AbstractEntityImpl |
---|
convertAttributeGroupAttributes |
Methods inherited from class com.elasticpath.domain.impl.AbstractPersistenceImpl |
---|
getUidPk, isPersistent, setUidPk |
Methods inherited from class com.elasticpath.domain.impl.AbstractEpDomainImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.domain.Persistence |
---|
getUidPk, isPersistent, setUidPk |
Methods inherited from interface com.elasticpath.domain.EpDomain |
---|
getElasticPath, setElasticPath |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public CategoryImpl()
Method Detail |
---|
public void addChild(Category category)
addChild
in interface Category
category
- the category to be added as a childpublic void addOrUpdateLocaleDependantFields(LocaleDependantFields ldf)
LocaleDependantFields
.
addOrUpdateLocaleDependantFields
in interface ObjectWithLocaleDependantFields
ldf
- the LocaleDependantFields
instance to set.public int compareTo(java.lang.Object object) throws EpDomainException
compareTo
in interface java.lang.Comparable
object
- the given object
EpDomainException
- if the given object is not a Category
public boolean equals(Category cat)
true
if this category equals the given category.
cat
- the given category
true
if this category equals the given categorypublic boolean equals(java.lang.Object obj)
true
if this category equals the given object.
equals
in class java.lang.Object
obj
- the given object
true
if this category equals the given objectpublic void executeBeforePersistAction()
executeBeforePersistAction
in interface Persistence
executeBeforePersistAction
in class AbstractPersistenceImpl
public AttributeValueGroup getAttributeValueGroup()
getAttributeValueGroup
in interface Category
AttributeValueGroup
public java.util.Set getAvailableChildren()
getAvailableChildren
in interface Category
public CategoryType getCategoryType()
getCategoryType
in interface Category
public java.util.Set getChildren()
getChildren
in interface Category
public java.lang.String getCode()
getCode
in interface Category
public java.lang.String getDisplayName(java.util.Locale locale)
getLocaleDependantFields(Locale).getDisplayName()
.
getDisplayName
in interface ObjectWithLocaleDependantFields
locale
- the locale
public java.util.Date getEndDate()
getEndDate
in interface Category
public java.lang.String getGuid()
getGuid
in interface Entity
getGuid
in class AbstractEntityImpl
public boolean getHasSubCategories()
getHasSubCategories
in interface Category
public java.util.Date getLastModifiedDate()
getLastModifiedDate
in interface Category
public int getLevel()
getLevel
in interface BranchNode
public LocaleDependantFields getLocaleDependantFields(java.util.Locale locale)
LocaleDependantFields
of the given locale.
getLocaleDependantFields
in interface ObjectWithLocaleDependantFields
locale
- the locale
LocaleDependantFields
of the given locale if it exists, otherwise an empty LocaleDependantFields
.public java.util.Map getLocaleDependantFieldsMap()
LocaleDependantFields
as a map.
getLocaleDependantFieldsMap
in interface Category
getLocaleDependantFieldsMap
in interface ObjectWithLocaleDependantFields
LocaleDependantFields
mappublic LocaleDependantFields getLocaleDependantFieldsWithoutFallBack(java.util.Locale locale)
LocaleDependantFields
of the given locale without a fallback.
getLocaleDependantFieldsWithoutFallBack
in interface ObjectWithLocaleDependantFields
locale
- the locale
LocaleDependantFields
of the given localepublic int getOrdering()
getOrdering
in interface Category
public Category getParent()
getParent
in interface Category
public java.util.Stack getPath()
getPath
in interface BranchNode
public java.util.List getPathAsList()
List
. The root category will be the first.
getPathAsList
in interface Category
List
.public java.lang.String getSeoUrl(java.util.Locale locale, int pageNumber)
getSeoUrl
in interface Category
locale
- the localepageNumber
- the page number
public java.lang.String getSeoUrlWithoutSuffix(java.util.Locale locale)
getSeoUrlWithoutSuffix
in interface Category
locale
- the locale
public java.util.Date getStartDate()
getStartDate
in interface Category
public java.lang.String getTemplate()
getTemplate
in interface Category
public java.lang.String getTemplateWithFallBack(java.lang.String defaultTemplate)
getTemplateWithFallBack
in interface Category
defaultTemplate
- the default template name
public java.util.Set getTopSellers()
getTopSellers
in interface Category
public int hashCode()
hashCode
in class java.lang.Object
public boolean isAvailable()
true
if the category is available to be displayed.
isAvailable
in interface Category
true
if the category is available.public boolean isHidden()
isHidden
in interface Category
public void removeChild(Category category)
removeChild
in interface Category
category
- the category to be removedpublic void setAttributeValueGroup(AttributeValueGroup attributeValueGroup)
setAttributeValueGroup
in interface Category
attributeValueGroup
- the AttributeValueGroup
public void setCategoryType(CategoryType categoryType)
CategoryType
.
setCategoryType
in interface Category
categoryType
- the CategoryType
public void setCode(java.lang.String code)
setCode
in interface Category
code
- the category codepublic void setDefaultValues()
setDefaultValues
in interface Persistence
setDefaultValues
in class AbstractEntityImpl
public void setEndDate(java.util.Date endDate)
setEndDate
in interface Category
endDate
- the end datepublic void setGuid(java.lang.String guid)
setGuid
in interface Entity
setGuid
in class AbstractEntityImpl
guid
- the guid to set.public void setHidden(boolean hidden)
setHidden
in interface Category
hidden
- true if the product should not be displayedpublic void setLastModifiedDate(java.util.Date lastModifiedDate)
setLastModifiedDate
in interface Category
lastModifiedDate
- the date when the category was last modifiedpublic void setLocaleDependantFieldsMap(java.util.Map localeDependantFieldsMap)
LocaleDependantFields
with the given map.
setLocaleDependantFieldsMap
in interface ObjectWithLocaleDependantFields
localeDependantFieldsMap
- the LocaleDependantFields
map to setpublic void setOrdering(int ordering)
setOrdering
in interface Category
ordering
- the ordering numberpublic void setParent(Category newParent)
setParent
in interface Category
newParent
- the new parent categorypublic void setParentOneWay(Category newParent)
setParentOneWay
in interface Category
newParent
- the new parent categorypublic void setStartDate(java.util.Date startDate)
setStartDate
in interface Category
startDate
- the start datepublic void setTopSellers(java.util.Set topSellers)
setTopSellers
in interface Category
topSellers
- the top sellers for this category
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |