org.synyx.hades.domain.auditing
Class AbstractAuditable<U,PK extends java.io.Serializable>

java.lang.Object
  extended by org.synyx.hades.domain.AbstractPersistable<PK>
      extended by org.synyx.hades.domain.auditing.AbstractAuditable<U,PK>
Type Parameters:
U - the auditing type. Typically some kind of user.
PK - the type of the auditing type's idenifier
All Implemented Interfaces:
java.io.Serializable, Auditable<U,PK>, Persistable<PK>

public abstract class AbstractAuditable<U,PK extends java.io.Serializable>
extends AbstractPersistable<PK>
implements Auditable<U,PK>

Abstract base class for auditable entities. Stores the audition values in persistent fields.

Author:
Oliver Gierke
See Also:
Serialized Form

Constructor Summary
AbstractAuditable()
           
 
Method Summary
 U getCreatedBy()
          Returns the user who created this entity.
 org.joda.time.DateTime getCreatedDate()
          Returns the creation date of the entity.
 U getLastModifiedBy()
          Returns the user who modified the entity lastly.
 org.joda.time.DateTime getLastModifiedDate()
          Returns the date of the last modification.
 void setCreated(org.joda.time.DateTime createdDate)
          Sets the creation date of the entity.
 void setCreatedBy(U createdBy)
          Sets the user who created this entity.
 void setLastModified(org.joda.time.DateTime lastModifiedDate)
          Sets the date of the last modification.
 void setLastModifiedBy(U lastModifiedBy)
          Sets the user who modified the entity lastly.
 
Methods inherited from class org.synyx.hades.domain.AbstractPersistable
equals, getId, hashCode, isNew, setId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.synyx.hades.domain.Persistable
getId, isNew
 

Constructor Detail

AbstractAuditable

public AbstractAuditable()
Method Detail

getCreatedBy

public U getCreatedBy()
Description copied from interface: Auditable
Returns the user who created this entity.

Specified by:
getCreatedBy in interface Auditable<U,PK extends java.io.Serializable>
Returns:
the createdBy

setCreatedBy

public void setCreatedBy(U createdBy)
Description copied from interface: Auditable
Sets the user who created this entity.

Specified by:
setCreatedBy in interface Auditable<U,PK extends java.io.Serializable>
Parameters:
createdBy - the creating entity to set

getCreatedDate

public org.joda.time.DateTime getCreatedDate()
Description copied from interface: Auditable
Returns the creation date of the entity.

Specified by:
getCreatedDate in interface Auditable<U,PK extends java.io.Serializable>
Returns:
the createdDate

setCreated

public void setCreated(org.joda.time.DateTime createdDate)
Description copied from interface: Auditable
Sets the creation date of the entity.

Specified by:
setCreated in interface Auditable<U,PK extends java.io.Serializable>
Parameters:
createdDate - the creation date to set

getLastModifiedBy

public U getLastModifiedBy()
Description copied from interface: Auditable
Returns the user who modified the entity lastly.

Specified by:
getLastModifiedBy in interface Auditable<U,PK extends java.io.Serializable>
Returns:
the lastModifiedBy

setLastModifiedBy

public void setLastModifiedBy(U lastModifiedBy)
Description copied from interface: Auditable
Sets the user who modified the entity lastly.

Specified by:
setLastModifiedBy in interface Auditable<U,PK extends java.io.Serializable>
Parameters:
lastModifiedBy - the last modifying entity to set

getLastModifiedDate

public org.joda.time.DateTime getLastModifiedDate()
Description copied from interface: Auditable
Returns the date of the last modification.

Specified by:
getLastModifiedDate in interface Auditable<U,PK extends java.io.Serializable>
Returns:
the lastModifiedDate

setLastModified

public void setLastModified(org.joda.time.DateTime lastModifiedDate)
Description copied from interface: Auditable
Sets the date of the last modification.

Specified by:
setLastModified in interface Auditable<U,PK extends java.io.Serializable>
Parameters:
lastModifiedDate - the date of the last modification to set


Copyright © 2009-2010 Synyx GmbH & Co. KG. All Rights Reserved.