Top Description Inners Fields Constructors Methods
org.hibernate.query.criteria.internal

public Class CriteriaUpdateImpl<T>

extends AbstractManipulationCriteriaQuery<T>
implements CriteriaUpdate<T>
Class Inheritance
All Implemented Interfaces
javax.persistence.criteria.CriteriaUpdate, javax.persistence.criteria.CommonAbstractCriteria
Imports
java.util.ArrayList, .List, javax.persistence.Parameter, javax.persistence.criteria.CriteriaUpdate, .Expression, .Path, .Predicate, javax.persistence.metamodel.SingularAttribute, org.hibernate.query.criteria.internal.compile.RenderingContext, org.hibernate.query.criteria.internal.path.SingularAttributePath, org.hibernate.sql.ast.Clause

Hibernate implementation of the JPA 2.1 CriteriaUpdate contract.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private List<CriteriaUpdateImpl.Assignment<A>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected <Y> void
addAssignment(Path<Y> attributePath, Expression<? extends Y> value)

private void
protected String
public <Y, X extends Y> CriteriaUpdate<T>
set(SingularAttribute<? super T, Y>
attribute to be updated
singularAttribute
,
X
new value
value
)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y> CriteriaUpdate<T>
set(SingularAttribute<? super T, Y>
attribute to be updated
singularAttribute
,
Expression<? extends Y>
new value
value
)

Implements javax.persistence.criteria.CriteriaUpdate.set, javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y, X extends Y> CriteriaUpdate<T>
set(Path<Y>
attribute to be updated
attributePath
,
X
new value
value
)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public <Y> CriteriaUpdate<T>
set(Path<Y>
attribute to be updated
attributePath
,
Expression<? extends Y>
new value
value
)

Implements javax.persistence.criteria.CriteriaUpdate.set, javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public CriteriaUpdate<T>
set(String
name of the attribute to be updated
attributeName
,
Object
new value
value
)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.
public void
public CriteriaUpdate<T>
where(Expression<Boolean>
a simple or compound boolean expression
restriction
)

Implements javax.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the specified boolean expression.
public CriteriaUpdate<T>
where(Predicate...
zero or more restriction predicates
restrictions
)

Implements javax.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the conjunction of the specified restriction predicates.
Inherited from org.hibernate.query.criteria.internal.AbstractManipulationCriteriaQuery:
criteriaBuilderfromfromgetRestrictiongetRootinterpretrenderRestrictionsrenderRootsetRestrictionsetRestrictionsubquery

Field Detail

assignmentsback to summary
private List<CriteriaUpdateImpl.Assignment<A>> assignments

Constructor Detail

CriteriaUpdateImplback to summary
public CriteriaUpdateImpl(CriteriaBuilderImpl criteriaBuilder)

Method Detail

addAssignmentback to summary
protected <Y> void addAssignment(Path<Y> attributePath, Expression<? extends Y> value)
renderAssignmentsback to summary
private void renderAssignments(StringBuilder jpaql, RenderingContext renderingContext)
renderQueryback to summary
protected String renderQuery(RenderingContext renderingContext)

Implements abstract org.hibernate.query.criteria.internal.AbstractManipulationCriteriaQuery.renderQuery.

Annotations
@Override
setback to summary
public <Y, X extends Y> CriteriaUpdate<T> set(SingularAttribute<? super T, Y> singularAttribute, X value)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Doc from javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
singularAttribute:SingularAttribute<? super T, Y>

attribute to be updated

value:X

new value

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
@SuppressWarnings:unchecked
setback to summary
public <Y> CriteriaUpdate<T> set(SingularAttribute<? super T, Y> singularAttribute, Expression<? extends Y> value)

Implements javax.persistence.criteria.CriteriaUpdate.set, javax.persistence.criteria.CriteriaUpdate.set.

Doc from javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
singularAttribute:SingularAttribute<? super T, Y>

attribute to be updated

value:Expression<? extends Y>

new value

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
setback to summary
public <Y, X extends Y> CriteriaUpdate<T> set(Path<Y> attributePath, X value)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Doc from javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attributePath:Path<Y>

attribute to be updated

value:X

new value

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
@SuppressWarnings:unchecked
setback to summary
public <Y> CriteriaUpdate<T> set(Path<Y> attributePath, Expression<? extends Y> value)

Implements javax.persistence.criteria.CriteriaUpdate.set, javax.persistence.criteria.CriteriaUpdate.set.

Doc from javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attributePath:Path<Y>

attribute to be updated

value:Expression<? extends Y>

new value

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
setback to summary
public CriteriaUpdate<T> set(String attributeName, Object value)

Implements javax.persistence.criteria.CriteriaUpdate.set.

Doc from javax.persistence.criteria.CriteriaUpdate.set.

Update the value of the specified attribute.

Parameters
attributeName:String

name of the attribute to be updated

value:Object

new value

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
@SuppressWarnings:unchecked
validateback to summary
public void validate()

Overrides org.hibernate.query.criteria.internal.AbstractManipulationCriteriaQuery.validate.

Implements org.hibernate.query.criteria.internal.compile.CompilableCriteria.validate.

Annotations
@Override
whereback to summary
public CriteriaUpdate<T> where(Expression<Boolean> restriction)

Implements javax.persistence.criteria.CriteriaUpdate.where.

Doc from javax.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update according to the specified boolean expression. Replaces the previously added restriction(s), if any.

Parameters
restriction:Expression<Boolean>

a simple or compound boolean expression

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
whereback to summary
public CriteriaUpdate<T> where(Predicate... restrictions)

Implements javax.persistence.criteria.CriteriaUpdate.where.

Doc from javax.persistence.criteria.CriteriaUpdate.where.

Modify the update query to restrict the target of the update 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.

Parameters
restrictions:Predicate[]

zero or more restriction predicates

Returns:CriteriaUpdate<T>

the modified update query

Annotations
@Override
org.hibernate.query.criteria.internal back to summary

private Class CriteriaUpdateImpl.Assignment<A>

extends Object
Class Inheritance
  • java.lang.Object
  • org.hibernate.query.criteria.internal.CriteriaUpdateImpl.Assignment

Field Summary

Modifier and TypeField and Description
private final SingularAttributePath<A>
private final ExpressionImplementor<? extends A>

Constructor Summary

AccessConstructor and Description
private
Assignment(SingularAttributePath<A> attributePath, Expression<? extends A> value)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributePathback to summary
private final SingularAttributePath<A> attributePath
valueback to summary
private final ExpressionImplementor<? extends A> value

Constructor Detail

Assignmentback to summary
private Assignment(SingularAttributePath<A> attributePath, Expression<? extends A> value)