001 package data; 002 003 /** 004 * An item in a {@link Stock}. 005 * 006 * <p>StockItems describe actually available items. They refer to a {@link CatalogItem} and describe an item 007 * of the CatalogItem's type that is actually available in a Shop's storage, on an order form etc.</p> 008 * 009 * <p><strong>Note</strong> that the name as obtained via {@link Nameable#getName} is used as the StockItem's 010 * key when inserting the StockItem in a Stock.</p> 011 * 012 * <p>Stocks are a special form of StockItems.</p> 013 * 014 * @author Steffen Zschaler 015 * @version 2.0 18/08/1999 016 * @since v2.0 017 */ 018 public interface StockItem extends Cloneable, Comparable<Object>, Nameable { 019 020 /** 021 * Get the Stock that contains this StockItem. 022 * 023 * @override Always 024 */ 025 public Stock getStock(); 026 027 /** 028 * Get the CatalogItem that is associated to this StockItem. 029 * 030 * @param db the DataBasket that is used for checking visibility. 031 * 032 * @override Always 033 */ 034 public CatalogItem getAssociatedItem(DataBasket db); 035 036 /** 037 * Clone the StockItem. 038 * 039 * @override Always 040 */ 041 public Object clone(); 042 }