DJDoc v.1.0.0b-1

net.sf.djdoc.bo
Class BunchVO

java.lang.Object
  extended by net.sf.djdoc.bo.BunchVO
All Implemented Interfaces:
java.lang.Comparable, Bunch, Hittable
Direct Known Subclasses:
BunchEntity

public class BunchVO
extends java.lang.Object
implements Bunch

The class BunchVO is a concrete implementation of the Bunch interface. It implements the Value Object design pattern.


Field Summary
 
Fields inherited from interface net.sf.djdoc.bo.Hittable
FAVORITE, NATURAL, RECENT
 
Constructor Summary
protected BunchVO()
          Protected no-argument constructor; overridden by the BunchEntity class.
  BunchVO(Bunch that)
          Public copy constructor.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Comparison method for two BunchVOs.
 int getHitCount()
          Getter method for this BunchVO's hit count.
 java.util.Date getHitDate()
          Getter method for this BunchVO's hit date.
 java.lang.String getName()
          Getter method for this BunchVO's name.
 void hit()
          This method marks this BunchVO as hit.
 void setHitCount(int hitCount)
          Setter method for this BunchVO's hit count.
 void setHitDate(java.util.Date hitDate)
          Setter method for this BunchVO's hit date.
 void setName(java.lang.String name)
          Setter method for this BunchVO's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BunchVO

public BunchVO(Bunch that)
Public copy constructor.

Parameters:
that - The Bunch instance whose attribute values are to be copied to this BunchVO object.

BunchVO

protected BunchVO()
Protected no-argument constructor; overridden by the BunchEntity class.

Method Detail

getName

public java.lang.String getName()
Getter method for this BunchVO's name.

Specified by:
getName in interface Bunch
Returns:
The name of this BunchVO object

setName

public void setName(java.lang.String name)
Setter method for this BunchVO's name.

Parameters:
name - The name of this BunchVO object

getHitCount

public int getHitCount()
Getter method for this BunchVO's hit count.

Specified by:
getHitCount in interface Hittable
Returns:
The total number of times this BunchVO has been hit

setHitCount

public void setHitCount(int hitCount)
Setter method for this BunchVO's hit count.

Specified by:
setHitCount in interface Hittable
Parameters:
hitCount - The total number of times this BunchVO has been hit

getHitDate

public java.util.Date getHitDate()
Getter method for this BunchVO's hit date.

Specified by:
getHitDate in interface Hittable
Returns:
The date at which this BunchVO has been hit last

setHitDate

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

Specified by:
setHitDate in interface Hittable
Parameters:
hitDate - The date at which this BunchVO has been hit last

hit

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

Specified by:
hit in interface Hittable

compareTo

public int compareTo(java.lang.Object obj)
Comparison method for two BunchVOs. It compares the two objects by their names.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - A BunchVO object to compare this object to
Returns:
The result of the lexicographical comparison of the names of this BunchVO and the other BunchVO

DJDoc v.1.0.0b-1