Class CriteriaUpdateImpl<T>

  • All Implemented Interfaces:
    java.io.Serializable, javax.persistence.criteria.CommonAbstractCriteria, javax.persistence.criteria.CriteriaUpdate<T>

    public class CriteriaUpdateImpl<T>
    extends CommonAbstractCriteriaImpl<T>
    implements javax.persistence.criteria.CriteriaUpdate<T>

    Purpose: Contains the implementation of the CriteriaUpdate interface of the JPA criteria API.

    Description: This is the container class for the components that define an Update Query.

    Since:
    EclipseLink 2.5
    Author:
    Chris Delahunt
    See Also:
    CriteriaUpdate, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CriteriaUpdateImpl​(javax.persistence.metamodel.Metamodel metamodel, CriteriaBuilderImpl queryBuilder, java.lang.Class<T> resultType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.persistence.criteria.Root<T> from​(java.lang.Class<T> entityClass)  
      javax.persistence.criteria.Root<T> from​(javax.persistence.metamodel.EntityType<T> entity)  
      protected org.eclipse.persistence.expressions.Expression getBaseExpression()  
      protected org.eclipse.persistence.queries.DatabaseQuery getDatabaseQuery()  
      javax.persistence.criteria.Root<T> getRoot()  
      protected void integrateRoot​(RootImpl root)
      Used to use a root from a different query.
      javax.persistence.criteria.CriteriaUpdate<T> set​(java.lang.String attributeName, java.lang.Object value)  
      <Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.criteria.Path<Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)  
      <Y,​X extends Y>
      javax.persistence.criteria.CriteriaUpdate<T>
      set​(javax.persistence.criteria.Path<Y> attribute, X value)  
      <Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.metamodel.SingularAttribute<? super T,​Y> attribute, javax.persistence.criteria.Expression<? extends Y> value)  
      <Y,​X extends Y>
      javax.persistence.criteria.CriteriaUpdate<T>
      set​(javax.persistence.metamodel.SingularAttribute<? super T,​Y> attribute, X value)  
      javax.persistence.criteria.CriteriaUpdate<T> where​(javax.persistence.criteria.Expression<java.lang.Boolean> restriction)
      Modify the query to restrict the query results according to the specified boolean expression.
      javax.persistence.criteria.CriteriaUpdate<T> where​(javax.persistence.criteria.Predicate... restrictions)
      Modify the query to restrict the query results according to the conjunction of the specified restriction predicates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.persistence.criteria.CommonAbstractCriteria

        getRestriction, subquery
    • Field Detail

      • root

        protected javax.persistence.criteria.Root<T> root
      • query

        protected org.eclipse.persistence.queries.UpdateAllQuery query
    • Constructor Detail

      • CriteriaUpdateImpl

        public CriteriaUpdateImpl​(javax.persistence.metamodel.Metamodel metamodel,
                                  CriteriaBuilderImpl queryBuilder,
                                  java.lang.Class<T> resultType)
    • Method Detail

      • from

        public javax.persistence.criteria.Root<T> from​(java.lang.Class<T> entityClass)
        Specified by:
        from in interface javax.persistence.criteria.CriteriaUpdate<T>
      • from

        public javax.persistence.criteria.Root<T> from​(javax.persistence.metamodel.EntityType<T> entity)
        Specified by:
        from in interface javax.persistence.criteria.CriteriaUpdate<T>
      • getRoot

        public javax.persistence.criteria.Root<T> getRoot()
        Specified by:
        getRoot in interface javax.persistence.criteria.CriteriaUpdate<T>
      • set

        public <Y,​X extends Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.metamodel.SingularAttribute<? super T,​Y> attribute,
                                                                                      X value)
        Specified by:
        set in interface javax.persistence.criteria.CriteriaUpdate<T>
      • set

        public <Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.metamodel.SingularAttribute<? super T,​Y> attribute,
                                                                    javax.persistence.criteria.Expression<? extends Y> value)
        Specified by:
        set in interface javax.persistence.criteria.CriteriaUpdate<T>
      • set

        public <Y,​X extends Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.criteria.Path<Y> attribute,
                                                                                      X value)
        Specified by:
        set in interface javax.persistence.criteria.CriteriaUpdate<T>
      • set

        public <Y> javax.persistence.criteria.CriteriaUpdate<T> set​(javax.persistence.criteria.Path<Y> attribute,
                                                                    javax.persistence.criteria.Expression<? extends Y> value)
        Specified by:
        set in interface javax.persistence.criteria.CriteriaUpdate<T>
      • set

        public javax.persistence.criteria.CriteriaUpdate<T> set​(java.lang.String attributeName,
                                                                java.lang.Object value)
        Specified by:
        set in interface javax.persistence.criteria.CriteriaUpdate<T>
      • where

        public javax.persistence.criteria.CriteriaUpdate<T> where​(javax.persistence.criteria.Expression<java.lang.Boolean> restriction)
        Description copied from class: CommonAbstractCriteriaImpl
        Modify the query to restrict the query results according to the specified boolean expression. Replaces the previously added restriction(s), if any.
        Specified by:
        where in interface javax.persistence.criteria.CriteriaUpdate<T>
        Overrides:
        where in class CommonAbstractCriteriaImpl<T>
        Parameters:
        restriction - a simple or compound boolean expression
        Returns:
        the modified query
      • where

        public javax.persistence.criteria.CriteriaUpdate<T> where​(javax.persistence.criteria.Predicate... restrictions)
        Description copied from class: CommonAbstractCriteriaImpl
        Modify the query to restrict the query results 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 javax.persistence.criteria.CriteriaUpdate<T>
        Overrides:
        where in class CommonAbstractCriteriaImpl<T>
        Parameters:
        restrictions - zero or more restriction predicates
        Returns:
        the modified query