public class SQLUpdateClause extends AbstractSQLClause<SQLUpdateClause> implements UpdateClause<SQLUpdateClause>
configuration| Constructor and Description |
|---|
SQLUpdateClause(java.sql.Connection connection,
Configuration configuration,
RelationalPath<?> entity) |
SQLUpdateClause(java.sql.Connection connection,
SQLTemplates templates,
RelationalPath<?> entity) |
| Modifier and Type | Method and Description |
|---|---|
SQLUpdateClause |
addBatch()
Add the current state of bindings as a batch item
|
SQLUpdateClause |
addFlag(QueryFlag.Position position,
Expression<?> flag)
Add the given Expression at the given position as a query flag
|
SQLUpdateClause |
addFlag(QueryFlag.Position position,
java.lang.String flag)
Add the given String literal at the given position as a query flag
|
long |
execute()
Execute the clause and return the amount of affected rows
|
boolean |
isEmpty()
Returns true, if no bindings have been set, otherwise false.
|
SQLUpdateClause |
populate(java.lang.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(java.util.List<? extends Path<?>> paths,
java.util.List<?> values)
Set the paths to be updated
|
<T> SQLUpdateClause |
set(Path<T> path,
Expression<? extends T> expression)
Add an expression binding
|
<T> SQLUpdateClause |
set(Path<T> path,
T value)
Add a value binding
|
<T> SQLUpdateClause |
setNull(Path<T> path)
Bind the given path to null
|
java.lang.String |
toString() |
SQLUpdateClause |
where(Predicate... o)
Adds the given filter conditions
|
SQLUpdateClause |
where(Predicate p) |
close, close, executeBatch, setParameterspublic SQLUpdateClause(java.sql.Connection connection,
SQLTemplates templates,
RelationalPath<?> entity)
public SQLUpdateClause(java.sql.Connection connection,
Configuration configuration,
RelationalPath<?> entity)
public SQLUpdateClause addFlag(QueryFlag.Position position, java.lang.String flag)
position - flag - public SQLUpdateClause addFlag(QueryFlag.Position position, Expression<?> flag)
position - flag - public SQLUpdateClause addBatch()
public long execute()
DMLClauseexecute in interface DMLClause<SQLUpdateClause>public <T> SQLUpdateClause set(Path<T> path, T value)
StoreClauseset in interface StoreClause<SQLUpdateClause>path - path to be updatedvalue - value to setpublic <T> SQLUpdateClause set(Path<T> path, Expression<? extends T> expression)
StoreClauseset in interface StoreClause<SQLUpdateClause>public <T> SQLUpdateClause setNull(Path<T> path)
StoreClausesetNull in interface StoreClause<SQLUpdateClause>public SQLUpdateClause set(java.util.List<? extends Path<?>> paths, java.util.List<?> values)
UpdateClauseset in interface UpdateClause<SQLUpdateClause>public SQLUpdateClause where(Predicate p)
public SQLUpdateClause where(Predicate... o)
FilteredClausewhere in interface FilteredClause<SQLUpdateClause>o - filter conditions to be addedpublic java.lang.String toString()
toString in class java.lang.Objectpublic SQLUpdateClause populate(java.lang.Object bean)
bean - public <T> SQLUpdateClause populate(T obj, Mapper<T> mapper)
obj - mapper - public boolean isEmpty()
StoreClauseisEmpty in interface StoreClause<SQLUpdateClause>Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.