DJDoc v.1.0.0b-1

net.sf.djdoc.bo
Interface Hittable

All Superinterfaces:
java.lang.Comparable
All Known Subinterfaces:
Bunch, Item
All Known Implementing Classes:
BunchEntity, BunchVO, ItemEntity, ItemVO

public interface Hittable
extends java.lang.Comparable

The Hittable interface is associated with objects that may be hit, i.e. that have clickable hyperlinks on some HTML page. Moreover, Hittable objects keep track of the total number of times they have been hit as well as at what time they have been hit for the last time.


Field Summary
static java.util.Comparator<Hittable> FAVORITE
          A Comparator for sorting Hittable objects by the total number they have been hit so far (in descending order).
static java.util.Comparator<Hittable> NATURAL
          A Comparator for sorting Hittable objects by their respective natural order.
static java.util.Comparator<Hittable> RECENT
          A Comparator for sorting Hittable objects by the time they have been hit for the last time (in descending order).
 
Method Summary
 int getHitCount()
          Getter method for this Hittable object's hit count.
 java.util.Date getHitDate()
          Getter method for this Hittable object's hit date.
 void hit()
          This method marks this Hittable object as hit.
 void setHitCount(int hitCount)
          Setter method for this Hittable object's hit count.
 void setHitDate(java.util.Date hitDate)
          Setter method for this Hittable object's hit date.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

NATURAL

static final java.util.Comparator<Hittable> NATURAL
A Comparator for sorting Hittable objects by their respective natural order.


FAVORITE

static final java.util.Comparator<Hittable> FAVORITE
A Comparator for sorting Hittable objects by the total number they have been hit so far (in descending order).


RECENT

static final java.util.Comparator<Hittable> RECENT
A Comparator for sorting Hittable objects by the time they have been hit for the last time (in descending order).

Method Detail

getHitCount

int getHitCount()
Getter method for this Hittable object's hit count.

Returns:
The total number of times this object has been hit

setHitCount

void setHitCount(int hitCount)
Setter method for this Hittable object's hit count.

Parameters:
hitCount - The total number of times this object has been hit

getHitDate

java.util.Date getHitDate()
Getter method for this Hittable object's hit date.

Returns:
The date at which this object has been hit last

setHitDate

void setHitDate(java.util.Date hitDate)
Setter method for this Hittable object's hit date.

Parameters:
hitDate - The date at which this object has been hit last

hit

void hit()
This method marks this Hittable object as hit. It adjusts its hit count and hit date accordingly.


DJDoc v.1.0.0b-1