com.sun.j2ee.blueprints.shoppingcart.catalog.model
Class CatalogModel

java.lang.Object
  |
  +--com.sun.j2ee.blueprints.shoppingcart.catalog.model.CatalogModel
Direct Known Subclasses:
CatalogEJB, CatalogWebImpl

public class CatalogModel
extends java.lang.Object

This class implements the CatalogModel interface in order to provide methods to browse and search the pet's catalog in the Java Pet Store Demo. This class uses the CatalogDAO object to access the data base for the pet store. Users of this object must call the init method before invoking methods

See Also:
CatalogDAO

Field Summary
protected  CatalogDAO dao
           
 
Constructor Summary
CatalogModel()
           
 
Method Summary
 void destroy()
           
 ListChunk getCategories(int stIndex, int count, java.util.Locale locale)
           
 Category getCategory(java.lang.String categoryId, java.util.Locale locale)
           
 Item getItem(java.lang.String itemId, java.util.Locale locale)
           
 ListChunk getItems(java.lang.String productId, int startIndex, int count, java.util.Locale locale)
           
 Product getProduct(java.lang.String productId, java.util.Locale locale)
           
 ListChunk getProducts(java.lang.String categoryId, int startIndex, int count, java.util.Locale locale)
           
 void init()
          Users of CatalogModel must call the init method before invoking other methods
 ListChunk searchProducts(java.util.Collection keyWords, int startIndex, int count, java.util.Locale locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dao

protected CatalogDAO dao
Constructor Detail

CatalogModel

public CatalogModel()
Method Detail

init

public void init()
          throws java.lang.RuntimeException
Users of CatalogModel must call the init method before invoking other methods

destroy

public void destroy()

getCategory

public Category getCategory(java.lang.String categoryId,
                            java.util.Locale locale)
                     throws java.lang.RuntimeException

getCategories

public ListChunk getCategories(int stIndex,
                               int count,
                               java.util.Locale locale)
                        throws java.lang.RuntimeException

getProducts

public ListChunk getProducts(java.lang.String categoryId,
                             int startIndex,
                             int count,
                             java.util.Locale locale)
                      throws java.lang.RuntimeException

getProduct

public Product getProduct(java.lang.String productId,
                          java.util.Locale locale)
                   throws java.lang.RuntimeException

getItems

public ListChunk getItems(java.lang.String productId,
                          int startIndex,
                          int count,
                          java.util.Locale locale)
                   throws java.lang.RuntimeException

getItem

public Item getItem(java.lang.String itemId,
                    java.util.Locale locale)
             throws java.lang.RuntimeException

searchProducts

public ListChunk searchProducts(java.util.Collection keyWords,
                                int startIndex,
                                int count,
                                java.util.Locale locale)
                         throws java.lang.RuntimeException


Copyright © 2000 Sun Microsystems Inc. All Rights Reserved.