KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > example > ajax > catalog > Catalog


1 /*
2  * Copyright (c) 2005 Your Corporation. All Rights Reserved.
3  */

4 package com.opensymphony.webwork.example.ajax.catalog;
5
6 import java.util.Set JavaDoc;
7
8 /**
9  * Catalog
10  *
11  * @author Jason Carreira <jcarreira@eplus.com>
12  */

13 public interface Catalog extends Identifiable {
14     /**
15      * Get a Set of all {@link Category}s in this Catalog.
16      */

17     Set JavaDoc findAllCategories();
18
19     /**
20      * Get a Set of all {@link Product}s in this Catalog.
21      *
22      * @return all {@link Product}s in this Catalog. Will not be null.
23      */

24     Set JavaDoc findAllProducts();
25
26     /**
27      * Get the {@link Category} for the given Id.
28      *
29      * @param id the Category Id
30      * @return the {@link Category} for this Id, or null if none exists.
31      */

32     Category findCategoryForId(Integer JavaDoc id);
33
34     /**
35      * Find the {@link Product} for the given Id
36      *
37      * @param productId the Product id
38      * @return the {@link Product} for this Id, or null if none exists.
39      */

40     Product findProductById(Integer JavaDoc productId);
41
42
43     /**
44      * Find all {@link Product}s for the given {@link Category}
45      *
46      * @param category the category of products to return
47      * @return a Set of {@link Product}s in this {@link Category}. Will not be null.
48      */

49     Set JavaDoc findProductsByCategory(Category category);
50 }
51
52
Popular Tags