Spring Data Core

org.springframework.data.domain
Interface Auditable<U,ID extends Serializable>

Type Parameters:
U - the auditing type. Typically some kind of user.
ID - the type of the audited type's identifier
All Superinterfaces:
Persistable<ID>, Serializable

public interface Auditable<U,ID extends Serializable>
extends Persistable<ID>

Interface for auditable entities. Allows storing and retrieving creation and modification information. The changing instance (typically some user) is to be defined by a generics definition.

Author:
Oliver Gierke

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 setCreatedBy(U createdBy)
          Sets the user who created this entity.
 void setCreatedDate(org.joda.time.DateTime creationDate)
          Sets the creation date of the entity.
 void setLastModifiedBy(U lastModifiedBy)
          Sets the user who modified the entity lastly.
 void setLastModifiedDate(org.joda.time.DateTime lastModifiedDate)
          Sets the date of the last modification.
 
Methods inherited from interface org.springframework.data.domain.Persistable
getId, isNew
 

Method Detail

getCreatedBy

U getCreatedBy()
Returns the user who created this entity.

Returns:
the createdBy

setCreatedBy

void setCreatedBy(U createdBy)
Sets the user who created this entity.

Parameters:
createdBy - the creating entity to set

getCreatedDate

org.joda.time.DateTime getCreatedDate()
Returns the creation date of the entity.

Returns:
the createdDate

setCreatedDate

void setCreatedDate(org.joda.time.DateTime creationDate)
Sets the creation date of the entity.

Parameters:
creationDate - the creation date to set

getLastModifiedBy

U getLastModifiedBy()
Returns the user who modified the entity lastly.

Returns:
the lastModifiedBy

setLastModifiedBy

void setLastModifiedBy(U lastModifiedBy)
Sets the user who modified the entity lastly.

Parameters:
lastModifiedBy - the last modifying entity to set

getLastModifiedDate

org.joda.time.DateTime getLastModifiedDate()
Returns the date of the last modification.

Returns:
the lastModifiedDate

setLastModifiedDate

void setLastModifiedDate(org.joda.time.DateTime lastModifiedDate)
Sets the date of the last modification.

Parameters:
lastModifiedDate - the date of the last modification to set

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.