java.lang.Object
org.dellroad.querystream.jpa.querytype.QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
org.dellroad.querystream.jpa.querytype.UpdateType<X>
Type Parameters:
X - query target type

public class UpdateType<X> extends QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
Represents the JPA Criteria API bulk update query type.
  • Field Summary

    Fields inherited from class org.dellroad.querystream.jpa.querytype.QueryType

    type
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.persistence.criteria.CriteriaUpdate<X>
    createCriteriaQuery(jakarta.persistence.criteria.CriteriaBuilder builder)
    Create a new Criteria API query object of the appropriate type.
    jakarta.persistence.Query
    createQuery(jakarta.persistence.EntityManager entityManager, jakarta.persistence.criteria.CriteriaUpdate<X> query)
    Create a JPA query object of the appropriate type.
    void
    where(jakarta.persistence.criteria.CriteriaUpdate<X> query, jakarta.persistence.criteria.Expression<Boolean> restriction)
    Configure the restriction associated with the given query.
    void
    where(jakarta.persistence.criteria.CriteriaUpdate<X> query, jakarta.persistence.criteria.Predicate restriction)
    Configure the restriction associated with the given query.

    Methods inherited from class org.dellroad.querystream.jpa.querytype.QueryType

    getType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createCriteriaQuery

      public jakarta.persistence.criteria.CriteriaUpdate<X> createCriteriaQuery(jakarta.persistence.criteria.CriteriaBuilder builder)
      Description copied from class: QueryType
      Create a new Criteria API query object of the appropriate type.
      Specified by:
      createCriteriaQuery in class QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
      Parameters:
      builder - criteria builder
      Returns:
      new criteria query object
    • createQuery

      public jakarta.persistence.Query createQuery(jakarta.persistence.EntityManager entityManager, jakarta.persistence.criteria.CriteriaUpdate<X> query)
      Description copied from class: QueryType
      Create a JPA query object of the appropriate type.
      Specified by:
      createQuery in class QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
      Parameters:
      entityManager - JPA entity manager
      query - criteria query object
      Returns:
      new executable JPA query object
    • where

      public void where(jakarta.persistence.criteria.CriteriaUpdate<X> query, jakarta.persistence.criteria.Expression<Boolean> restriction)
      Description copied from class: QueryType
      Configure the restriction associated with the given query.
      Specified by:
      where in class QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
      Parameters:
      query - criteria query object
      restriction - query restriction
    • where

      public void where(jakarta.persistence.criteria.CriteriaUpdate<X> query, jakarta.persistence.criteria.Predicate restriction)
      Description copied from class: QueryType
      Configure the restriction associated with the given query.
      Specified by:
      where in class QueryType<X,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.criteria.CriteriaUpdate<X>,jakarta.persistence.Query>
      Parameters:
      query - criteria query object
      restriction - query restriction