Class QuerydslProjectionExecutorProvider
java.lang.Object
nl.datasteel.crudcraft.projection.impl.querydsl.QuerydslProjectionExecutorProvider
- All Implemented Interfaces:
ProjectionExecutorProvider
public class QuerydslProjectionExecutorProvider
extends Object
implements ProjectionExecutorProvider
Provider for the Querydsl based
ProjectionExecutor
.-
Constructor Summary
ConstructorsConstructorDescriptionQuerydslProjectionExecutorProvider
(com.querydsl.jpa.impl.JPAQueryFactory queryFactory, jakarta.persistence.metamodel.Metamodel metamodel, QuerydslProjectionBuilder projectionBuilder, ProjectionMetadataRegistry registry) Constructs a new QuerydslProjectionExecutorProvider with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the Querydsl basedProjectionExecutor
.boolean
supports
(ProjectionQuery<?> query) Checks if the givenProjectionQuery
can be handled by this provider.
-
Constructor Details
-
QuerydslProjectionExecutorProvider
public QuerydslProjectionExecutorProvider(com.querydsl.jpa.impl.JPAQueryFactory queryFactory, jakarta.persistence.metamodel.Metamodel metamodel, QuerydslProjectionBuilder projectionBuilder, ProjectionMetadataRegistry registry) Constructs a new QuerydslProjectionExecutorProvider with the given parameters.- Parameters:
queryFactory
- the JPAQueryFactory to use for executing queriesmetamodel
- the JPA Metamodel to use for accessing entity metadataprojectionBuilder
- the QuerydslProjectionBuilder to build projection expressionsregistry
- the ProjectionMetadataRegistry to access compile-time generated metadata
-
-
Method Details
-
supports
Checks if the givenProjectionQuery
can be handled by this provider. It checks if the query is not null and if it has a predicate available.- Specified by:
supports
in interfaceProjectionExecutorProvider
- Parameters:
query
- the projection query to check- Returns:
- true if the query can be handled, false otherwise
-
getExecutor
Returns the Querydsl basedProjectionExecutor
.- Specified by:
getExecutor
in interfaceProjectionExecutorProvider
- Returns:
- the executor
-