Interface BlazeCriteriaBuilder

All Superinterfaces:
CriteriaBuilder

public interface BlazeCriteriaBuilder
extends CriteriaBuilder
An extended version of CriteriaBuilder.
Since:
1.2.0
Author:
Christian Beikov
  • Method Details

    • isMapEmpty

      <C extends Map<?,​ ?>> Predicate isMapEmpty​(Expression<C> map)
      Create a predicate that tests whether a map is empty.
      Type Parameters:
      C - map type
      Parameters:
      map - expression
      Returns:
      is-empty predicate
    • isMapNotEmpty

      <C extends Map<?,​ ?>> Predicate isMapNotEmpty​(Expression<C> map)
      Create a predicate that tests whether a map is not empty.
      Type Parameters:
      C - map type
      Parameters:
      map - expression
      Returns:
      is-not-empty predicate
    • mapSize

      <C extends Map<?,​ ?>> Expression<Integer> mapSize​(Expression<C> map)
      Create an expression that tests the size of a map.
      Type Parameters:
      C - map type
      Parameters:
      map - map
      Returns:
      size expression
    • mapSize

      <C extends Map<?,​ ?>> Expression<Integer> mapSize​(C map)
      Create an expression that tests the size of a map.
      Type Parameters:
      C - map type
      Parameters:
      map - map
      Returns:
      size expression
    • asc

      BlazeOrder asc​(Expression<?> x, boolean nullsFirst)
      Like CriteriaBuilder.asc(Expression) but allows to also specify the null precedence.
      Parameters:
      x - The expression used to define the ordering
      nullsFirst - True if nulls should be first, false otherwise
      Returns:
      ascending ordering corresponding to the expression
    • desc

      BlazeOrder desc​(Expression<?> x, boolean nullsFirst)
      Like CriteriaBuilder.desc(Expression) but allows to also specify the null precedence.
      Parameters:
      x - The expression used to define the ordering
      nullsFirst - True if nulls should be first, false otherwise
      Returns:
      descending ordering corresponding to the expression
    • createCriteriaUpdate

      <T> BlazeCriteriaUpdate<T> createCriteriaUpdate​(Class<T> targetEntity, String alias)
      Like createCriteriaUpdate(Class) but also sets the alias for the entity.
      Type Parameters:
      T - The type of the entity
      Parameters:
      targetEntity - target type for update operation
      alias - The alias for the entity
      Returns:
      the query object
    • createCriteriaDelete

      <T> BlazeCriteriaDelete<T> createCriteriaDelete​(Class<T> targetEntity, String alias)
      Like createCriteriaDelete(Class) but also sets the alias for the entity.
      Type Parameters:
      T - The type of the entity
      Parameters:
      targetEntity - target type for delete operation
      alias - The alias for the entity
      Returns:
      the query object
    • asc

      BlazeOrder asc​(Expression<?> x)
      Specified by:
      asc in interface CriteriaBuilder
    • desc

      BlazeOrder desc​(Expression<?> x)
      Specified by:
      desc in interface CriteriaBuilder
    • createQuery

      BlazeCriteriaQuery<Object> createQuery()
      Specified by:
      createQuery in interface CriteriaBuilder
    • createQuery

      <T> BlazeCriteriaQuery<T> createQuery​(Class<T> resultClass)
      Specified by:
      createQuery in interface CriteriaBuilder
    • createTupleQuery

      BlazeCriteriaQuery<Tuple> createTupleQuery()
      Specified by:
      createTupleQuery in interface CriteriaBuilder
    • createCriteriaUpdate

      <T> BlazeCriteriaUpdate<T> createCriteriaUpdate​(Class<T> targetEntity)
      Create a query object to perform a bulk update operation.
      Type Parameters:
      T - The type of the entity
      Parameters:
      targetEntity - target type for update operation
      Returns:
      the query object
    • createCriteriaDelete

      <T> BlazeCriteriaDelete<T> createCriteriaDelete​(Class<T> targetEntity)
      Create a query object to perform a bulk delete operation.
      Type Parameters:
      T - The type of the entity
      Parameters:
      targetEntity - target type for delete operation
      Returns:
      the query object
    • treat

      <X,​ T,​ V extends T> BlazeJoin<X,​V> treat​(Join<X,​T> join, Class<V> type)
      Downcast Join object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      V - The target treat type
      Parameters:
      join - Join object
      type - type to be downcast to
      Returns:
      Join object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeCollectionJoin<X,​E> treat​(CollectionJoin<X,​T> join, Class<E> type)
      Downcast CollectionJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - CollectionJoin object
      type - type to be downcast to
      Returns:
      CollectionJoin object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeSetJoin<X,​E> treat​(SetJoin<X,​T> join, Class<E> type)
      Downcast SetJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - SetJoin object
      type - type to be downcast to
      Returns:
      SetJoin object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeListJoin<X,​E> treat​(ListJoin<X,​T> join, Class<E> type)
      Downcast ListJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - ListJoin object
      type - type to be downcast to
      Returns:
      ListJoin object of the specified type
    • treat

      <X,​ K,​ T,​ V extends T> BlazeMapJoin<X,​K,​V> treat​(MapJoin<X,​K,​T> join, Class<V> type)
      Downcast MapJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      K - The key type of the joined relation
      V - The target treat type
      Parameters:
      join - MapJoin object
      type - type to be downcast to
      Returns:
      MapJoin object of the specified type
    • treat

      <X,​ T extends X> BlazePath<T> treat​(Path<X> path, Class<T> type)
      Downcast Path object to the specified type.
      Type Parameters:
      X - The path type
      T - The target treat type
      Parameters:
      path - path
      type - type to be downcast to
      Returns:
      Path object of the specified type
    • treat

      <X,​ T extends X> BlazeRoot<T> treat​(Root<X> root, Class<T> type)
      Downcast Root object to the specified type.
      Type Parameters:
      X - The root type
      T - The target treat type
      Parameters:
      root - root
      type - type to be downcast to
      Returns:
      Path object of the specified type
    • treat

      <X,​ T,​ V extends T> BlazeJoin<X,​V> treat​(BlazeJoin<X,​T> join, Class<V> type)
      Downcast Join object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      V - The target treat type
      Parameters:
      join - Join object
      type - type to be downcast to
      Returns:
      Join object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeCollectionJoin<X,​E> treat​(BlazeCollectionJoin<X,​T> join, Class<E> type)
      Downcast CollectionJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - CollectionJoin object
      type - type to be downcast to
      Returns:
      CollectionJoin object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeSetJoin<X,​E> treat​(BlazeSetJoin<X,​T> join, Class<E> type)
      Downcast SetJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - SetJoin object
      type - type to be downcast to
      Returns:
      SetJoin object of the specified type
    • treat

      <X,​ T,​ E extends T> BlazeListJoin<X,​E> treat​(BlazeListJoin<X,​T> join, Class<E> type)
      Downcast ListJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      E - The target treat type
      Parameters:
      join - ListJoin object
      type - type to be downcast to
      Returns:
      ListJoin object of the specified type
    • treat

      <X,​ K,​ T,​ V extends T> BlazeMapJoin<X,​K,​V> treat​(BlazeMapJoin<X,​K,​T> join, Class<V> type)
      Downcast MapJoin object to the specified type.
      Type Parameters:
      X - The source type
      T - The type of the joined relation
      K - The key type of the joined relation
      V - The target treat type
      Parameters:
      join - MapJoin object
      type - type to be downcast to
      Returns:
      MapJoin object of the specified type
    • treat

      <X,​ T extends X> BlazePath<T> treat​(BlazePath<X> path, Class<T> type)
      Downcast Path object to the specified type.
      Type Parameters:
      X - The path type
      T - The target treat type
      Parameters:
      path - path
      type - type to be downcast to
      Returns:
      Path object of the specified type
    • treat

      <X,​ T extends X> BlazeRoot<T> treat​(BlazeRoot<X> root, Class<T> type)
      Downcast Root object to the specified type.
      Type Parameters:
      X - The root type
      T - The target treat type
      Parameters:
      root - root
      type - type to be downcast to
      Returns:
      Path object of the specified type