#83 - Adapt to API changes in repository interfaces.
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.envers.repository.support;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
import org.hibernate.envers.DefaultRevisionEntity;
|
||||
@@ -37,7 +35,7 @@ import org.springframework.data.repository.history.support.RevisionEntityInforma
|
||||
* @author Oliver Gierke
|
||||
* @author Michael Igler
|
||||
*/
|
||||
public class EnversRevisionRepositoryFactoryBean<T extends RevisionRepository<S, ID, N>, S, ID extends Serializable, N extends Number & Comparable<N>>
|
||||
public class EnversRevisionRepositoryFactoryBean<T extends RevisionRepository<S, ID, N>, S, ID, N extends Number & Comparable<N>>
|
||||
extends JpaRepositoryFactoryBean<T, S, ID> {
|
||||
|
||||
private Class<?> revisionEntityClass;
|
||||
@@ -74,8 +72,7 @@ public class EnversRevisionRepositoryFactoryBean<T extends RevisionRepository<S,
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
private static class RevisionRepositoryFactory<T, ID extends Serializable, N extends Number & Comparable<N>>
|
||||
extends JpaRepositoryFactory {
|
||||
private static class RevisionRepositoryFactory<T, ID, N extends Number & Comparable<N>> extends JpaRepositoryFactory {
|
||||
|
||||
private final RevisionEntityInformation revisionEntityInformation;
|
||||
private final EntityManager entityManager;
|
||||
@@ -103,7 +100,7 @@ public class EnversRevisionRepositoryFactoryBean<T extends RevisionRepository<S,
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
protected EnversRevisionRepositoryImpl getTargetRepository(RepositoryInformation information) {
|
||||
|
||||
JpaEntityInformation<T, Serializable> entityInformation = (JpaEntityInformation<T, Serializable>) getEntityInformation(
|
||||
JpaEntityInformation<T, Object> entityInformation = (JpaEntityInformation<T, Object>) getEntityInformation(
|
||||
information.getDomainType());
|
||||
|
||||
return new EnversRevisionRepositoryImpl<T, ID, N>(entityInformation, revisionEntityInformation, entityManager);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.springframework.data.envers.repository.support;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -54,8 +53,8 @@ import org.springframework.util.Assert;
|
||||
* @author Philipp Huegelmeyer
|
||||
* @author Michael Igler
|
||||
*/
|
||||
public class EnversRevisionRepositoryImpl<T, ID extends Serializable, N extends Number & Comparable<N>>
|
||||
extends SimpleJpaRepository<T, ID> implements RevisionRepository<T, ID, N> {
|
||||
public class EnversRevisionRepositoryImpl<T, ID, N extends Number & Comparable<N>> extends SimpleJpaRepository<T, ID>
|
||||
implements RevisionRepository<T, ID, N> {
|
||||
|
||||
private final EntityInformation<T, ?> entityInformation;
|
||||
private final RevisionEntityInformation revisionEntityInformation;
|
||||
|
||||
Reference in New Issue
Block a user