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.Objectjava.lang.CloneNotSupportedException - an unexpected CloneNotSupportedException exceptionpublic void calculateNumberOfProducts()
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 CategoryIfpublic void setChildren(CategoryIf[] children)
setChildren in interface CategoryIfchildren - The children to set.public int getId()
getId in interface CategoryIfpublic void setId(int id)
setId in interface CategoryIfid - The id to set.public java.lang.String getImage()
getImage in interface CategoryIfpublic void setImage(java.lang.String image)
setImage in interface CategoryIfimage - The image to set.public java.lang.String getName()
getName in interface CategoryIfpublic void setName(java.lang.String name)
setName in interface CategoryIfname - The name to set.public int getNumberOfProducts()
getNumberOfProducts in interface CategoryIfpublic void setNumberOfProducts(int numberOfProducts)
setNumberOfProducts in interface CategoryIfnumberOfProducts - The numberOfProducts to set.public int getParentId()
getParentId in interface CategoryIfpublic void setParentId(int parentId)
setParentId in interface CategoryIfparentId - The parentId to set.public int getSortOrder()
getSortOrder in interface CategoryIfpublic void setSortOrder(int sortOrder)
setSortOrder in interface CategoryIfsortOrder - The sortOrder to set.public CategoryIf getParent()
getParent in interface CategoryIfpublic void setParent(CategoryIf parent)
setParent in interface CategoryIfparent - The parent to set.public boolean isSelected()
CategoryIfisSelected in interface CategoryIfpublic void setSelected(boolean selected)
CategoryIfsetSelected in interface CategoryIfselected - The selected to set.public int getLevel()
CategoryIfgetLevel in interface CategoryIfpublic void setLevel(int level)
CategoryIfsetLevel in interface CategoryIflevel - The level to set.public java.lang.String getCustom1()
getCustom1 in interface CategoryIfpublic void setCustom1(java.lang.String custom1)
setCustom1 in interface CategoryIfcustom1 - The custom1 to set.public java.lang.String getCustom2()
getCustom2 in interface CategoryIfpublic void setCustom2(java.lang.String custom2)
setCustom2 in interface CategoryIfcustom2 - The custom2 to set.public java.lang.String getCustom3()
getCustom3 in interface CategoryIfpublic void setCustom3(java.lang.String custom3)
setCustom3 in interface CategoryIfcustom3 - The custom3 to set.public boolean isInvisible()
CategoryIfisInvisible in interface CategoryIfpublic void setInvisible(boolean invisible)
CategoryIfsetInvisible in interface CategoryIfinvisible - the invisible to setpublic java.lang.String getDescription()
getDescription in interface CategoryIfpublic void setDescription(java.lang.String description)
setDescription in interface CategoryIfdescription - the description to setpublic MiscItemIf[] getMiscItems()
getMiscItems in interface CategoryIfpublic void setMiscItems(MiscItemIf[] miscItems)
CategoryIfsetMiscItems in interface CategoryIfmiscItems - the miscItems to setpublic java.lang.String getSearchKey()
getSearchKey in interface CategoryIfpublic void setSearchKey(java.lang.String searchKey)
setSearchKey in interface CategoryIfsearchKey - the searchKey to setpublic java.lang.String getCustomd1()
getCustomd1 in interface CategoryIfpublic void setCustomd1(java.lang.String customd1)
setCustomd1 in interface CategoryIfcustomd1 - the customd1 to setpublic java.lang.String getCustomd2()
getCustomd2 in interface CategoryIfpublic void setCustomd2(java.lang.String customd2)
setCustomd2 in interface CategoryIfcustomd2 - the customd2 to setpublic java.lang.String getCustomd3()
getCustomd3 in interface CategoryIfpublic void setCustomd3(java.lang.String customd3)
setCustomd3 in interface CategoryIfcustomd3 - the customd3 to setpublic java.lang.String getCustomd4()
getCustomd4 in interface CategoryIfpublic void setCustomd4(java.lang.String customd4)
setCustomd4 in interface CategoryIfcustomd4 - the customd4 to setpublic java.lang.String getCustomd5()
getCustomd5 in interface CategoryIfpublic void setCustomd5(java.lang.String customd5)
setCustomd5 in interface CategoryIfcustomd5 - the customd5 to setCopyright © 2018 DS Data Systems UK Ltd.