public class SQLUpdateClause extends AbstractSQLClause<SQLUpdateClause> implements UpdateClause<SQLUpdateClause>
SQLUpdateClause defines a UPDATE clauseconfiguration, context, listeners, useLiterals| Constructor and Description |
|---|
SQLUpdateClause(Connection connection,
Configuration configuration,
RelationalPath<?> entity) |
SQLUpdateClause(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,
String flag)
Add the given String literal at the given position as a query flag
|
long |
execute() |
List<SQLBindings> |
getSQL()
Get the SQL string and bindings
|
boolean |
isEmpty() |
SQLUpdateClause |
limit(long limit) |
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 Path<?>> paths,
List<?> values) |
<T> SQLUpdateClause |
set(Path<T> path,
Expression<? extends T> expression) |
<T> SQLUpdateClause |
set(Path<T> path,
T value) |
<T> SQLUpdateClause |
setNull(Path<T> path) |
String |
toString() |
SQLUpdateClause |
where(Predicate... o) |
SQLUpdateClause |
where(Predicate p) |
addListener, cleanupMDC, close, close, close, createBindings, createSerializer, endContext, executeBatch, logQuery, onException, reset, setParameters, setUseLiterals, startContextpublic SQLUpdateClause(Connection connection, SQLTemplates templates, RelationalPath<?> entity)
public SQLUpdateClause(Connection connection, Configuration configuration, RelationalPath<?> entity)
public SQLUpdateClause addFlag(QueryFlag.Position position, String flag)
position - positionflag - query flagpublic SQLUpdateClause addFlag(QueryFlag.Position position, Expression<?> flag)
position - positionflag - query flagpublic SQLUpdateClause addBatch()
public long execute()
execute in interface DMLClause<SQLUpdateClause>public List<SQLBindings> getSQL()
AbstractSQLClausegetSQL in class AbstractSQLClause<SQLUpdateClause>public <T> SQLUpdateClause set(Path<T> path, T value)
set in interface StoreClause<SQLUpdateClause>public <T> SQLUpdateClause set(Path<T> path, Expression<? extends T> expression)
set in interface StoreClause<SQLUpdateClause>public <T> SQLUpdateClause setNull(Path<T> path)
setNull in interface StoreClause<SQLUpdateClause>public SQLUpdateClause set(List<? extends Path<?>> paths, List<?> values)
set in interface UpdateClause<SQLUpdateClause>public SQLUpdateClause where(Predicate p)
public SQLUpdateClause where(Predicate... o)
where in interface FilteredClause<SQLUpdateClause>public SQLUpdateClause limit(@Nonnegative long limit)
public SQLUpdateClause populate(Object bean)
bean - bean to use for populationpublic <T> SQLUpdateClause populate(T obj, Mapper<T> mapper)
obj - object to use for populationmapper - mapper to usepublic boolean isEmpty()
isEmpty in interface StoreClause<SQLUpdateClause>Copyright © 2007–2015 Mysema Ltd. All rights reserved.