Holger's Java API

## 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

Nested Class Summary

Nested classes/interfaces inherited from interface com.antelmann.db.Category
`Category.Adapter<T>, Category.Entry`

Field Summary

Fields inherited from interface com.antelmann.db.DBEntry
`ENTRY_FLAVOR, ENTRY_LIST_FLAVOR`

Constructor Summary
`Category.Entry(Object id, String categoryName, Category<Database<?>> parent)`

Method Summary
`String` `getCategoryName()` returns the name for this category
`Category<Database<?>>` `getParentCategory()` returns the super category that this category belongs to - or null if it is a top-level category
`List<? extends Category<Database<?>>>` `getSubCategories(Database<?> context)` retrieves a list of sub-categories for this category
`protected void` `setCategoryName(String name)`
`protected void` `setParentCategory(Category<Database<?>> parent)`
`String` `toDetailedString()` provides full details of this instance in a String.
`String` `toString()`

Methods inherited from class com.antelmann.db.AbstractDBEntry
`equals, getID, hashCode, hashEntry, sameEntry`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Category.Entry

    public Category.Entry(Object id,
                          String categoryName,
                          Category<Database<?>> parent)

Method Detail

### 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