Interface JPAFinderHelper<TT>
- Type Parameters:
TT- entity type
- All Superinterfaces:
JPAFinder<TT>
- All Known Subinterfaces:
JPANativeQuery<TT>
- All Known Implementing Classes:
DaoHelper
Enhanced JPA Finder interface that provides access to the entity manager,
the entity class, and the ability to build a
JPAFinder.QueryCriteria record
Also contains convenience interface for use with Delegate
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceConvenience interface for use withDelegatewhen forwarding methods ofEntityManagerso DaoHelper's own methods get exposed correctlyNested classes/interfaces inherited from interface JPAFinder
JPAFinder.CountQueryCriteria<TT>, JPAFinder.CriteriaBuilderAndRoot<TT>, JPAFinder.QueryCriteria<TT>, JPAFinder.QueryEnhancement<TT> -
Method Summary
Modifier and TypeMethodDescriptionConvenience method for buildingJPAFinder.QueryCriteriarecord, which containsCriteriaBuilder,RootandCriteriaQuery<RR> JPAFinder.QueryCriteria<RR> buildQueryCriteria(Class<RR> cls) Convenience method for buildingJPAFinder.QueryCriteriarecord of any type, which containsCriteriaBuilder,RootandCriteriaQueryReturns the entity classEntity Manager cannot be saved because it's not thread-safe However, supplier can be returned
-
Method Details
-
getEntityManager
Supplier<EntityManager> getEntityManager()Entity Manager cannot be saved because it's not thread-safe However, supplier can be returned- Returns:
SupplierofEntityManager
-
getEntityClass
-
buildQueryCriteria
JPAFinder.QueryCriteria<TT> buildQueryCriteria()Convenience method for buildingJPAFinder.QueryCriteriarecord, which containsCriteriaBuilder,RootandCriteriaQuery- Returns:
- QueryCriteria of Entity Type
-
buildQueryCriteria
Convenience method for buildingJPAFinder.QueryCriteriarecord of any type, which containsCriteriaBuilder,RootandCriteriaQuery- Parameters:
cls- Type of Query Criteria- Returns:
- QueryCriteria of the same Entity Type as the parameter
-