Großmarkt

market
Class CIArticle

java.lang.Object
  |
  +--data.AbstractNameable
        |
        +--data.ooimpl.CatalogItemImpl
              |
              +--market.CIArticle
All Implemented Interfaces:
CatalogItem, Cloneable, Comparable, DataBasketKeys, Nameable, Serializable

public class CIArticle
extends CatalogItemImpl

A CatalogItemImpl that represents the articles of the market.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class data.AbstractNameable
m_ncContext, m_pcsPropertyListeners
 
Fields inherited from interface data.CatalogItem
VALUE_PROPERTY
 
Fields inherited from interface data.Nameable
NAME_PROPERTY
 
Fields inherited from interface data.DataBasketKeys
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY
 
Constructor Summary
CIArticle(String id, String name, String category, IntegerValue bid, IntegerValue offer)
           
CIArticle(String id, String name, String category, int bid, int offer)
           
 
Method Summary
 int compareTo(Object o)
          Specifies how to compare CIArticles.
 String getArticleName()
           
 int getBid()
           
static CatalogItemValue getCatalogItemValue()
           
 String getCategory()
           
 String[] getDescription()
           
 int getOffer()
           
protected  CatalogItemImpl getShallowClone()
           
 void setArticleName(String name)
          Sets the name of the article.
 void setBid(Value vBid)
          Sets the article's bid.
 void setDescription(String[] description)
          Set the description of the article.
 
Methods inherited from class data.ooimpl.CatalogItemImpl
addValueListener, equals, getCatalog, getValue, isEditable, removeValueListener, setValue, toString
 
Methods inherited from class data.AbstractNameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface data.Nameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 

Constructor Detail

CIArticle

public CIArticle(String id,
                 String name,
                 String category,
                 int bid,
                 int offer)
Parameters:
id - ID of the CIArticle.
name - name of the CIArticle
category - the CIArticle's category.
bid - the price a customer has to pay for this CIArticle.
offer - the cost of this CIArticle when the manager orders it.

CIArticle

public CIArticle(String id,
                 String name,
                 String category,
                 IntegerValue bid,
                 IntegerValue offer)
Parameters:
id - ID of the CIArticle.
name - name of the CIArticle
category - the CIArticle's category.
bid - the price a customer has to pay for this CIArticle.
offer - the cost of this CIArticle when the manager orders it.
Method Detail

setArticleName

public void setArticleName(String name)
Sets the name of the article.

Parameters:
name - the article's name.

setDescription

public void setDescription(String[] description)
Set the description of the article.

Parameters:
description - the description of this article.

getArticleName

public String getArticleName()
Returns:
the article's name.

getCategory

public String getCategory()
Returns:
the article's category.

getDescription

public String[] getDescription()
Returns:
the description of this article.

getOffer

public int getOffer()
Returns:
the article's offer.

getBid

public int getBid()
Returns:
the article's bid.

setBid

public void setBid(Value vBid)
Sets the article's bid.

Parameters:
vBid - the new bid.

getCatalogItemValue

public static CatalogItemValue getCatalogItemValue()
Returns:
a CatalogItemValue which returns the bid of a CIArticle.

getShallowClone

protected CatalogItemImpl getShallowClone()
Specified by:
getShallowClone in class CatalogItemImpl
Returns:
an identical clone of the given CatalogItemImpl

compareTo

public int compareTo(Object o)
Specifies how to compare CIArticles.

Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class CatalogItemImpl
Parameters:
o - the object to be compared with this CIArticle.
Returns:
an int representing the result of the comparison.

Großmarkt