Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.commerce.ebusiness.catalog.sql
Interface CatalogSqlManager

All Known Implementing Classes:
  JdbcSqlManager

public interface CatalogSqlManager

The `CatalogSqlManager` interface defines the API catalog services use to read and write catalog information to a SQL compliant database.
This is an advanced (internal) class and may be subject to change.

Method Summary
`void` | `addItem(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, ProductItemKey itemKey)` Adds an item to the specified category.
`void` | `createCategory(java.sql.Connection connection, CatalogRequest request, CategoryKey parentKey, Category category)` Creates a sub category within the supplied parent category.
`void` | `createItem(java.sql.Connection connection, CatalogRequest request, ProductItem product)` Creates a new product item.
`Category[]` | `getAncestors(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the ancestors of the specified category in ascending order.
`CatalogSchemaManager` | `getCatalogSchemaManager()`
`Category[]` | `getCategories(java.sql.Connection connection, CatalogRequest request, CategoryKey[] categoryKeys)` Returns the categories with the given category keys.
`Category` | `getCategory(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the category with the given category key.
`int` | `getCategoryCount(java.sql.Connection connection, CatalogRequest request)` Returns the total number of categories in the product catalog.
`CategoryKey[]` | `getCategoryKeys(java.sql.Connection connection, CatalogRequest request, int beginIndex, int endIndex)` Returns an array of all existing category keys within the specified ordered range.
`ProductItem` | `getItem(java.sql.Connection connection, CatalogRequest request, ProductItemKey productKey)` Returns the product item with the specified key.
`int` | `getItemCount(java.sql.Connection connection, CatalogRequest request)` Returns the number of product items in the product catalog.
`int` | `getItemCount(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the number of product items associated with the specified category.
`ProductItemKey[]` | `getItemKeys(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, int beginIndex, int endIndex)` Returns an array of all product item keys of the specified category within the specified ordered range.
`ProductItemKey[]` | `getItemKeys(java.sql.Connection connection, CatalogRequest request, int beginIndex, int endIndex)` Returns an array over all existing product item keys within the specified ordered range.
`ProductItem[]` | `getItems(java.sql.Connection connection, CatalogRequest request, ProductItemKey[] productKeys)` Returns the product items with the given product item keys.
`JdbcCatalogFactory` | `getJdbcCatalogFactory()`
`java.lang.String[]` | `getKeywords(java.sql.Connection connection, CatalogRequest request, ProductItemKey productKey)` Returns the keywords associated with a given product item.
`int` | `getOrphanedItemCount(java.sql.Connection connection, CatalogRequest request)` Returns the number of orphaned items in the catalog.
`ProductItemKey[]` | `getOrphanedItemKeys(java.sql.Connection connection, CatalogRequest request, int beginIndex, int endIndex)` Returns an array of all existing orphaned category keys within the specified ordered range.
`Category` | `getParent(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the parent of the specified category.
`Category` | `getRootCategory(java.sql.Connection connection, CatalogRequest request)` Returns the root category.
`int` | `getSiblingCount(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the number of siblings associated with the specified category.
`CategoryKey[]` | `getSiblingKeys(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, int beginIndex, int endIndex)` Returns an array of all exististing sibling keys of the specified category within the specified ordered range.
`int` | `getSubCategoryCount(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Returns the number of sub categories associated with the specified category.
`CategoryKey[]` | `getSubCategoryKeys(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, int beginIndex, int endIndex)` Returns an array of all sub category keys of the specified category within the specified ordered range.
`void` | `initialize(java.lang.String schemaName)`
`void` | `moveCategory(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, CategoryKey newParentKey)` Moves the specifed category.
`void` | `removeCategory(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey)` Removes the specifed category.
`void` | `removeItem(java.sql.Connection connection, CatalogRequest request, CategoryKey categoryKey, ProductItemKey itemKey)` Removes an item from the specified category.
`void` | `removeItem(java.sql.Connection connection, CatalogRequest request, ProductItemKey productKey)` Removes a product item.
`void` | `setKeywords(java.sql.Connection connection, CatalogRequest request, ProductItemKey productKey, java.lang.String[] keywords)` Sets the keywords for a given product item.
`void` | `updateCategory(java.sql.Connection connection, CatalogRequest request, Category category)` Updates the specifed category.
`void` | `updateItem(java.sql.Connection connection, CatalogRequest request, ProductItem product)` Updates a product item.

Method Detail

### getCatalogSchemaManager

    public CatalogSchemaManager getCatalogSchemaManager()

### getJdbcCatalogFactory

    public JdbcCatalogFactory getJdbcCatalogFactory()

### initialize

    public void initialize(java.lang.String schemaName)

### getItemCount

    public int getItemCount(java.sql.Connection connection,
                            CatalogRequest request)
                     throws CatalogException,
                            java.sql.SQLException

  Returns the number of product items in the product catalog.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
  Returns:
    The number of product items in the product catalog.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getItem

    public ProductItem getItem(java.sql.Connection connection,
                               CatalogRequest request,
                               ProductItemKey productKey)
                        throws CatalogFinderException,
                               CatalogException,
                               java.sql.SQLException

  Returns the product item with the specified key.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `productKey` - The key of the target product.
  Throws:
    CatalogFinderException - if the product item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getItems

    public ProductItem[] getItems(java.sql.Connection connection,
                                  CatalogRequest request,
                                  ProductItemKey[] productKeys)
                           throws CatalogFinderException,
                                  CatalogException,
                                  java.sql.SQLException

  Returns the product items with the given product item keys.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `keys` - The keys of the target product items.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getItemKeys

    public ProductItemKey[] getItemKeys(java.sql.Connection connection,
                                        CatalogRequest request,
                                        int beginIndex,
                                        int endIndex)
                                 throws CatalogException,
                                        java.sql.SQLException

  Returns an array over all existing product item keys within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `beginIndex` - The lower bound index for returned product item keys.
    `endIndex` - The upper bound index for returned product item keys.
  Returns:
    An array of the product item keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getKeywords

    public java.lang.String[] getKeywords(java.sql.Connection connection,
                                          CatalogRequest request,
                                          ProductItemKey productKey)
                                   throws CatalogFinderException,
                                          CatalogException,
                                          java.sql.SQLException

  Returns the keywords associated with a given product item.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `productKey` - The key of the target product.
  Returns:
    The keywords associated with the given product item. If there are no keywords associated with the item, a zero length <code>String</code> array is returned.
  Throws:
    CatalogFinderException - if the product item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### setKeywords

    public void setKeywords(java.sql.Connection connection,
                            CatalogRequest request,
                            ProductItemKey productKey,
                            java.lang.String[] keywords)
                     throws CatalogFinderException,
                            CatalogException,
                            java.sql.SQLException

  Sets the keywords for a given product item.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `productKey` - The key of the target product.
    `keywords` - The keywords to associate with the given product item.
  Throws:
    CatalogFinderException - if the product item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### createItem

    public void createItem(java.sql.Connection connection,
                           CatalogRequest request,
                           ProductItem product)
                    throws CatalogCreateException,
                           CatalogException,
                           java.sql.SQLException

  Creates a new product item.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `product` - The product item to persist.
  Throws:
    CatalogCreateException - if the product item could not be created.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### updateItem

    public void updateItem(java.sql.Connection connection,
                           CatalogRequest request,
                           ProductItem product)
                    throws CatalogFinderException,
                           CatalogException,
                           java.sql.SQLException

  Updates a product item.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `product` - The product item to update.
  Throws:
    CatalogFinderException - if the product item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### removeItem

    public void removeItem(java.sql.Connection connection,
                           CatalogRequest request,
                           ProductItemKey productKey)
                    throws CatalogRemoveException,
                           CatalogFinderException,
                           CatalogException,
                           java.sql.SQLException

  Removes a product item.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `product` - The product item to remove.
  Throws:
    CatalogRemoveException - if the product item could not be removed.
    CatalogFinderException - if the product item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getRootCategory

    public Category getRootCategory(java.sql.Connection connection,
                                    CatalogRequest request)
                             throws CatalogCreateException,
                                    CatalogException,
                                    java.sql.SQLException

  Returns the root category. If the root category does not exist, it will be created.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
  Returns:
    The root category.
  Throws:
    CatalogCreateException - if the root category could not be created.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getCategoryCount

    public int getCategoryCount(java.sql.Connection connection,
                                CatalogRequest request)
                         throws CatalogException,
                                java.sql.SQLException

  Returns the total number of categories in the product catalog.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
  Returns:
    The total number of categories in the product catalog.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getItemCount

    public int getItemCount(java.sql.Connection connection,
                            CatalogRequest request,
                            CategoryKey categoryKey)
                     throws CatalogFinderException,
                            CatalogException,
                            java.sql.SQLException

  Returns the number of product items associated with the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    The number of product items associated with the specified category.
  Throws:
    CatalogFinderException - if the specified category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getSubCategoryCount

    public int getSubCategoryCount(java.sql.Connection connection,
                                   CatalogRequest request,
                                   CategoryKey categoryKey)
                            throws CatalogFinderException,
                                   CatalogException,
                                   java.sql.SQLException

  Returns the number of sub categories associated with the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    The number of sub categories associated with the specified category.
  Throws:
    CatalogFinderException - if the specified category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getSiblingCount

    public int getSiblingCount(java.sql.Connection connection,
                               CatalogRequest request,
                               CategoryKey categoryKey)
                        throws CatalogFinderException,
                               CatalogException,
                               java.sql.SQLException

  Returns the number of siblings associated with the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    The number of siblings associated with the specified category.
  Throws:
    CatalogFinderException - if the specified category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getOrphanedItemCount

    public int getOrphanedItemCount(java.sql.Connection connection,
                                    CatalogRequest request)
                             throws CatalogException,
                                    java.sql.SQLException

  Returns the number of orphaned items in the catalog.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
  Returns:
    The number of orphaned items in the catalog.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getCategory

    public Category getCategory(java.sql.Connection connection,
                                CatalogRequest request,
                                CategoryKey categoryKey)
                         throws CatalogFinderException,
                                CatalogException,
                                java.sql.SQLException

  Returns the category with the given category key.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    The category with the given category key.
  Throws:
    CatalogFinderException - if a category with the given key does not exist.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getCategories

    public Category[] getCategories(java.sql.Connection connection,
                                    CatalogRequest request,
                                    CategoryKey[] categoryKeys)
                             throws CatalogFinderException,
                                    CatalogException,
                                    java.sql.SQLException

  Returns the categories with the given category keys.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `keys` - The keys of the target categories.
  Returns:
    The categories with the given category keys.
  Throws:
    CatalogFinderException - if a category with a given key does not exist.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getCategoryKeys

    public CategoryKey[] getCategoryKeys(java.sql.Connection connection,
                                         CatalogRequest request,
                                         int beginIndex,
                                         int endIndex)
                                  throws CatalogException,
                                         java.sql.SQLException

  Returns an array of all existing category keys within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `beginIndex` - The lower bound index for returned category keys.
    `endIndex` - The upper bound index for returned category keys.
  Returns:
    An array of the category keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getSiblingKeys

    public CategoryKey[] getSiblingKeys(java.sql.Connection connection,
                                        CatalogRequest request,
                                        CategoryKey categoryKey,
                                        int beginIndex,
                                        int endIndex)
                                 throws CatalogException,
                                        java.sql.SQLException

  Returns an array of all exististing sibling keys of the specified category within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
    `beginIndex` - The lower bound index for returned sibling keys.
    `endIndex` - The upper bound index for returned sibling keys.
  Returns:
    An array of the sibling keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getSubCategoryKeys

    public CategoryKey[] getSubCategoryKeys(java.sql.Connection connection,
                                            CatalogRequest request,
                                            CategoryKey categoryKey,
                                            int beginIndex,
                                            int endIndex)
                                     throws CatalogException,
                                            java.sql.SQLException

  Returns an array of all sub category keys of the specified category within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
    `beginIndex` - The lower bound index for returned sub category keys.
    `endIndex` - The upper bound index for returned sub category keys.
  Returns:
    An array of all the sub category keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getAncestors

    public Category[] getAncestors(java.sql.Connection connection,
                                   CatalogRequest request,
                                   CategoryKey categoryKey)
                            throws CatalogException,
                                   java.sql.SQLException

  Returns the ancestors of the specified category in ascending order.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    An array of ancestor categories in ascending order.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getParent

    public Category getParent(java.sql.Connection connection,
                              CatalogRequest request,
                              CategoryKey categoryKey)
                       throws CatalogFinderException,
                              CatalogException,
                              java.sql.SQLException

  Returns the parent of the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Returns:
    The parent of the specified category.
  Throws:
    CatalogFinderException - if the parent could not be found. This could happen if the specified category does not exist or is the root category.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getItemKeys

    public ProductItemKey[] getItemKeys(java.sql.Connection connection,
                                        CatalogRequest request,
                                        CategoryKey categoryKey,
                                        int beginIndex,
                                        int endIndex)
                                 throws CatalogException,
                                        java.sql.SQLException

  Returns an array of all product item keys of the specified category within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
    `beginIndex` - The lower bound index for returned product item keys.
    `endIndex` - The upper bound index for returned product item keys.
  Returns:
    An array of all the product item keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### getOrphanedItemKeys

    public ProductItemKey[] getOrphanedItemKeys(java.sql.Connection connection,
                                                CatalogRequest request,
                                                int beginIndex,
                                                int endIndex)
                                         throws CatalogException,
                                                java.sql.SQLException

  Returns an array of all existing orphaned category keys within the specified ordered range.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `beginIndex` - The lower bound index for returned category keys.
    `endIndex` - The upper bound index for returned category keys.
  Returns:
    An array of the orphaned category keys.
  Throws:
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### createCategory

    public void createCategory(java.sql.Connection connection,
                               CatalogRequest request,
                               CategoryKey parentKey,
                               Category category)
                        throws CatalogCreateException,
                               CatalogException,
                               java.sql.SQLException

  Creates a sub category within the supplied parent category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `parentKey` - The key of the target parent category.
    `category` - The category to persist.
  Throws:
    CatalogCreateException - on category creation error.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### removeCategory

    public void removeCategory(java.sql.Connection connection,
                               CatalogRequest request,
                               CategoryKey categoryKey)
                        throws CatalogRemoveException,
                               CatalogFinderException,
                               CatalogException,
                               java.sql.SQLException

  Removes the specifed category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
  Throws:
    CatalogRemoveException - if the specified category could not be removed.
    CatalogFinderException - if the specified category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### updateCategory

    public void updateCategory(java.sql.Connection connection,
                               CatalogRequest request,
                               Category category)
                        throws CatalogFinderException,
                               CatalogException,
                               java.sql.SQLException

  Updates the specifed category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `category` - The category to update.
  Throws:
    CatalogFinderException - if the specified category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### moveCategory

    public void moveCategory(java.sql.Connection connection,
                             CatalogRequest request,
                             CategoryKey categoryKey,
                             CategoryKey newParentKey)
                      throws CatalogFinderException,
                             CatalogException,
                             java.sql.SQLException

  Moves the specifed category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of the target category.
    `parentKey` - The key of the new parent category.
  Throws:
    CatalogFinderException - if the specified target or parent category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### addItem

    public void addItem(java.sql.Connection connection,
                        CatalogRequest request,
                        CategoryKey categoryKey,
                        ProductItemKey itemKey)
                 throws CatalogFinderException,
                        CatalogException,
                        java.sql.SQLException

  Adds an item to the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of target category.
    `itemKey` - The key of the target item.
  Throws:
    CatalogFinderException - if the target category or item could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

### removeItem

    public void removeItem(java.sql.Connection connection,
                           CatalogRequest request,
                           CategoryKey categoryKey,
                           ProductItemKey itemKey)
                    throws CatalogFinderException,
                           CatalogException,
                           java.sql.SQLException

  Removes an item from the specified category.

  Parameters:
    `connection` - The database connection object.
    `request` - The catalog request object.
    `categoryKey` - The key of target category.
    `itemKey` - The key of the target item.
  Throws:
    CatalogFinderException - if the target category could not be found.
    CatalogException - on general error.
    java.sql.SQLException - on database access error.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2002 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 BEA Systems, Inc. All Rights Reserved