DATACMNS-166 - Adapted changes in Spring Data Commons.

This commit is contained in:
Oliver Gierke
2012-05-02 19:55:10 +02:00
parent 5eaa686b9b
commit f8fd5c4b7a
3 changed files with 3 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ public class JpaRepositoryFactory extends RepositoryFactorySupport {
EntityManager entityManager) {
Class<?> repositoryInterface = metadata.getRepositoryInterface();
JpaEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainClass());
JpaEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainType());
SimpleJpaRepository<?, ?> repo = isQueryDslExecutor(repositoryInterface) ? new QueryDslJpaRepository(
entityInformation, entityManager) : new SimpleJpaRepository(entityInformation, entityManager);

View File

@@ -53,7 +53,7 @@ public class CustomGenericJpaRepositoryFactory extends JpaRepositoryFactory {
protected JpaRepository<?, ?> getTargetRepository(RepositoryMetadata metadata, EntityManager em) {
JpaEntityInformation<Object, Serializable> entityMetadata = mock(JpaEntityInformation.class);
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainClass());
when(entityMetadata.getJavaType()).thenReturn((Class<Object>) metadata.getDomainType());
return new CustomGenericJpaRepository<Object, Serializable>(entityMetadata, em);
}

View File

@@ -54,7 +54,7 @@ public class NamedQueryUnitTests {
public void setUp() throws SecurityException, NoSuchMethodException {
method = SampleRepository.class.getMethod("foo", Pageable.class);
when(metadata.getDomainClass()).thenReturn((Class) String.class);
when(metadata.getDomainType()).thenReturn((Class) String.class);
when(metadata.getReturnedDomainClass(method)).thenReturn((Class) String.class);
}