it.dtt.ca.history
Class HistoryItem

java.lang.Object
  extended by it.dtt.ca.history.HistoryItem
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Message, ProductHistoryItem, RechargeHistoryItem

public class HistoryItem
extends java.lang.Object
implements java.io.Serializable

This is the base class for object describing the history

See Also:
Serialized Form

Field Summary
static int DISPOSED
          constant indicating an item marked as disposed.
static int READ
          constant indicating that the item has been read.
static int UNREAD
          constant indicating that the item is unread.
 
Constructor Summary
protected HistoryItem(int status, java.util.Date date)
          Create an history item.
 
Method Summary
 java.util.Date getDate()
          Informs when the specific item was stored in the history log.
 int getStatus()
          Get the status of this history item.
 void markDisposed()
          Mark the item as disposed.
 void markRead()
          Mark the item as read;
 void markUnread()
          Mark the item as unread;
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNREAD

public static final int UNREAD
constant indicating that the item is unread.

See Also:
Constant Field Values

READ

public static final int READ
constant indicating that the item has been read.

See Also:
Constant Field Values

DISPOSED

public static final int DISPOSED
constant indicating an item marked as disposed.

See Also:
Constant Field Values
Constructor Detail

HistoryItem

protected HistoryItem(int status,
                      java.util.Date date)
Create an history item.

Parameters:
status - the status of this item in the history log, either READ, UNREAD, or DISPOSED.
date - the time and date of storage of the item in the history log.
Method Detail

getDate

public java.util.Date getDate()
Informs when the specific item was stored in the history log.

Returns:
time and date of storage of the item in the history log.

markDisposed

public void markDisposed()
Mark the item as disposed. Any subsequent call of getStatus() will return "DELETED".


markRead

public void markRead()
Mark the item as read;


markUnread

public void markUnread()
Mark the item as unread;


getStatus

public int getStatus()
Get the status of this history item. Can be any value defined in this class (e.g. UNREAD).

Returns:
the item status.