public class AdminCategory
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
private AdminCategory[] |
children
children
|
private java.lang.String |
custom1
custom field
|
private java.lang.String |
custom2
custom field
|
private java.lang.String |
custom3
custom field
|
private java.util.Date |
dateAdded
Date Added
|
private java.lang.String |
description
description
|
private AdminCategoryDescription[] |
descriptions
Array of descriptions
|
private int |
id
id
|
private java.lang.String |
image
image
|
private boolean |
invisible
Invisible - Doesn't appear in the category tree
|
private AdminMiscItem[] |
miscItems
Miscellaneous Items
|
private java.lang.String |
name
name
|
private int |
numberOfProducts
numberOfProducts
|
private int |
parentId
parentId
|
private java.lang.String |
searchKey
search_key - can be used for searching for content such as the content applicable to a
certain category
|
private int |
sortOrder
sortOrder
|
Constructor and Description |
---|
AdminCategory()
Constructor
|
AdminCategory(com.workingdogs.village.Record vr,
com.konakart.db.KKCriteria c)
Instantiates the attributes of the AdminCategory 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.
|
AdminCategory |
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.
|
AdminCategory[] |
getChildren() |
java.lang.String |
getCustom1() |
java.lang.String |
getCustom2() |
java.lang.String |
getCustom3() |
java.util.Date |
getDateAdded() |
java.lang.String |
getDescription() |
AdminCategoryDescription[] |
getDescriptions() |
int |
getId() |
java.lang.String |
getImage() |
AdminMiscItem[] |
getMiscItems()
Returns the array of Miscellaneous Items associated with this category.
|
java.lang.String |
getName() |
int |
getNumberOfProducts() |
int |
getParentId() |
java.lang.String |
getSearchKey() |
int |
getSortOrder() |
boolean |
isInvisible() |
void |
setChildren(AdminCategory[] children) |
void |
setCustom1(java.lang.String custom1) |
void |
setCustom2(java.lang.String custom2) |
void |
setCustom3(java.lang.String custom3) |
void |
setDateAdded(java.util.Date dateAdded) |
void |
setDescription(java.lang.String description) |
void |
setDescriptions(AdminCategoryDescription[] descriptions) |
void |
setId(int id) |
void |
setImage(java.lang.String image) |
void |
setInvisible(boolean invisible) |
void |
setMiscItems(AdminMiscItem[] miscItems) |
void |
setName(java.lang.String name) |
void |
setNumberOfProducts(int numberOfProducts) |
void |
setParentId(int parentId) |
void |
setSearchKey(java.lang.String searchKey) |
void |
setSortOrder(int sortOrder) |
java.lang.String |
toString() |
java.lang.String |
toStringBrief() |
private int id
private java.lang.String image
private int parentId
private int sortOrder
private java.lang.String name
private java.lang.String description
private java.lang.String searchKey
private AdminCategoryDescription[] descriptions
private int numberOfProducts
private AdminCategory[] children
private java.lang.String custom1
private java.lang.String custom2
private java.lang.String custom3
private boolean invisible
private java.util.Date dateAdded
private AdminMiscItem[] miscItems
public AdminCategory()
public AdminCategory(com.workingdogs.village.Record vr, com.konakart.db.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 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 AdminCategory findCategory(int categoryId)
categoryId
- the categoryIdpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- an unexpected CloneNotSupportedException exceptionpublic AdminCategory[] getChildren()
public void setChildren(AdminCategory[] children)
children
- The children to set.public int getId()
public void setId(int id)
id
- The id to set.public java.lang.String getImage()
public void setImage(java.lang.String image)
image
- The image to set.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public int getNumberOfProducts()
public void setNumberOfProducts(int numberOfProducts)
numberOfProducts
- The numberOfProducts to set.public int getParentId()
public void setParentId(int parentId)
parentId
- The parentId to set.public int getSortOrder()
public void setSortOrder(int sortOrder)
sortOrder
- The sortOrder to set.public AdminCategoryDescription[] getDescriptions()
public void setDescriptions(AdminCategoryDescription[] descriptions)
descriptions
- The descriptions to set.public java.lang.String getCustom1()
public void setCustom1(java.lang.String custom1)
custom1
- The custom1 to set.public java.lang.String getCustom2()
public void setCustom2(java.lang.String custom2)
custom2
- The custom2 to set.public java.lang.String getCustom3()
public void setCustom3(java.lang.String custom3)
custom3
- The custom3 to set.public boolean isInvisible()
public void setInvisible(boolean invisible)
invisible
- the invisible to setpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- the description to setpublic AdminMiscItem[] getMiscItems()
public void setMiscItems(AdminMiscItem[] miscItems)
miscItems
- the miscItems to setpublic java.util.Date getDateAdded()
public void setDateAdded(java.util.Date dateAdded)
dateAdded
- the dateAdded to setpublic java.lang.String getSearchKey()
public void setSearchKey(java.lang.String searchKey)
searchKey
- the searchKey to setCopyright © 2018 DS Data Systems UK Ltd.