public class SpringDataEntityFinder extends Object implements EntityFinder
| Constructor and Description |
|---|
SpringDataEntityFinder(org.springframework.context.ApplicationContext applicationContext,
javax.persistence.EntityManager entityManager) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
find(Long id,
Class<T> entityClass)
Returns the entity on the basis of the entity class and its ID.
|
<T> T |
findAndDetach(Long id,
Class<T> entityClass)
Returns the entity on the basis of the entity class and its ID bypassing the
Hibernate cache
|
public SpringDataEntityFinder(org.springframework.context.ApplicationContext applicationContext,
javax.persistence.EntityManager entityManager)
public <T> T findAndDetach(Long id, Class<T> entityClass) throws javax.persistence.EntityNotFoundException
findAndDetach in interface EntityFinderid - the ID of the entityentityClass - the class of the entityjavax.persistence.EntityNotFoundException - if the repository or the entity
could not be foundpublic <T> T find(Long id, Class<T> entityClass) throws javax.persistence.EntityNotFoundException
find in interface EntityFinderid - the ID of the entityentityClass - the class of the entityjavax.persistence.EntityNotFoundException - if the repository or the entity
could not be foundCopyright © 2015–2020 42 BV. All rights reserved.