Interface CriteriaFactory


public interface CriteriaFactory
Since:
0.0.9
Author:
Mislav Milicevic
  • Method Summary

    Modifier and Type
    Method
    Description
    <ENTITY, RETURN>
    Criteria<ENTITY,RETURN>
    createCriteria(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery<RETURN> query, jakarta.persistence.criteria.Root<ENTITY> root)
    Creates and returns a Criteria containing the provided builder, query and root.
    default <ENTITY> Criteria<ENTITY,ENTITY>
    createCriteria(jakarta.persistence.EntityManager entityManager, Class<ENTITY> entityClass)
    Creates and returns a Criteria where the CriteriaBuilder, CriteriaQuery and Root are created by the provided entityManager.
    default <ENTITY, RETURN>
    Criteria<ENTITY,RETURN>
    createCriteria(jakarta.persistence.EntityManager entityManager, Class<ENTITY> entityClass, Class<RETURN> returnClass)
    Creates and returns a Criteria where the CriteriaBuilder, CriteriaQuery and Root are created by the provided entityManager.
  • Method Details

    • createCriteria

      <ENTITY, RETURN> Criteria<ENTITY,RETURN> createCriteria(jakarta.persistence.criteria.CriteriaBuilder builder, jakarta.persistence.criteria.CriteriaQuery<RETURN> query, jakarta.persistence.criteria.Root<ENTITY> root)
      Creates and returns a Criteria containing the provided builder, query and root.
      Type Parameters:
      ENTITY - root entity
      RETURN - type returned by the query
      Parameters:
      builder - to store in the Criteria
      query - to store in the Criteria
      root - to store in the Criteria
      Returns:
      a Criteria containing the provided builder, query and root
    • createCriteria

      default <ENTITY> Criteria<ENTITY,ENTITY> createCriteria(jakarta.persistence.EntityManager entityManager, Class<ENTITY> entityClass)
      Creates and returns a Criteria where the CriteriaBuilder, CriteriaQuery and Root are created by the provided entityManager.
      Type Parameters:
      ENTITY - root entity
      Parameters:
      entityManager - used to create the necessary Criteria objects
      entityClass - used to define the result model of the stored query and root
      Returns:
      a Criteria
    • createCriteria

      default <ENTITY, RETURN> Criteria<ENTITY,RETURN> createCriteria(jakarta.persistence.EntityManager entityManager, Class<ENTITY> entityClass, Class<RETURN> returnClass)
      Creates and returns a Criteria where the CriteriaBuilder, CriteriaQuery and Root are created by the provided entityManager.
      Type Parameters:
      ENTITY - root entity
      RETURN - query return entity
      Parameters:
      entityManager - used to create the necessary Criteria objects
      entityClass - used to define the result model of the root
      returnClass - used to define the result model of the query
      Returns:
      a Criteria