Interface JpaCriteriaDelete<T>

All Superinterfaces:
CommonAbstractCriteria, CriteriaDelete<T>, JpaCriteriaBase, JpaCriteriaNode, JpaCteContainer, JpaManipulationCriteria<T>, JpaQueryableCriteria<T>, Serializable
All Known Implementing Classes:
SqmDeleteStatement

public interface JpaCriteriaDelete<T> extends JpaManipulationCriteria<T>, CriteriaDelete<T>
Author:
Steve Ebersole
  • Method Details

    • from

      JpaRoot<T> from(Class<T> entityClass)
      Description copied from interface: CriteriaDelete
      Create and add a query root corresponding to the entity that is the target of the delete. A CriteriaDelete object has a single root, the entity that is being deleted.
      Specified by:
      from in interface CriteriaDelete<T>
      Parameters:
      entityClass - the entity class
      Returns:
      query root corresponding to the given entity
    • from

      JpaRoot<T> from(EntityType<T> entity)
      Description copied from interface: CriteriaDelete
      Create and add a query root corresponding to the entity that is the target of the delete. A CriteriaDelete object has a single root, the entity that is being deleted.
      Specified by:
      from in interface CriteriaDelete<T>
      Parameters:
      entity - metamodel entity representing the entity of type X
      Returns:
      query root corresponding to the given entity
    • getRoot

      JpaRoot<T> getRoot()
      Description copied from interface: CriteriaDelete
      Return the query root.
      Specified by:
      getRoot in interface CriteriaDelete<T>
      Returns:
      the query root
    • where

      JpaCriteriaDelete<T> where(Expression<Boolean> restriction)
      Description copied from interface: CriteriaDelete
      Modify the delete query to restrict the target of the deletion according to the specified boolean expression. Replaces the previously added restriction(s), if any.
      Specified by:
      where in interface CriteriaDelete<T>
      Parameters:
      restriction - a simple or compound boolean expression
      Returns:
      the modified delete query
    • where

      JpaCriteriaDelete<T> where(Predicate... restrictions)
      Description copied from interface: CriteriaDelete
      Modify the delete query to restrict the target of the deletion according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.
      Specified by:
      where in interface CriteriaDelete<T>
      Parameters:
      restrictions - zero or more restriction predicates
      Returns:
      the modified delete query