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.booleansupports(ProjectionQuery<?> query) Checks if the givenProjectionQuerycan 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 givenProjectionQuerycan be handled by this provider. It checks if the query is not null and if it has a 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 Querydsl basedProjectionExecutor.- Specified by:
getExecutorin interfaceProjectionExecutorProvider- Returns:
- the executor
-