public class JPAUpdateClause extends Object implements UpdateClause<JPAUpdateClause>
Constructor and Description |
---|
JPAUpdateClause(javax.persistence.EntityManager em,
EntityPath<?> entity) |
JPAUpdateClause(javax.persistence.EntityManager em,
EntityPath<?> entity,
JPQLTemplates templates) |
Modifier and Type | Method and Description |
---|---|
long |
execute()
Execute the clause and return the amount of affected rows
|
boolean |
isEmpty()
Returns true, if no bindings have been set, otherwise false.
|
JPAUpdateClause |
set(List<? extends Path<?>> paths,
List<?> values)
Set the paths to be updated
|
<T> JPAUpdateClause |
set(Path<T> path,
Expression<? extends T> expression)
Add an expression binding
|
<T> JPAUpdateClause |
set(Path<T> path,
T value)
Add a value binding
|
JPAUpdateClause |
setLockMode(javax.persistence.LockModeType lockMode) |
<T> JPAUpdateClause |
setNull(Path<T> path)
Bind the given path to null
|
String |
toString() |
JPAUpdateClause |
where(Predicate... o)
Adds the given filter conditions
|
public JPAUpdateClause(javax.persistence.EntityManager em, EntityPath<?> entity)
public JPAUpdateClause(javax.persistence.EntityManager em, EntityPath<?> entity, JPQLTemplates templates)
public long execute()
DMLClause
execute
in interface DMLClause<JPAUpdateClause>
public <T> JPAUpdateClause set(Path<T> path, T value)
StoreClause
set
in interface StoreClause<JPAUpdateClause>
path
- path to be updatedvalue
- value to setpublic <T> JPAUpdateClause set(Path<T> path, Expression<? extends T> expression)
StoreClause
set
in interface StoreClause<JPAUpdateClause>
public <T> JPAUpdateClause setNull(Path<T> path)
StoreClause
setNull
in interface StoreClause<JPAUpdateClause>
public JPAUpdateClause set(List<? extends Path<?>> paths, List<?> values)
UpdateClause
set
in interface UpdateClause<JPAUpdateClause>
public JPAUpdateClause where(Predicate... o)
FilteredClause
Skips null arguments
where
in interface FilteredClause<JPAUpdateClause>
o
- filter conditions to be addedpublic JPAUpdateClause setLockMode(javax.persistence.LockModeType lockMode)
public boolean isEmpty()
StoreClause
isEmpty
in interface StoreClause<JPAUpdateClause>
Copyright © 2007–2015 Mysema Ltd. All rights reserved.