Interface Projection<ENTITY>

All Superinterfaces:
Function<ENTITY,jakarta.persistence.Tuple>

public interface Projection<ENTITY> extends Function<ENTITY,jakarta.persistence.Tuple>
The Projection class represents a SQL projection. Specific fields can be selected by using Projection#select. The result of Projection#select can be passed to JPAStreamer#stream to apply the specified projection.
Author:
Mislav Milicevic
  • Method Details

    • entityClass

      Class<ENTITY> entityClass()
      Returns the entity class that the projection is applied to.
      Returns:
      the entity class that the projection is applied to.
    • fields

      Set<Field<ENTITY>> fields()
      Returns the fields selected by this projections.
      Returns:
      the fields selected by this projection.
    • select

      @SafeVarargs static <ENTITY> Projection<ENTITY> select(Field<ENTITY> first, Field<ENTITY>... other)