Spring Data Jpa

org.springframework.data.jpa.domain
Class AbstractAuditable<U,PK extends Serializable>

java.lang.Object
  extended by org.springframework.data.jpa.domain.AbstractPersistable<PK>
      extended by org.springframework.data.jpa.domain.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:
Serializable, org.springframework.data.domain.Auditable<U,PK>, org.springframework.data.domain.Persistable<PK>

@MappedSuperclass
public abstract class AbstractAuditable<U,PK extends Serializable>
extends AbstractPersistable<PK>
implements org.springframework.data.domain.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()
           
 org.joda.time.DateTime getCreatedDate()
           
 U getLastModifiedBy()
           
 org.joda.time.DateTime getLastModifiedDate()
           
 void setCreatedBy(U createdBy)
           
 void setCreatedDate(org.joda.time.DateTime createdDate)
           
 void setLastModifiedBy(U lastModifiedBy)
           
 void setLastModifiedDate(org.joda.time.DateTime lastModifiedDate)
           
 
Methods inherited from class org.springframework.data.jpa.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.springframework.data.domain.Persistable
getId, isNew
 

Constructor Detail

AbstractAuditable

public AbstractAuditable()
Method Detail

getCreatedBy

public U getCreatedBy()
Specified by:
getCreatedBy in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

setCreatedBy

public void setCreatedBy(U createdBy)
Specified by:
setCreatedBy in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

getCreatedDate

public org.joda.time.DateTime getCreatedDate()
Specified by:
getCreatedDate in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

setCreatedDate

public void setCreatedDate(org.joda.time.DateTime createdDate)
Specified by:
setCreatedDate in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

getLastModifiedBy

public U getLastModifiedBy()
Specified by:
getLastModifiedBy in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

setLastModifiedBy

public void setLastModifiedBy(U lastModifiedBy)
Specified by:
setLastModifiedBy in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

getLastModifiedDate

public org.joda.time.DateTime getLastModifiedDate()
Specified by:
getLastModifiedDate in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

setLastModifiedDate

public void setLastModifiedDate(org.joda.time.DateTime lastModifiedDate)
Specified by:
setLastModifiedDate in interface org.springframework.data.domain.Auditable<U,PK extends Serializable>

Spring Data Jpa

Copyright © 2011 SpringSource. All Rights Reserved.