public class Category extends java.lang.Object implements java.lang.Cloneable, CategoryIf
Constructor and Description |
---|
Category()
Constructor
|
Category(com.workingdogs.village.Record vr,
KKCriteria c)
Instantiates the attributes of the Category object from a Record object
|
Modifier and Type | Method and Description |
---|---|
void |
calculateNumberOfProducts()
Recursively parses through the children of this category and adds the total amount of
products contained by the category to the number of products that this category may already
have.
|
java.lang.Object |
clone()
Clones the current object and all of it's children.
|
CategoryIf |
findCategory(int categoryId)
Searches all of the children, grandchildren etc of this object and returns the category
object with the given id .
|
void |
getAllChildrenIds(java.util.List<java.lang.Integer> childList)
Adds all of the ids of the children, grandchildren etc of this object to the given childList.
|
CategoryIf[] |
getChildren() |
java.lang.String |
getCustom1() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom3() |
java.lang.String |
getCustomd1() |
java.lang.String |
getCustomd2() |
java.lang.String |
getCustomd3() |
java.lang.String |
getCustomd4() |
java.lang.String |
getCustomd5() |
java.lang.String |
getDescription() |
int |
getId() |
java.lang.String |
getImage() |
int |
getLevel()
Top level = 0.
|
MiscItemIf[] |
getMiscItems()
Returns the array of Miscellaneous Items associated with this category.
|
java.lang.String |
getName() |
int |
getNumberOfProducts() |
CategoryIf |
getParent() |
int |
getParentId() |
java.lang.String |
getSearchKey() |
int |
getSortOrder() |
boolean |
isInvisible()
When invisible, a category is not returned in the category tree.
|
boolean |
isSelected()
Not persisted.
|
void |
setChildren(CategoryIf[] children) |
void |
setCustom1(java.lang.String custom1) |
void |
setCustom2(java.lang.String custom2) |
void |
setCustom3(java.lang.String custom3) |
void |
setCustomd1(java.lang.String customd1) |
void |
setCustomd2(java.lang.String customd2) |
void |
setCustomd3(java.lang.String customd3) |
void |
setCustomd4(java.lang.String customd4) |
void |
setCustomd5(java.lang.String customd5) |
void |
setDescription(java.lang.String description) |
void |
setId(int id) |
void |
setImage(java.lang.String image) |
void |
setInvisible(boolean invisible)
When invisible, a category is not returned in the category tree.
|
void |
setLevel(int level)
Top level = 0.
|
void |
setMiscItems(MiscItemIf[] miscItems)
Array of Miscellaneous Items associated with this category.
|
void |
setName(java.lang.String name) |
void |
setNumberOfProducts(int numberOfProducts) |
void |
setParent(CategoryIf parent) |
void |
setParentId(int parentId) |
void |
setSearchKey(java.lang.String searchKey) |
void |
setSelected(boolean selected)
Not persisted.
|
void |
setSortOrder(int sortOrder) |
java.lang.String |
toString() |
java.lang.String |
toStringBrief() |
public Category()
public Category(com.workingdogs.village.Record vr, KKCriteria c) throws com.workingdogs.village.DataSetException
vr
- Record containing datac
- Criteria containing column namescom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- an unexpected CloneNotSupportedException exceptionpublic void calculateNumberOfProducts()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringBrief()
public void getAllChildrenIds(java.util.List<java.lang.Integer> childList)
childList
- the childListpublic CategoryIf findCategory(int categoryId)
categoryId
- the categoryIdpublic CategoryIf[] getChildren()
getChildren
in interface CategoryIf
public void setChildren(CategoryIf[] children)
setChildren
in interface CategoryIf
children
- The children to set.public int getId()
getId
in interface CategoryIf
public void setId(int id)
setId
in interface CategoryIf
id
- The id to set.public java.lang.String getImage()
getImage
in interface CategoryIf
public void setImage(java.lang.String image)
setImage
in interface CategoryIf
image
- The image to set.public java.lang.String getName()
getName
in interface CategoryIf
public void setName(java.lang.String name)
setName
in interface CategoryIf
name
- The name to set.public int getNumberOfProducts()
getNumberOfProducts
in interface CategoryIf
public void setNumberOfProducts(int numberOfProducts)
setNumberOfProducts
in interface CategoryIf
numberOfProducts
- The numberOfProducts to set.public int getParentId()
getParentId
in interface CategoryIf
public void setParentId(int parentId)
setParentId
in interface CategoryIf
parentId
- The parentId to set.public int getSortOrder()
getSortOrder
in interface CategoryIf
public void setSortOrder(int sortOrder)
setSortOrder
in interface CategoryIf
sortOrder
- The sortOrder to set.public CategoryIf getParent()
getParent
in interface CategoryIf
public void setParent(CategoryIf parent)
setParent
in interface CategoryIf
parent
- The parent to set.public boolean isSelected()
CategoryIf
isSelected
in interface CategoryIf
public void setSelected(boolean selected)
CategoryIf
setSelected
in interface CategoryIf
selected
- The selected to set.public int getLevel()
CategoryIf
getLevel
in interface CategoryIf
public void setLevel(int level)
CategoryIf
setLevel
in interface CategoryIf
level
- The level to set.public java.lang.String getCustom1()
getCustom1
in interface CategoryIf
public void setCustom1(java.lang.String custom1)
setCustom1
in interface CategoryIf
custom1
- The custom1 to set.public java.lang.String getCustom2()
getCustom2
in interface CategoryIf
public void setCustom2(java.lang.String custom2)
setCustom2
in interface CategoryIf
custom2
- The custom2 to set.public java.lang.String getCustom3()
getCustom3
in interface CategoryIf
public void setCustom3(java.lang.String custom3)
setCustom3
in interface CategoryIf
custom3
- The custom3 to set.public boolean isInvisible()
CategoryIf
isInvisible
in interface CategoryIf
public void setInvisible(boolean invisible)
CategoryIf
setInvisible
in interface CategoryIf
invisible
- the invisible to setpublic java.lang.String getDescription()
getDescription
in interface CategoryIf
public void setDescription(java.lang.String description)
setDescription
in interface CategoryIf
description
- the description to setpublic MiscItemIf[] getMiscItems()
getMiscItems
in interface CategoryIf
public void setMiscItems(MiscItemIf[] miscItems)
CategoryIf
setMiscItems
in interface CategoryIf
miscItems
- the miscItems to setpublic java.lang.String getSearchKey()
getSearchKey
in interface CategoryIf
public void setSearchKey(java.lang.String searchKey)
setSearchKey
in interface CategoryIf
searchKey
- the searchKey to setpublic java.lang.String getCustomd1()
getCustomd1
in interface CategoryIf
public void setCustomd1(java.lang.String customd1)
setCustomd1
in interface CategoryIf
customd1
- the customd1 to setpublic java.lang.String getCustomd2()
getCustomd2
in interface CategoryIf
public void setCustomd2(java.lang.String customd2)
setCustomd2
in interface CategoryIf
customd2
- the customd2 to setpublic java.lang.String getCustomd3()
getCustomd3
in interface CategoryIf
public void setCustomd3(java.lang.String customd3)
setCustomd3
in interface CategoryIf
customd3
- the customd3 to setpublic java.lang.String getCustomd4()
getCustomd4
in interface CategoryIf
public void setCustomd4(java.lang.String customd4)
setCustomd4
in interface CategoryIf
customd4
- the customd4 to setpublic java.lang.String getCustomd5()
getCustomd5
in interface CategoryIf
public void setCustomd5(java.lang.String customd5)
setCustomd5
in interface CategoryIf
customd5
- the customd5 to setCopyright © 2018 DS Data Systems UK Ltd.