com.mysema.query.sql.dml
Class SQLUpdateClause

java.lang.Object
  extended by com.mysema.query.sql.dml.AbstractSQLClause<SQLUpdateClause>
      extended by com.mysema.query.sql.dml.SQLUpdateClause
All Implemented Interfaces:
com.mysema.query.dml.DMLClause<SQLUpdateClause>, com.mysema.query.dml.StoreClause<SQLUpdateClause>, com.mysema.query.dml.UpdateClause<SQLUpdateClause>, com.mysema.query.FilteredClause<SQLUpdateClause>

public class SQLUpdateClause
extends AbstractSQLClause<SQLUpdateClause>
implements com.mysema.query.dml.UpdateClause<SQLUpdateClause>

SQLUpdateClause defines a UPDATE clause

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.sql.dml.AbstractSQLClause
configuration
 
Constructor Summary
SQLUpdateClause(Connection connection, Configuration configuration, RelationalPath<?> entity)
           
SQLUpdateClause(Connection connection, SQLTemplates templates, RelationalPath<?> entity)
           
 
Method Summary
 SQLUpdateClause addBatch()
          Add the current state of bindings as a batch item
 SQLUpdateClause addFlag(com.mysema.query.QueryFlag.Position position, com.mysema.query.types.Expression<?> flag)
          Add the given Expression at the given position as a query flag
 SQLUpdateClause addFlag(com.mysema.query.QueryFlag.Position position, String flag)
          Add the given String literal at the given position as a query flag
 long execute()
           
 SQLUpdateClause populate(Object bean)
          Populate the UPDATE clause with the properties of the given bean.
<T> SQLUpdateClause
populate(T obj, Mapper<T> mapper)
          Populate the UPDATE clause with the properties of the given bean using the given Mapper.
 SQLUpdateClause set(List<? extends com.mysema.query.types.Path<?>> paths, List<?> values)
           
<T> SQLUpdateClause
set(com.mysema.query.types.Path<T> path, com.mysema.query.types.Expression<? extends T> expression)
           
<T> SQLUpdateClause
set(com.mysema.query.types.Path<T> path, T value)
           
<T> SQLUpdateClause
setNull(com.mysema.query.types.Path<T> path)
           
 String toString()
           
 SQLUpdateClause where(com.mysema.query.types.Predicate... o)
           
 
Methods inherited from class com.mysema.query.sql.dml.AbstractSQLClause
close, close, executeBatch, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLUpdateClause

public SQLUpdateClause(Connection connection,
                       SQLTemplates templates,
                       RelationalPath<?> entity)

SQLUpdateClause

public SQLUpdateClause(Connection connection,
                       Configuration configuration,
                       RelationalPath<?> entity)
Method Detail

addFlag

public SQLUpdateClause addFlag(com.mysema.query.QueryFlag.Position position,
                               String flag)
Add the given String literal at the given position as a query flag

Parameters:
position -
flag -
Returns:

addFlag

public SQLUpdateClause addFlag(com.mysema.query.QueryFlag.Position position,
                               com.mysema.query.types.Expression<?> flag)
Add the given Expression at the given position as a query flag

Parameters:
position -
flag -
Returns:

addBatch

public SQLUpdateClause addBatch()
Add the current state of bindings as a batch item

Returns:

execute

public long execute()
Specified by:
execute in interface com.mysema.query.dml.DMLClause<SQLUpdateClause>

set

public <T> SQLUpdateClause set(com.mysema.query.types.Path<T> path,
                               T value)
Specified by:
set in interface com.mysema.query.dml.StoreClause<SQLUpdateClause>

set

public <T> SQLUpdateClause set(com.mysema.query.types.Path<T> path,
                               com.mysema.query.types.Expression<? extends T> expression)
Specified by:
set in interface com.mysema.query.dml.StoreClause<SQLUpdateClause>

setNull

public <T> SQLUpdateClause setNull(com.mysema.query.types.Path<T> path)
Specified by:
setNull in interface com.mysema.query.dml.StoreClause<SQLUpdateClause>

set

public SQLUpdateClause set(List<? extends com.mysema.query.types.Path<?>> paths,
                           List<?> values)
Specified by:
set in interface com.mysema.query.dml.UpdateClause<SQLUpdateClause>

where

public SQLUpdateClause where(com.mysema.query.types.Predicate... o)
Specified by:
where in interface com.mysema.query.FilteredClause<SQLUpdateClause>

toString

public String toString()
Overrides:
toString in class Object

populate

public SQLUpdateClause populate(Object bean)
Populate the UPDATE clause with the properties of the given bean. The properties need to match the fields of the clause's entity instance. Primary key columns are skipped in the population.

Parameters:
bean -
Returns:

populate

public <T> SQLUpdateClause populate(T obj,
                                    Mapper<T> mapper)
Populate the UPDATE clause with the properties of the given bean using the given Mapper.

Parameters:
obj -
mapper -
Returns:


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