public class JPAUpdateClause extends java.lang.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(java.util.List<? extends Path<?>> paths,
java.util.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
|
<T> JPAUpdateClause |
setNull(Path<T> path)
Bind the given path to null
|
java.lang.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(java.util.List<? extends Path<?>> paths, java.util.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 java.lang.String toString()
toString
in class java.lang.Object
public boolean isEmpty()
StoreClause
isEmpty
in interface StoreClause<JPAUpdateClause>
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.