Interface CriteriaTranslatorEventHandler


public interface CriteriaTranslatorEventHandler
Event handler for adding restrictions to criteria created for admin fetch requests
Author:
Jeff Fischer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addRestrictions(String ceilingEntity, List<FilterMapping> filterMappings, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder, jakarta.persistence.criteria.Root original, List<jakarta.persistence.criteria.Predicate> restrictions, List<jakarta.persistence.criteria.Order> sorts, jakarta.persistence.criteria.CriteriaQuery criteria)
    Allows the ability to attach additional criteria to the given criteria that has already been created by the given filterMappings.
  • Method Details

    • addRestrictions

      void addRestrictions(String ceilingEntity, List<FilterMapping> filterMappings, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder, jakarta.persistence.criteria.Root original, List<jakarta.persistence.criteria.Predicate> restrictions, List<jakarta.persistence.criteria.Order> sorts, jakarta.persistence.criteria.CriteriaQuery criteria)

      Allows the ability to attach additional criteria to the given criteria that has already been created by the given filterMappings. Since translation has already occurred from the filterMappings into the given restrictions, implementers should attach additional criteria to that list rather than attach to criteria directly.

      These

      Parameters:
      ceilingEntity - the entity currently being fetched
      filterMappings - the DTO of filters harvested from FieldPersistenceProviders
      criteriaBuilder - used for adding additional restrictions
      original - the Hibernate root from which restriction paths start from
      restrictions - existing list of restrictions that have not yet been applied to criteria
      sorts - list of sorts that have not yet been applied to criteria>
      criteria - the final criteria without any of the restrictions or sorts applied to it. Additional Predicates should not be attached to this directly but rather to the given restrictions or sorts