Red Hat Web Application Framework 6.1 Instrukcja Użytkownika Strona 145

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 230
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 144
Chapter 11. Services Tutorials 131
Figure 11-7. Category Hierarchy before and after removing parent categories
11.2.5. Retrieving all Subcategories of a given Category
// assume that we have the Category OID (call it categoryOID)
Category category = new Category(categoryOID);
// subcategories is a collection of Category objects
CategoryCollection subcategories = category.getChildren();
Example 11-5. Retrieving Subcategories of a given Category
11.2.6. Retrieving all child objects of a given Category
// assume that we have the Category OID
// (call it categoryOID)
Category category = new Category(categoryOID);
// the Collection will be a Collection of
// CategorizedObjects
Collection childObjects = category.getObjects();
// print out the toString for each object
// and its parents
Iterator childIterator = childObjects.iterator();
while (childIterator.hasNext()) {
CategorizedObject object =
(CategorizedObject) childIterator.next();
Przeglądanie stron 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 229 230

Komentarze do niniejszej Instrukcji

Brak uwag