|
Großmarkt | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.AbstractNameable
data.ooimpl.CatalogItemImpl
market.statistics.CISalesStats
public class CISalesStats
Represents a statistics for one article of the market's offer.
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 | |
---|---|
CISalesStats(String articleID,
int revenue,
int amount)
|
Method Summary | |
---|---|
void |
addAmount(int amount)
Increases the saved amount of sold items. |
void |
addRevenue(int revenue)
Increases the revenue made from this article. |
void |
appendOrderHistory(List<HistoryEntry> oh)
Concatenates an external order history with this one. |
void |
appendPriceHistory(List<HistoryEntry> ph)
Concatenates an external price history with this one. |
int |
getAmount()
|
String |
getArticleID()
|
HistoryEntry |
getLastEntry(List l)
|
int |
getOrderAmount()
Iterates over the order history and sums up the amount of bought items. |
List<HistoryEntry> |
getOrderHistory()
|
List<HistoryEntry> |
getPriceHistory()
Returns the price history. |
int |
getRevenue()
|
CatalogItemImpl |
getShallowClone()
|
void |
newPriceSet(Calendar date,
int newPrice)
Appends a new entry to the priceHistory . |
void |
ordered(Calendar date,
int amount)
Appends a new entry to the orderHistory . |
String |
toString()
|
Methods inherited from class data.ooimpl.CatalogItemImpl |
---|
addValueListener, compareTo, equals, getCatalog, getValue, isEditable, removeValueListener, setValue |
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 |
---|
public CISalesStats(String articleID, int revenue, int amount)
articleID
- the ID of the article statistics. It must match the real article's ID.revenue
- the revenue made from this article.amount
- the amount of sold items.Method Detail |
---|
public String getArticleID()
public int getRevenue()
public int getAmount()
public List<HistoryEntry> getPriceHistory()
priceHistory
.
public List<HistoryEntry> getOrderHistory()
public HistoryEntry getLastEntry(List l)
l
- the history (orderHistory
or priceHistory
)list of which the
last item is of interest.
public void addAmount(int amount)
amount
- the amount of itmes to add.public void addRevenue(int revenue)
revenue
- the revenue to be added.public void newPriceSet(Calendar date, int newPrice)
priceHistory
.
date
- the date of the price change.newPrice
- the new price.public void ordered(Calendar date, int amount)
orderHistory
.
date
- the date of the price change.amount
- the amount orderedpublic void appendPriceHistory(List<HistoryEntry> ph)
ph
- the price history to be added.public void appendOrderHistory(List<HistoryEntry> oh)
oh
- the order history to be added.public int getOrderAmount()
public CatalogItemImpl getShallowClone()
getShallowClone
in class CatalogItemImpl
public String toString()
toString
in class CatalogItemImpl
|
Großmarkt | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |