Lightweight, template-friendly view of a Category, used to render category names, titles and images on category and product listing pages. Instances are produced from a Category entity by the toBean factory methods and are not persisted themselves.


Properties

PropertyReturnsDescription
idlongDatabase id of the underlying category.
imageHrefStringURL for the category's main image under the content-addressed file store, or null if the category has no main image set.
nameStringPath-safe, organisation-unique identifier of the category, used as the lookup key when searching for it by name.
notesStringFree-text description of the category. May be null or empty if none has been set.
parentTitleStringTitles of this category's ancestors, from the top-most parent down, joined with " / ". Returns an empty string if the category has no parent category.
titleStringDisplay title of the category, shown to shop visitors. When the bean was built with toBean(Category, int) the title is prefixed with a run of dashes reflecting how deeply the category is nested.

Methods

getId()

Returns: long

Database id of the underlying category.

getName()

Returns: String

Path-safe, organisation-unique identifier of the category, used as the lookup key when searching for it by name.

getTitle()

Returns: String

Display title of the category, shown to shop visitors. When the bean was built with toBean(Category, int) the title is prefixed with a run of dashes reflecting how deeply the category is nested.

getNotes()

Returns: String

Free-text description of the category. May be null or empty if none has been set.

getImageHref()

Returns: String

URL for the category's main image under the content-addressed file store, or null if the category has no main image set.

getParentTitle()

Returns: String

Titles of this category's ancestors, from the top-most parent down, joined with " / ". Returns an empty string if the category has no parent category.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.