Class JpaProjectionExecutorProvider
java.lang.Object
nl.datasteel.crudcraft.projection.impl.jpa.JpaProjectionExecutorProvider
- All Implemented Interfaces:
ProjectionExecutorProvider
Provider for the JPA based
ProjectionExecutor.-
Constructor Summary
ConstructorsConstructorDescriptionJpaProjectionExecutorProvider(jakarta.persistence.EntityManager entityManager, CriteriaProjectionBuilder criteriaBuilder, ProjectionMetadataRegistry registry) Constructs a new JpaProjectionExecutorProvider with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the JPA basedProjectionExecutor.booleansupports(ProjectionQuery<?> query) Checks if the givenProjectionQuerycan be handled by this provider.
-
Constructor Details
-
JpaProjectionExecutorProvider
public JpaProjectionExecutorProvider(jakarta.persistence.EntityManager entityManager, CriteriaProjectionBuilder criteriaBuilder, ProjectionMetadataRegistry registry) Constructs a new JpaProjectionExecutorProvider with the given parameters.- Parameters:
entityManager- the EntityManager to use for executing queriescriteriaBuilder- the CriteriaProjectionBuilder to build projection expressionsregistry- the ProjectionMetadataRegistry to access compile-time generated metadata
-
-
Method Details
-
supports
Checks if the givenProjectionQuerycan be handled by this provider. It checks if the query is null or if it has no predicate available.- Specified by:
supportsin interfaceProjectionExecutorProvider- Parameters:
query- the projection query to check- Returns:
- true if the query can be handled, false otherwise
-
getExecutor
Returns the JPA basedProjectionExecutor.- Specified by:
getExecutorin interfaceProjectionExecutorProvider- Returns:
- the executor
-