|
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.ItemHitEntity
public class ItemHitEntity
The ItemHitEntity
is a persistence capable (via Hibernate)
class. It implements a typical m-to-n-relationship between two other
persistent classes (in this case, ItemEntity
and UserEntity
)
with two additional attributes keeping track of the number of times and
the last date the referenced user has accessed the referenced item.
Constructor Summary | |
---|---|
ItemHitEntity()
|
Method Summary | |
---|---|
static ItemHitEntity |
findByItemAndUser(ItemEntity item,
UserEntity user)
"Finder" method retrieving a particular ItemHitEntity from
the database by the item and the user it references. |
int |
getHitCount()
Getter method for this ItemHitEntity 's hit count. |
java.util.Date |
getHitDate()
Getter method for this ItemHitEntity 's hit date. |
int |
getId()
Getter method for this ItemHitEntity 's internal ID. |
Item |
getItem()
Getter method for the Item this ItemHitEntity
references. |
User |
getUser()
Getter method for the User this ItemHitEntity
references. |
static java.util.List<ItemHitEntity> |
selectByBunchAndUser(BunchEntity bunch,
UserEntity user)
"Selector" method retrieving all ItemHitEntity objects with
a given BunchEntity and UserEntity from the
database. |
void |
setHitCount(int hitCount)
Setter method for this ItemHitEntity 's hit count. |
void |
setHitDate(java.util.Date hitDate)
Setter method for this ItemHitEntity 's hit date. |
void |
setId(int id)
Setter method for this ItemHitEntity 's internal ID. |
void |
setItem(Item item)
Setter method for the Item this ItemHitEntity
references. |
void |
setUser(User user)
Setter method for the User this ItemHitEntity
references. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ItemHitEntity()
Method Detail |
---|
public static java.util.List<ItemHitEntity> selectByBunchAndUser(BunchEntity bunch, UserEntity user)
ItemHitEntity
objects with
a given BunchEntity
and UserEntity
from the
database.
bunch
- The BunchEntity
of the objects to be selecteduser
- The UserEntity
of the objects to be selected
List
of all ItemHitEntity
objects with
given BunchEntity
and UserEntity
public static ItemHitEntity findByItemAndUser(ItemEntity item, UserEntity user)
ItemHitEntity
from
the database by the item and the user it references.
item
- The ItemEntity
referenced by the
ItemHitEntity
to be founduser
- The UserEntity
referenced by the
ItemhHitEntity
to be found
ItemHitEntity
with the given item and userpublic int getId()
ItemHitEntity
's internal ID.
getId
in interface BusinessObject
ItemHitEntity
public void setId(int id)
ItemHitEntity
's internal ID.
id
- The internal ID of this ItemHitEntity
public int getHitCount()
ItemHitEntity
's hit count.
public void setHitCount(int hitCount)
ItemHitEntity
's hit count.
hitCount
- The total number of times this object has been hitpublic java.util.Date getHitDate()
ItemHitEntity
's hit date.
public void setHitDate(java.util.Date hitDate)
ItemHitEntity
's hit date.
hitDate
- The date at which this object has been hit lastpublic Item getItem()
Item
this ItemHitEntity
references.
ItemHitEntity
's Item
objectpublic void setItem(Item item)
Item
this ItemHitEntity
references.
item
- This ItemHitEntity
's Item
objectpublic User getUser()
User
this ItemHitEntity
references.
ItemHitEntity
's User
objectpublic void setUser(User user)
User
this ItemHitEntity
references.
user
- This ItemHitEntity
's User
object
|
DJDoc v.1.0.0b-1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |