public class MultiCategoryItemCollection extends MultiItemCollection
CategoryItemCollection
objects of different catalogs. You can create a new instance using Server.newMultiCategoryItemCollection()
.Modifier and Type | Method and Description |
---|---|
MultiCategoryItemCollection |
clone(boolean createEmptyClone)
Create a clone of this collection.
|
MultiCategoryItemCollection |
clone(boolean createEmptyClone,
boolean createNewCollection)
Create a clone of this collection.
|
java.util.List<java.lang.Integer> |
getCatalogIDs()
Return the catalog ID of all CategoryItemCollections that are contained in this MultiCategoryItemCollection.
|
CategoryItem |
getCategoryItemByID(int catalogID,
int categoryID)
Return a category item specified by catalog ID and item ID.
|
CategoryItem |
getCategoryItemByID(ItemIdentifier identifier)
Return a category item specified by identifier.
|
CategoryItemCollection |
getCategoryItemCollection(int catalogID)
Return the contained CategoryItemCollection for the given catalog ID.
|
java.util.Iterator<Item> |
iterator()
Return an iterator that iterates over all items in this collection.
|
addCollectionListener, addFilter, addFilter, addFilter, addFilter, addFilter, addGlobalCollectionListener, addItem, addItem, addItemCollection, addItems, close, doAssetAction, doAssetAction, doAssetAction, equals, find, find, find, find, find, find, find, find, findAll, findAll, getCumulusSession, getDailyStatistics, getDailyStatistics, getItemByID, getItemByID, getItemCollection, getItemCount, getItemFieldStatistics, getItemFieldsWithStatistics, getItemFieldsWithStatistics, getItemFieldsWithStatistics, getItemFieldValues, getItemIDs, getItemPosition, getItemPosition, getItemTotalCount, getMultiLayout, getMultiSorting, getServer, getSortDirection, getSorting, getTableName, hashCode, hasItem, matchIDs, moveItem, quickSearch, removeAllItems, removeCollectionListener, removeFilter, removeGlobalCollectionListener, removeItem, removeItem, removeItemCollection, removeItems, setFreesorted, setMultiSorting, setSortDirection, setSorting, updateWantedFields, updateWantedFields
public MultiCategoryItemCollection clone(boolean createEmptyClone)
clone
in class MultiItemCollection
createEmptyClone
- Pass true
if you want the new collection to be empty. Pass false
if it should contain the same items as
this collection.public MultiCategoryItemCollection clone(boolean createEmptyClone, boolean createNewCollection)
clone
in class MultiItemCollection
createEmptyClone
- Pass true
if you want the new collection to be empty. Pass false
if it should contain the same items
as this collection.createNewCollection
- Pass true
if you want the new collection has no specific filters and sorting settings. Pass false
if
you want the new collection to have the same filters and sorting settings as this collection.public java.util.List<java.lang.Integer> getCatalogIDs()
getCatalogIDs
in class MultiItemCollection
MultiItemCollection.addItemCollection(ItemCollection)
public CategoryItem getCategoryItemByID(ItemIdentifier identifier) throws ItemNotFoundException, CumulusException
identifier
- The identifier of the category item to be returned.ItemNotFoundException
- if the collection does not contain the given item.CumulusException
- on other errors.public CategoryItem getCategoryItemByID(int catalogID, int categoryID) throws ItemNotFoundException, CumulusException
CategoryItem
instance instead of an Item
instance. This method returns the same result as MultiItemCollection.getItemByID(int, int)
but
is declared to return a CategoryItem.catalogID
- The ID of the item's catalog to be returned.categoryID
- The ID of the category item to be returned.ItemNotFoundException
- if the collection does not contain the given item.CumulusException
- on other errors.public CategoryItemCollection getCategoryItemCollection(int catalogID) throws InvalidArgumentException, CumulusException
CategoryItemCollection
instance instead of an ItemCollection
instance. This method returns the same result as MultiItemCollection.getItemCollection(int)
but is declared to return a RecordItemCollection.catalogID
- The catalog ID of the collection to be returned.InvalidArgumentException
- if the catalog ID is not validCumulusException
- on other errorsMultiItemCollection.addItemCollection(ItemCollection)
,
MultiItemCollection.getItemCollection(int)
public java.util.Iterator<Item> iterator()
MultiItemCollection
for (Item item : itemCollection) { // use the item }The iterator returned allows you to remove an item consistently:
Iterator- it = iterator (); while (it.hasNext ()) { Item item = it.next (); if (!item.hasValue (GUID.UID_REC_LABEL)) { it.remove (); } }
iterator
in interface java.lang.Iterable<Item>
iterator
in class MultiItemCollection
www.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.