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
CIArticle
public CIArticle(String id,
String name,
String category,
int bid,
int offer)
- Parameters:
id - ID of the CIArticle.name - name of the CIArticlecategory - 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 CIArticlecategory - 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.
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.