com.mysema.query.jpa.impl
Class JPAUpdateClause

java.lang.Object
  extended by com.mysema.query.jpa.impl.JPAUpdateClause
All Implemented Interfaces:
DMLClause<JPAUpdateClause>, StoreClause<JPAUpdateClause>, UpdateClause<JPAUpdateClause>, FilteredClause<JPAUpdateClause>

public class JPAUpdateClause
extends Object
implements UpdateClause<JPAUpdateClause>

UpdateClause implementation for JPA

Author:
tiwe

Constructor Summary
JPAUpdateClause(javax.persistence.EntityManager session, EntityPath<?> entity)
           
JPAUpdateClause(javax.persistence.EntityManager em, EntityPath<?> entity, JPQLTemplates templates)
           
 
Method Summary
 long execute()
          Execute the clause and return the amount of affected rows
 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
<T> JPAUpdateClause
setNull(Path<T> path)
          Bind the given path to null
 String toString()
           
 JPAUpdateClause where(Predicate... o)
          Adds the given filter conditions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JPAUpdateClause

public JPAUpdateClause(javax.persistence.EntityManager session,
                       EntityPath<?> entity)

JPAUpdateClause

public JPAUpdateClause(javax.persistence.EntityManager em,
                       EntityPath<?> entity,
                       JPQLTemplates templates)
Method Detail

execute

public long execute()
Description copied from interface: DMLClause
Execute the clause and return the amount of affected rows

Specified by:
execute in interface DMLClause<JPAUpdateClause>
Returns:

set

public <T> JPAUpdateClause set(Path<T> path,
                               T value)
Description copied from interface: StoreClause
Add a value binding

Specified by:
set in interface StoreClause<JPAUpdateClause>
Parameters:
path - path to be updated
value - value to set
Returns:

set

public <T> JPAUpdateClause set(Path<T> path,
                               Expression<? extends T> expression)
Description copied from interface: StoreClause
Add an expression binding

Specified by:
set in interface StoreClause<JPAUpdateClause>
Returns:

setNull

public <T> JPAUpdateClause setNull(Path<T> path)
Description copied from interface: StoreClause
Bind the given path to null

Specified by:
setNull in interface StoreClause<JPAUpdateClause>
Returns:

set

public JPAUpdateClause set(List<? extends Path<?>> paths,
                           List<?> values)
Description copied from interface: UpdateClause
Set the paths to be updated

Specified by:
set in interface UpdateClause<JPAUpdateClause>
Returns:

where

public JPAUpdateClause where(Predicate... o)
Description copied from interface: FilteredClause
Adds the given filter conditions

Specified by:
where in interface FilteredClause<JPAUpdateClause>
Parameters:
o - filter conditions to be added
Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.