Class CriteriaQueryBuilderImpl.AbstractCriteriaQueryWrapper

java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.CriteriaQueryBuilderImpl.AbstractCriteriaQueryWrapper
All Implemented Interfaces:
CriteriaQueryWrapper<RT>
Direct Known Subclasses:
AbstractPathQueryBuilder.CustomSelectionCriteriaQueryWrapper
Enclosing class:
CriteriaQueryBuilderImpl<QB extends CriteriaQueryBuilder<QB,RT,QW>,RT,QW extends CriteriaQueryWrapper<RT>>

protected abstract class CriteriaQueryBuilderImpl.AbstractCriteriaQueryWrapper extends Object implements CriteriaQueryWrapper<RT>
  • Field Details

    • distinct

      protected boolean distinct
  • Constructor Details

    • AbstractCriteriaQueryWrapper

      protected AbstractCriteriaQueryWrapper()
  • Method Details

    • getSelection

      protected abstract jakarta.persistence.criteria.Selection<?> getSelection()
    • createMapperFunction

      protected abstract Function<List<Object[]>,List<RT>> createMapperFunction()
    • getResultList

      public final List<RT> getResultList()
      Specified by:
      getResultList in interface CriteriaQueryWrapper<RT>
    • distinct

      public CriteriaQueryWrapper<RT> distinct(boolean value)
      Specified by:
      distinct in interface CriteriaQueryWrapper<RT>
    • uniqueResultOptional

      public final Optional<RT> uniqueResultOptional()
      Specified by:
      uniqueResultOptional in interface CriteriaQueryWrapper<RT>
    • uniqueResultOptional

      public final Optional<RT> uniqueResultOptional(jakarta.persistence.LockModeType lockMode)
      Specified by:
      uniqueResultOptional in interface CriteriaQueryWrapper<RT>
    • firstResultOptional

      public final Optional<RT> firstResultOptional()
      Specified by:
      firstResultOptional in interface CriteriaQueryWrapper<RT>
    • expandSelection

      protected jakarta.persistence.criteria.Selection<Object[]> expandSelection(List<jakarta.persistence.criteria.Order> order)
      If we use 'DISTINCT', selection needs to include all columns used in 'ORDER BY'. If the order by column is not part of the selection it needs to be explicitly added to the selection.
    • isPartOfSelection

      protected abstract boolean isPartOfSelection(jakarta.persistence.criteria.Path<?> path)
    • determineOrderBy

      protected List<jakarta.persistence.criteria.Order> determineOrderBy()
    • createExpandedSelection

      protected jakarta.persistence.criteria.Selection<Object[]> createExpandedSelection(jakarta.persistence.criteria.Selection<?> originalSelection, List<jakarta.persistence.criteria.Selection<?>> additionalSelectionPaths)