public class CDBCategory extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
code |
protected CDBSubcategory |
defaultSubcategory |
protected String |
label |
protected SortedMap<String,CDBSubcategory> |
subcategoriesByCode |
Constructor and Description |
---|
CDBCategory() |
CDBCategory(String code,
String label) |
Modifier and Type | Method and Description |
---|---|
void |
add(CDBSubcategory subcat)
Adds the given subcategory to this category
|
String |
getCode() |
CDBSubcategory |
getDefaultSubcategory()
Retrieve the default subcategory of this category.
|
String |
getLabel() |
SortedMap<String,CDBSubcategory> |
getSubcategoriesByCode() |
CDBSubcategory |
getSubcategory(String subcatcode) |
boolean |
hasSubcategory(String subcatcode) |
void |
setCode(String code) |
void |
setLabel(String label) |
protected String code
protected String label
protected SortedMap<String,CDBSubcategory> subcategoriesByCode
protected CDBSubcategory defaultSubcategory
public String getCode()
public void setCode(String code)
code
- the code to setpublic String getLabel()
public void setLabel(String label)
label
- the label to setpublic CDBSubcategory getDefaultSubcategory()
public boolean hasSubcategory(String subcatcode)
subcatcode
- true
if a subcategory with the given code exists,
else false
public CDBSubcategory getSubcategory(String subcatcode)
subcatcode
- null
if
no such subcategory existspublic void add(CDBSubcategory subcat)
subcat
- public SortedMap<String,CDBSubcategory> getSubcategoriesByCode()
null
Copyright © 2018. All rights reserved.