Interface QuerydslProjectionBuilder

All Known Implementing Classes:
MetadataQuerydslProjectionBuilder

public interface QuerydslProjectionBuilder
Builds QueryDSL queries that project entity data directly into DTOs.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T, D> com.querydsl.jpa.impl.JPAQuery<D>
    build(com.querydsl.jpa.impl.JPAQueryFactory queryFactory, Class<T> entityType, Class<D> dtoType, ProjectionQuery<T> query)
    Builds a QueryDSL query that projects entity data into a DTO.
    <D> com.querydsl.core.types.Expression<D>
    construct(com.querydsl.core.types.dsl.PathBuilder<?> from, Class<D> dtoType)
    Constructs a QueryDSL expression for projecting entity data into a DTO.
  • Method Details

    • build

      <T, D> com.querydsl.jpa.impl.JPAQuery<D> build(com.querydsl.jpa.impl.JPAQueryFactory queryFactory, Class<T> entityType, Class<D> dtoType, ProjectionQuery<T> query)
      Builds a QueryDSL query that projects entity data into a DTO.
      Type Parameters:
      T - the type of the entity
      D - the type of the DTO
      Parameters:
      queryFactory - the JPAQueryFactory to use for executing the query
      entityType - the type of the entity to project from
      dtoType - the type of the DTO to project into
      query - the projection query to execute
      Returns:
      a JPAQuery that can be executed to retrieve projected data
    • construct

      <D> com.querydsl.core.types.Expression<D> construct(com.querydsl.core.types.dsl.PathBuilder<?> from, Class<D> dtoType)
      Constructs a QueryDSL expression for projecting entity data into a DTO.
      Type Parameters:
      D - the type of the DTO
      Parameters:
      from - the PathBuilder representing the entity to project from
      dtoType - the type of the DTO to project into
      Returns:
      an Expression that can be used in a QueryDSL query