Interface CategoryMapper

All Known Implementing Classes:

public interface CategoryMapper

Class that maps a lucene document id to a particular Category.

Method Summary
 Category getCategory(int docId, Set<Category> categories)
          Returns the Category that this docId belongs to.

Method Detail


Category getCategory(int docId,
                     Set<Category> categories)
Returns the Category that this docId belongs to. It must be one of ones specified in the passed in set of categories.

docId - the id to find a category for
categories - confines category mapping to those categories contained in this set
the category for this docId. If a category is found that does not belong in the specified categories, or no category was found for this docId, then null is returned.
IllegalArgumentException - if the docId is not zero or greater.

Copyright © 2003-2011 Atlassian. All Rights Reserved.