com.antelmann.db
Class MutableCategory.Adapter<T>
java.lang.Object
com.antelmann.db.Category.Adapter<T>
com.antelmann.db.MutableCategory.Adapter<T>
- All Implemented Interfaces:
- Category<T>, MutableCategory<T>, DetailedString, Serializable
- Enclosing interface:
- MutableCategory<T>
public static class MutableCategory.Adapter<T>
- extends Category.Adapter<T>
- implements MutableCategory<T>
- See Also:
- Serialized Form
| Methods inherited from class com.antelmann.db.Category.Adapter |
addAllChildrenFrom, checkForCircularReferenceInParent, equals, getAllChildren, getCategoryName, getPath, getPathName, getPathName, getTopCategory, hashCode, isParent, iterate, iterate, listAll, setCategoryName, setParentCategory, toDetailedString, toString |
MutableCategory.Adapter
public MutableCategory.Adapter(String name,
MutableCategory<T> parent,
Collection<? extends MutableCategory<T>> children)
setParentCategory
public void setParentCategory(MutableCategory<T> parent)
- Specified by:
setParentCategory in interface MutableCategory<T>
getParentCategory
public MutableCategory<T> 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<T>- Specified by:
getParentCategory in interface MutableCategory<T>- Overrides:
getParentCategory in class Category.Adapter<T>
getSubCategories
public List<? extends MutableCategory<T>> getSubCategories(T context)
throws IOException
- the returned list by this implementation allows direct modifications;
the context parameter is ignored and may be null
- Specified by:
getSubCategories in interface Category<T>- Specified by:
getSubCategories in interface MutableCategory<T>- Overrides:
getSubCategories in class Category.Adapter<T>
- 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
setChildren
public void setChildren(Collection<Category<T>> col)
throws InconsistentContentException
- Overrides:
setChildren in class Category.Adapter<T>
- Throws:
InconsistentContentException - if an element of the given collection is not mutable
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads