Videoautomat

videoautomat
Class VideoCassette

java.lang.Object
  |
  +--data.AbstractNameable
        |
        +--data.ooimpl.StockItemImpl
              |
              +--videoautomat.VideoCassette
All Implemented Interfaces:
Cloneable, Comparable, data.DataBasketKeys, data.Nameable, Serializable, data.StockItem

public class VideoCassette
extends data.ooimpl.StockItemImpl

This class implements a StockItem, representing a rented video, including the Date when it was rented

See Also:
Serialized Form

Field Summary
 
Fields inherited from class data.AbstractNameable
m_ncContext, m_pcsPropertyListeners
 
Fields inherited from interface data.Nameable
NAME_PROPERTY
 
Fields inherited from interface data.DataBasketKeys
CATALOG_ITEM_MAIN_KEY, STOCK_ITEM_MAIN_KEY
 
Constructor Summary
VideoCassette(String key)
          Constructs a new VideoCassette with the given name and the current time as renting time
 
Method Summary
 data.NumberValue getCost()
           
 int getDays()
           
 
Methods inherited from class data.ooimpl.StockItemImpl
clone, compareTo, equals, getAssociatedItem, getShallowClone, getStock, setStock, toString
 
Methods inherited from class data.AbstractNameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface data.Nameable
addNameListener, addPropertyChangeListener, attach, detachNC, getName, removeNameListener, removePropertyChangeListener, setName
 

Constructor Detail

VideoCassette

public VideoCassette(String key)
Constructs a new VideoCassette with the given name and the current time as renting time

Parameters:
key - the name of the video
Method Detail

getDays

public int getDays()
Returns:
the days this video is already rented, in the case of 0 days it returns 1.

getCost

public data.NumberValue getCost()
Returns:
the cost for this video from the day of renting to the current Date

Videoautomat