C
- The type extending this class.public abstract class AbstractSQLUpdateClause<C extends AbstractSQLUpdateClause<C>> extends AbstractSQLClause<C> implements UpdateClause<C>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<SQLUpdateBatch> |
batches |
protected java.util.List<java.lang.Object> |
constants |
protected RelationalPath<?> |
entity |
protected static java.util.logging.Logger |
logger |
protected QueryMetadata |
metadata |
protected java.lang.String |
queryString |
protected java.util.Map<Path<?>,Expression<?>> |
updates |
configuration, context, listeners, useLiterals
Constructor and Description |
---|
AbstractSQLUpdateClause(java.sql.Connection connection,
Configuration configuration,
RelationalPath<?> entity) |
AbstractSQLUpdateClause(java.util.function.Supplier<java.sql.Connection> connection,
Configuration configuration,
RelationalPath<?> entity) |
Modifier and Type | Method and Description |
---|---|
C |
addBatch()
Add the current state of bindings as a batch item
|
C |
addFlag(QueryFlag.Position position,
Expression<?> flag)
Add the given Expression at the given position as a query flag
|
C |
addFlag(QueryFlag.Position position,
java.lang.String flag)
Add the given String literal at the given position as a query flag
|
void |
clear()
Clear the internal state of the clause
|
protected java.sql.PreparedStatement |
createStatement() |
protected java.util.Collection<java.sql.PreparedStatement> |
createStatements() |
long |
execute() |
int |
getBatchCount() |
java.util.List<SQLBindings> |
getSQL()
Get the SQL string and bindings
|
boolean |
isEmpty() |
C |
limit(@Range(from=0L,to=2147483647L) long limit) |
C |
populate(java.lang.Object bean)
Populate the UPDATE clause with the properties of the given bean.
|
<T> C |
populate(T obj,
Mapper<T> mapper)
Populate the UPDATE clause with the properties of the given bean using the given Mapper.
|
C |
set(java.util.List<? extends Path<?>> paths,
java.util.List<?> values) |
<T> C |
set(Path<T> path,
Expression<? extends T> expression) |
<T> C |
set(Path<T> path,
T value) |
<T> C |
setNull(Path<T> path) |
java.lang.String |
toString() |
C |
where(Predicate... o) |
C |
where(Predicate p) |
addListener, close, close, close, connection, createBindings, createSerializer, endContext, executeBatch, logQuery, onException, reset, setParameters, setUseLiterals, startContext
protected static final java.util.logging.Logger logger
protected final RelationalPath<?> entity
protected final java.util.List<SQLUpdateBatch> batches
protected java.util.Map<Path<?>,Expression<?>> updates
protected QueryMetadata metadata
protected transient java.lang.String queryString
protected transient java.util.List<java.lang.Object> constants
public AbstractSQLUpdateClause(java.sql.Connection connection, Configuration configuration, RelationalPath<?> entity)
public AbstractSQLUpdateClause(java.util.function.Supplier<java.sql.Connection> connection, Configuration configuration, RelationalPath<?> entity)
public C addFlag(QueryFlag.Position position, java.lang.String flag)
position
- positionflag
- query flagpublic C addFlag(QueryFlag.Position position, Expression<?> flag)
position
- positionflag
- query flagpublic C addBatch()
public void clear()
AbstractSQLClause
clear
in class AbstractSQLClause<C extends AbstractSQLUpdateClause<C>>
protected java.sql.PreparedStatement createStatement() throws java.sql.SQLException
java.sql.SQLException
protected java.util.Collection<java.sql.PreparedStatement> createStatements() throws java.sql.SQLException
java.sql.SQLException
public long execute()
execute
in interface DMLClause<C extends AbstractSQLUpdateClause<C>>
public java.util.List<SQLBindings> getSQL()
AbstractSQLClause
getSQL
in class AbstractSQLClause<C extends AbstractSQLUpdateClause<C>>
public <T> C set(Path<T> path, T value)
set
in interface StoreClause<C extends AbstractSQLUpdateClause<C>>
public <T> C set(Path<T> path, Expression<? extends T> expression)
set
in interface StoreClause<C extends AbstractSQLUpdateClause<C>>
public <T> C setNull(Path<T> path)
setNull
in interface StoreClause<C extends AbstractSQLUpdateClause<C>>
public C set(java.util.List<? extends Path<?>> paths, java.util.List<?> values)
set
in interface UpdateClause<C extends AbstractSQLUpdateClause<C>>
public C where(Predicate... o)
where
in interface FilteredClause<C extends AbstractSQLUpdateClause<C>>
public C limit(@Range(from=0L,to=2147483647L) long limit)
public java.lang.String toString()
toString
in class java.lang.Object
public C populate(java.lang.Object bean)
bean
- bean to use for populationpublic <T> C populate(T obj, Mapper<T> mapper)
obj
- object to use for populationmapper
- mapper to usepublic boolean isEmpty()
isEmpty
in interface StoreClause<C extends AbstractSQLUpdateClause<C>>
public int getBatchCount()
getBatchCount
in class AbstractSQLClause<C extends AbstractSQLUpdateClause<C>>
Copyright © 2007–2021 Querydsl. All rights reserved.