Package org.cyclos.entities.marketplace
Class AdCategory
-
- All Implemented Interfaces:
Cloneable,Comparable<NamedEntity>,HasNetwork,HasOrder,HasSvgIcon,ProcessableForProxying,DefinesNetwork,ImageOwner<AdCategory,AdCategoryImage>,IEntity,IInternalNamedEntity,INamedEntity
@Entity public class AdCategory extends ConfigurationOrderableEntity implements HasSvgIcon, DefinesNetwork, ImageOwner<AdCategory,AdCategoryImage>
A hierarchical ad category
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_LEVELThe maximum level for nesting categories
-
Constructor Summary
Constructors Constructor Description AdCategory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleangetActive()List<AdCategory>getChildren()IntegergetChildrenCount()IntegergetCountOffer()IntegergetCountSearch()DataTranslationTypegetDataTranslationType()If this entity allows data translation, should return the translation typeAdCategoryImagegetImage()Either the single image or a de-normalized reference to the first imageintgetLevel()IntegergetMaxLevel()NetworkgetNetwork()Returns the network this entity belongs toAdCategorygetParent()List<AdCategory>getPathFromRoot()Returns a list, beginning from root category to this oneAdCategorygetRootCategory()StringgetSvgIcon()StringgetSvgIconColor()TempImagegetUploadedImage()booleanisLeaf()booleanisRoot()voidsetActive(Boolean active)voidsetChildren(List<AdCategory> children)voidsetCountOffer(Integer countOffer)voidsetCountSearch(Integer countSearch)voidsetImage(AdCategoryImage image)Either the single image or a de-normalized reference to the first imagevoidsetNetwork(Network network)voidsetParent(AdCategory parent)voidsetSvgIcon(String svgIcon)voidsetSvgIconColor(String svgIconColor)voidsetUploadedImage(TempImage uploadedImage)-
Methods inherited from class org.cyclos.entities.ConfigurationOrderableEntity
compareTo, getOrder, setOrder, toString
-
Methods inherited from class org.cyclos.entities.ConfigurationEntity
getDescription, getInternalName, setDescription, setInternalName, toShortString
-
Methods inherited from class org.cyclos.entities.NamedEntity
getName, getNames, setName
-
Methods inherited from class org.cyclos.entities.BaseEntity
getVersion
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.model.IInternalNamedEntity
matches
-
Methods inherited from interface org.cyclos.entities.system.ImageOwner
getImages, setImages
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Field Detail
-
MAX_LEVEL
public static final int MAX_LEVEL
The maximum level for nesting categories- See Also:
- Constant Field Values
-
-
Method Detail
-
getActive
public Boolean getActive()
-
getChildren
public List<AdCategory> getChildren()
-
getChildrenCount
public Integer getChildrenCount()
-
getCountOffer
public Integer getCountOffer()
-
getCountSearch
public Integer getCountSearch()
-
getDataTranslationType
public DataTranslationType getDataTranslationType()
Description copied from class:BaseEntityIf this entity allows data translation, should return the translation type- Overrides:
getDataTranslationTypein classBaseEntity
-
getImage
public AdCategoryImage getImage()
Description copied from interface:ImageOwnerEither the single image or a de-normalized reference to the first image- Specified by:
getImagein interfaceImageOwner<AdCategory,AdCategoryImage>
-
getLevel
public int getLevel()
-
getMaxLevel
public Integer getMaxLevel()
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getParent
public AdCategory getParent()
-
getPathFromRoot
public List<AdCategory> getPathFromRoot()
Returns a list, beginning from root category to this one
-
getRootCategory
public AdCategory getRootCategory()
-
getSvgIcon
public String getSvgIcon()
- Specified by:
getSvgIconin interfaceHasSvgIcon
-
getSvgIconColor
public String getSvgIconColor()
-
getUploadedImage
public TempImage getUploadedImage()
-
isLeaf
public boolean isLeaf()
-
isRoot
public boolean isRoot()
-
setActive
public void setActive(Boolean active)
-
setChildren
public void setChildren(List<AdCategory> children)
-
setCountOffer
public void setCountOffer(Integer countOffer)
-
setCountSearch
public void setCountSearch(Integer countSearch)
-
setImage
public void setImage(AdCategoryImage image)
Description copied from interface:ImageOwnerEither the single image or a de-normalized reference to the first image- Specified by:
setImagein interfaceImageOwner<AdCategory,AdCategoryImage>
-
setNetwork
public void setNetwork(Network network)
- Specified by:
setNetworkin interfaceDefinesNetwork
-
setParent
public void setParent(AdCategory parent)
-
setSvgIcon
public void setSvgIcon(String svgIcon)
- Specified by:
setSvgIconin interfaceHasSvgIcon
-
setSvgIconColor
public void setSvgIconColor(String svgIconColor)
-
setUploadedImage
public void setUploadedImage(TempImage uploadedImage)
-
-