hu.midori.kosmos.model.util
Class TimestampedEntity

java.lang.Object
  extended by hu.midori.kosmos.model.util.IdentifiedEntity
      extended by hu.midori.kosmos.model.util.TimestampedEntity
Direct Known Subclasses:
CcProject, SfRelease, SvnRepository

public class TimestampedEntity
extends IdentifiedEntity

TODO rename, move Wraps a Confluence page.

Version:
$Id$
Author:
Aron Gombas

Constructor Summary
TimestampedEntity()
          By design this should be private to avoid instantiation without discriminator, but Hessian needs default ctor.
TimestampedEntity(java.lang.String discriminator, java.util.Date dateCreated)
           
TimestampedEntity(java.lang.String discriminator, java.util.Date dateCreated, java.util.Date dateLastTouched)
           
 
Method Summary
 long getAge()
          Returns its age in milliseconds.
 long getAgeInDays()
          Returns its age in days.
 java.util.Date getDateCreated()
          Can be overriden if it is a computed field.
 java.util.Date getDateLastTouched()
          Can be overriden if it is a computed field.
 long getLatestTouchAge()
          Returns the age of its latest touch in milliseconds.
 long getLatestTouchAgeInDays()
          Returns the age of its latest touch in days.
 
Methods inherited from class hu.midori.kosmos.model.util.IdentifiedEntity
getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimestampedEntity

public TimestampedEntity()
By design this should be private to avoid instantiation without discriminator, but Hessian needs default ctor.


TimestampedEntity

public TimestampedEntity(java.lang.String discriminator,
                         java.util.Date dateCreated)

TimestampedEntity

public TimestampedEntity(java.lang.String discriminator,
                         java.util.Date dateCreated,
                         java.util.Date dateLastTouched)
Method Detail

getDateCreated

public java.util.Date getDateCreated()
Can be overriden if it is a computed field.


getDateLastTouched

public java.util.Date getDateLastTouched()
Can be overriden if it is a computed field.


getAge

public long getAge()
Returns its age in milliseconds.


getAgeInDays

public long getAgeInDays()
Returns its age in days.


getLatestTouchAge

public long getLatestTouchAge()
Returns the age of its latest touch in milliseconds.


getLatestTouchAgeInDays

public long getLatestTouchAgeInDays()
Returns the age of its latest touch in days.