com.mysema.query.jpa.hibernate
Class HibernateUpdateClause

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

public class HibernateUpdateClause
extends Object
implements UpdateClause<HibernateUpdateClause>

UpdateClause implementation for Hibernate

Author:
tiwe

Constructor Summary
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)
           
 
Method Summary
 long execute()
          Execute the clause and return the amount of affected rows
 HibernateUpdateClause set(List<? extends Path<?>> paths, 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
<T> HibernateUpdateClause
setNull(Path<T> path)
          Bind the given path to null
 String toString()
           
 HibernateUpdateClause 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

HibernateUpdateClause

public HibernateUpdateClause(org.hibernate.Session session,
                             EntityPath<?> entity)

HibernateUpdateClause

public HibernateUpdateClause(org.hibernate.StatelessSession session,
                             EntityPath<?> entity)

HibernateUpdateClause

public HibernateUpdateClause(org.hibernate.Session session,
                             EntityPath<?> entity,
                             JPQLTemplates templates)

HibernateUpdateClause

public HibernateUpdateClause(SessionHolder session,
                             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<HibernateUpdateClause>
Returns:

set

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

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

set

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

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

setNull

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

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

set

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

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

where

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

Specified by:
where in interface FilteredClause<HibernateUpdateClause>
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.