Package io.beanmapper.spring.web
Interface EntityFinder
- All Known Implementing Classes:
MockEntityFinder
,SpringDataEntityFinder
public interface EntityFinder
Provides a generic interface for custom entity finders. The entity finder is
used within MergedFormMethodArgumentResolver to fetch the entity.
- Author:
- Robert Bor
-
Method Summary
-
Method Details
-
find
Returns the entity on the basis of the entity class and its ID.- Parameters:
entityClass
- the class of the entityid
- the ID of the entity- Returns:
- the entity if found
- Throws:
javax.persistence.EntityNotFoundException
- if the repository or the entity could not be found
-
findAndDetach
Returns the entity on the basis of the entity class and its ID bypassing the Hibernate cache- Parameters:
entityClass
- the class of the entityid
- the ID of the entity- Returns:
- the entity if found
- Throws:
javax.persistence.EntityNotFoundException
- if the repository or the entity could not be found
-