com.antelmann.db
Class Category.Entry
java.lang.Object
com.antelmann.db.AbstractDBEntry
com.antelmann.db.Category.Entry
- All Implemented Interfaces:
- Category<Database<?>>, DBEntry, DetailedString, Serializable
- Direct Known Subclasses:
- MutableCategory.Entry
- Enclosing interface:
- Category<T>
public abstract static class Category.Entry
- extends AbstractDBEntry
- implements Category<Database<?>>, DetailedString
- See Also:
- Serialized Form
Category.Entry
public Category.Entry(Object id,
String categoryName,
Category<Database<?>> parent)
getCategoryName
public String getCategoryName()
- Description copied from interface:
Category
- returns the name for this category
- Specified by:
getCategoryName in interface Category<Database<?>>
toString
public String toString()
- Overrides:
toString in class AbstractDBEntry
toDetailedString
public String toDetailedString()
- Description copied from interface:
DetailedString
- provides full details of this instance in a String.
In case the String contains multiple lines, it is recommended to use
'\n' rather than the platform specific line-break for better compatibility.
- Specified by:
toDetailedString in interface DetailedString
- Returns:
- a (potentially multi-line) String providing full details on this
object instance
getParentCategory
public Category<Database<?>> getParentCategory()
- Description copied from interface:
Category
- returns the super category that this category belongs to - or null if it
is a top-level category
- Specified by:
getParentCategory in interface Category<Database<?>>
setCategoryName
protected void setCategoryName(String name)
setParentCategory
protected void setParentCategory(Category<Database<?>> parent)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getSubCategories
public List<? extends Category<Database<?>>> getSubCategories(Database<?> context)
throws IOException
- Description copied from interface:
Category
- retrieves a list of sub-categories for this category
- Specified by:
getSubCategories in interface Category<Database<?>>
- Parameters:
context - the object (typically a database, a file, a URL, etc.) that
provides the information required to derive the children from.
- Returns:
- a list of Category objects that have this instance as a parent
- Throws:
IOException - if the categories could not be retrieved
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads