public class MockEntityFinder extends Object implements EntityFinder
Constructor and Description |
---|
MockEntityFinder() |
Modifier and Type | Method and Description |
---|---|
void |
addRepository(org.springframework.data.repository.CrudRepository<? extends org.springframework.data.domain.Persistable,Long> repository,
Class<?> entityClass) |
Object |
find(Long id,
Class<?> entityClass)
Returns the entity on the basis of the entity class and its ID.
|
public Object find(Long id, Class<?> entityClass) throws javax.persistence.EntityNotFoundException
EntityFinder
find
in interface EntityFinder
id
- the ID of the entityentityClass
- the class of the entityjavax.persistence.EntityNotFoundException
- if the repository or the entity
could not be foundCopyright © 2015–2017 42 BV. All rights reserved.