Package org.apache.beehive.samples.petstore.controls.exceptions

Examples of org.apache.beehive.samples.petstore.controls.exceptions.InvalidIdentifierException


    public Category getCategory(String key) throws InvalidIdentifierException
    {
    Category cat = new Category();
    cat = _catalogDao.getCategory(key);
    if (cat == null)
      throw new InvalidIdentifierException("Category: " + key + " not found!");
    return cat;
    }
View Full Code Here


    public Item getItem(String key) throws InvalidIdentifierException
    {
    Item item = new Item();
    item = _catalogDao.getItem(key);
    if (item == null)
      throw new InvalidIdentifierException("Item: " + key + " not found!");
    return item;
    }
View Full Code Here

    }

    public void updateItemQuantity(Item item, int quantity) throws InvalidIdentifierException
    {
        if(item == null)
            throw new InvalidIdentifierException("cannot update Item inventory with null or empty itemId");

    item.setQty(item.getQty() - quantity);

    _catalogDao.updateItemQuantity(item.getItemId(), item.getQty());
    }
View Full Code Here

    public Product getProduct(String key) throws InvalidIdentifierException
    {
    Product prod = new Product();
    prod = _catalogDao.getProduct(key);
    if (prod == null)
      throw new InvalidIdentifierException("Product: " + key + " not found!");
    return prod;
    }
View Full Code Here

TOP

Related Classes of org.apache.beehive.samples.petstore.controls.exceptions.InvalidIdentifierException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.