|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.djdoc.bo.ItemVO
public class ItemVO
The class ItemVO
is a concrete implementation of the
Item
interface. It implements the Value Object design
pattern.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.djdoc.bo.Item |
---|
Item.ItemType |
Field Summary |
---|
Fields inherited from interface net.sf.djdoc.bo.Hittable |
---|
FAVORITE, NATURAL, RECENT |
Constructor Summary | |
---|---|
protected |
ItemVO()
Protected no-argument constructor; overridden by the ItemEntity
class. |
|
ItemVO(Item that)
Public copy constructor. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
Comparison method for two ItemVO s. |
int |
getHitCount()
Getter method for this ItemVO 's hit count. |
java.util.Date |
getHitDate()
Getter method for this ItemVO 's hit date. |
java.lang.String |
getName()
Getter method for this ItemVO 's name. |
Item.ItemType |
getType()
Getter method for this ItemVO 's item type. |
void |
hit()
This method marks this ItemVO as hit. |
void |
setHitCount(int hitCount)
Setter method for this ItemVO 's hit count. |
void |
setHitDate(java.util.Date hitDate)
Setter method for this ItemVO 's hit date. |
void |
setName(java.lang.String name)
Setter method for this ItemVO 's name. |
void |
setType(Item.ItemType type)
Setter method for this ItemVO 's item type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ItemVO(Item that)
that
- The Item
instance whose attribute values are to be
copied to this ItemVO
object.protected ItemVO()
ItemEntity
class.
Method Detail |
---|
public java.lang.String getName()
ItemVO
's name.
getName
in interface Item
ItemVO
public void setName(java.lang.String name)
ItemVO
's name.
name
- The name of this ItemVO
objectpublic Item.ItemType getType()
ItemVO
's item type.
getType
in interface Item
ItemVO
public void setType(Item.ItemType type)
ItemVO
's item type.
type
- The item type of this ItemVO
public int getHitCount()
ItemVO
's hit count.
getHitCount
in interface Hittable
ItemVO
has been hitpublic void setHitCount(int hitCount)
ItemVO
's hit count.
setHitCount
in interface Hittable
hitCount
- The total number of times this ItemVO
has
been hitpublic java.util.Date getHitDate()
ItemVO
's hit date.
getHitDate
in interface Hittable
ItemVO
has been hit lastpublic void setHitDate(java.util.Date hitDate)
ItemVO
's hit date.
setHitDate
in interface Hittable
hitDate
- The date at which this ItemVO
has been hit
lastpublic void hit()
ItemVO
as hit. It adjusts its hit
count and hit date accordingly.
hit
in interface Hittable
public int compareTo(java.lang.Object obj)
ItemVO
s. It compares the two
objects by the combination of their item types and their names.
compareTo
in interface java.lang.Comparable
obj
- An ItemVO
object to compare this object to
ItemVO
is smaller than that of the second ItemVO
;
a positive number in the reverse case. If the two ItemVO
s
have the same item type, the return value is the result of the
lexicographical comparison of the names of the two ItemVO
s.
|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |