DJDoc v.1.0.0b-1

net.sf.djdoc.bo
Class BunchHitEntity

java.lang.Object
  extended by net.sf.djdoc.bo.BunchHitEntity
All Implemented Interfaces:
BusinessObject

public class BunchHitEntity
extends java.lang.Object
implements BusinessObject

The BunchHitEntity is a persistence capable (via Hibernate) class. It implements a typical m-to-n-relationship between two other persistent classes (in this case, BunchEntity and UserEntity) with two additional attributes keeping track of the number of times and the last date the referenced user has accessed the referenced package.


Constructor Summary
BunchHitEntity()
           
 
Method Summary
static BunchHitEntity findByBunchAndUser(BunchEntity bunch, UserEntity user)
          "Finder" method retrieving a particular BunchHitEntity from the database by the package and the user it references.
 Bunch getBunch()
          Getter method for the Bunch this BunchHitEntity references.
 int getHitCount()
          Getter method for this BunchHitEntity's hit count.
 java.util.Date getHitDate()
          Getter method for this BunchHitEntity's hit date.
 int getId()
          Getter method for this BunchHitEntity's internal ID.
 User getUser()
          Getter method for the User this BunchHitEntity references.
static java.util.List<BunchHitEntity> selectByApiAndUser(ApiEntity api, UserEntity user)
          "Selector" method retrieving all BunchHitEntity objects with a given ApiEntity and UserEntity from the database.
 void setBunch(Bunch bunch)
          Setter method for the Bunch this BunchHitEntity references.
 void setHitCount(int hitCount)
          Setter method for this BunchHitEntity's hit count.
 void setHitDate(java.util.Date hitDate)
          Setter method for this BunchHitEntity's hit date.
 void setId(int id)
          Setter method for this BunchHitEntity's internal ID.
 void setUser(UserEntity user)
          Setter method for the User this BunchHitEntity references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BunchHitEntity

public BunchHitEntity()
Method Detail

selectByApiAndUser

public static java.util.List<BunchHitEntity> selectByApiAndUser(ApiEntity api,
                                                                UserEntity user)
"Selector" method retrieving all BunchHitEntity objects with a given ApiEntity and UserEntity from the database.

Parameters:
api - The ApiEntity of the objects to be selected
user - The UserEntity of the objects to be selected
Returns:
A List of all BunchHitEntity objects with given ApiEntity and UserEntity

findByBunchAndUser

public static BunchHitEntity findByBunchAndUser(BunchEntity bunch,
                                                UserEntity user)
"Finder" method retrieving a particular BunchHitEntity from the database by the package and the user it references.

Parameters:
bunch - The BunchEntity referenced by the BunchHitEntity to be found
user - The UserEntity referenced by the BunchHitEntity to be found
Returns:
The BunchHitEntity with the given package and user

getId

public int getId()
Getter method for this BunchHitEntity's internal ID.

Specified by:
getId in interface BusinessObject
Returns:
The internal ID of this BunchHitEntity

setId

public void setId(int id)
Setter method for this BunchHitEntity's internal ID.

Parameters:
id - The internal ID of this BunchHitEntity

getHitCount

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

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

setHitCount

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

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

getHitDate

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

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

setHitDate

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

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

getBunch

public Bunch getBunch()
Getter method for the Bunch this BunchHitEntity references.

Returns:
This BunchHitEntity's Bunch object

setBunch

public void setBunch(Bunch bunch)
Setter method for the Bunch this BunchHitEntity references.

Parameters:
bunch - This BunchHitEntity's Bunch object

getUser

public User getUser()
Getter method for the User this BunchHitEntity references.

Returns:
This BunchHitEntity's User object

setUser

public void setUser(UserEntity user)
Setter method for the User this BunchHitEntity references.

Parameters:
user - This BunchHitEntity's User object

DJDoc v.1.0.0b-1