org.springframework.data.envers.repository.support
Class EnversRevisionRepositoryImpl<T,ID extends Serializable,N extends Number & Comparable<N>>

java.lang.Object
  extended by org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,ID>
      extended by org.springframework.data.envers.repository.support.EnversRevisionRepositoryImpl<T,ID,N>
All Implemented Interfaces:
org.springframework.data.jpa.repository.JpaRepository<T,ID>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>, org.springframework.data.repository.CrudRepository<T,ID>, org.springframework.data.repository.history.RevisionRepository<T,ID,N>, org.springframework.data.repository.PagingAndSortingRepository<T,ID>, org.springframework.data.repository.Repository<T,ID>

public class EnversRevisionRepositoryImpl<T,ID extends Serializable,N extends Number & Comparable<N>>
extends org.springframework.data.jpa.repository.support.SimpleJpaRepository<T,ID>
implements org.springframework.data.repository.history.RevisionRepository<T,ID,N>

Repository implementation using Hibernate Envers to implement revision specific query methods.

Author:
Oliver Gierke, Philipp Huegelmeyer

Constructor Summary
EnversRevisionRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation, org.springframework.data.repository.history.support.RevisionEntityInformation revisionEntityInformation, javax.persistence.EntityManager entityManager)
          Creates a new EnversRevisionRepositoryImpl using the given JpaEntityInformation, RevisionEntityInformation and EntityManager.
 
Method Summary
 org.springframework.data.history.Revision<N,T> findLastChangeRevision(ID id)
           
 org.springframework.data.history.Revisions<N,T> findRevisions(ID id)
           
 org.springframework.data.domain.Page<org.springframework.data.history.Revision<N,T>> findRevisions(ID id, org.springframework.data.domain.Pageable pageable)
           
 
Methods inherited from class org.springframework.data.jpa.repository.support.SimpleJpaRepository
count, count, delete, delete, delete, deleteAll, deleteAllInBatch, deleteInBatch, exists, findAll, findAll, findAll, findAll, findAll, findAll, findAll, findOne, findOne, flush, save, save, saveAndFlush, setLockMetadataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnversRevisionRepositoryImpl

public EnversRevisionRepositoryImpl(org.springframework.data.jpa.repository.support.JpaEntityInformation<T,?> entityInformation,
                                    org.springframework.data.repository.history.support.RevisionEntityInformation revisionEntityInformation,
                                    javax.persistence.EntityManager entityManager)
Creates a new EnversRevisionRepositoryImpl using the given JpaEntityInformation, RevisionEntityInformation and EntityManager.

Parameters:
entityInformation - must not be null.
revisionEntityInformation - must not be null.
entityManager - must not be null.
Method Detail

findLastChangeRevision

public org.springframework.data.history.Revision<N,T> findLastChangeRevision(ID id)
Specified by:
findLastChangeRevision in interface org.springframework.data.repository.history.RevisionRepository<T,ID extends Serializable,N extends Number & Comparable<N>>

findRevisions

public org.springframework.data.history.Revisions<N,T> findRevisions(ID id)
Specified by:
findRevisions in interface org.springframework.data.repository.history.RevisionRepository<T,ID extends Serializable,N extends Number & Comparable<N>>

findRevisions

public org.springframework.data.domain.Page<org.springframework.data.history.Revision<N,T>> findRevisions(ID id,
                                                                                                          org.springframework.data.domain.Pageable pageable)
Specified by:
findRevisions in interface org.springframework.data.repository.history.RevisionRepository<T,ID extends Serializable,N extends Number & Comparable<N>>


Copyright © 2012. All Rights Reserved.