public class HibernateUpdateClause extends java.lang.Object implements UpdateClause<HibernateUpdateClause>
Constructor and Description |
---|
HibernateUpdateClause(org.hibernate.Session session,
EntityPath<?> entity) |
HibernateUpdateClause(org.hibernate.Session session,
EntityPath<?> entity,
JPQLTemplates templates) |
HibernateUpdateClause(SessionHolder session,
EntityPath<?> entity,
JPQLTemplates templates) |
HibernateUpdateClause(org.hibernate.StatelessSession session,
EntityPath<?> entity) |
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.
|
HibernateUpdateClause |
set(java.util.List<? extends Path<?>> paths,
java.util.List<?> values)
Set the paths to be updated
|
<T> HibernateUpdateClause |
set(Path<T> path,
Expression<? extends T> expression)
Add an expression binding
|
<T> HibernateUpdateClause |
set(Path<T> path,
T value)
Add a value binding
|
HibernateUpdateClause |
setLockMode(Path<?> path,
org.hibernate.LockMode lockMode)
Set the lock mode for the given path.
|
<T> HibernateUpdateClause |
setNull(Path<T> path)
Bind the given path to null
|
java.lang.String |
toString() |
HibernateUpdateClause |
where(Predicate... o)
Adds the given filter conditions
|
public HibernateUpdateClause(org.hibernate.Session session, EntityPath<?> entity)
public HibernateUpdateClause(org.hibernate.StatelessSession session, EntityPath<?> entity)
public HibernateUpdateClause(org.hibernate.Session session, EntityPath<?> entity, JPQLTemplates templates)
public HibernateUpdateClause(SessionHolder session, EntityPath<?> entity, JPQLTemplates templates)
public long execute()
DMLClause
execute
in interface DMLClause<HibernateUpdateClause>
public <T> HibernateUpdateClause set(Path<T> path, T value)
StoreClause
set
in interface StoreClause<HibernateUpdateClause>
path
- path to be updatedvalue
- value to setpublic <T> HibernateUpdateClause set(Path<T> path, Expression<? extends T> expression)
StoreClause
set
in interface StoreClause<HibernateUpdateClause>
path
- path to be updatedexpression
- bindingpublic <T> HibernateUpdateClause setNull(Path<T> path)
StoreClause
setNull
in interface StoreClause<HibernateUpdateClause>
path
- path to be updatedpublic HibernateUpdateClause set(java.util.List<? extends Path<?>> paths, java.util.List<?> values)
UpdateClause
set
in interface UpdateClause<HibernateUpdateClause>
paths
- paths to be updatedvalues
- values to be setpublic HibernateUpdateClause where(Predicate... o)
FilteredClause
Skips null arguments
where
in interface FilteredClause<HibernateUpdateClause>
o
- filter conditions to be addedpublic HibernateUpdateClause setLockMode(Path<?> path, org.hibernate.LockMode lockMode)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEmpty()
StoreClause
isEmpty
in interface StoreClause<HibernateUpdateClause>
Copyright © 2007–2021 Querydsl. All rights reserved.