public class SQLMergeClause extends AbstractSQLClause<SQLMergeClause> implements StoreClause<SQLMergeClause>
configuration
Constructor and Description |
---|
SQLMergeClause(java.sql.Connection connection,
Configuration configuration,
RelationalPath<?> entity) |
SQLMergeClause(java.sql.Connection connection,
SQLTemplates templates,
RelationalPath<?> entity) |
Modifier and Type | Method and Description |
---|---|
SQLMergeClause |
addBatch()
Add the current state of bindings as a batch item
|
SQLMergeClause |
addFlag(QueryFlag.Position position,
Expression<?> flag)
Add the given Expression at the given position as a query flag
|
SQLMergeClause |
addFlag(QueryFlag.Position position,
java.lang.String flag)
Add the given String literal at the given position as a query flag
|
SQLMergeClause |
columns(Path<?>... columns) |
long |
execute()
Execute the clause and return the amount of affected rows
|
<T> T |
executeWithKey(java.lang.Class<T> type)
Execute the clause and return the generated key cast to the given type.
|
<T> T |
executeWithKey(Path<T> path)
Execute the clause and return the generated key with the type of the given path.
|
java.sql.ResultSet |
executeWithKeys()
Execute the clause and return the generated keys as a ResultSet
|
<T> java.util.List<T> |
executeWithKeys(java.lang.Class<T> type) |
<T> java.util.List<T> |
executeWithKeys(Path<T> path)
Execute the clause and return the generated key with the type of the given path.
|
boolean |
isEmpty()
Returns true, if no bindings have been set, otherwise false.
|
SQLMergeClause |
keys(Path<?>... paths)
Set the keys to be used in the MERGE clause
|
SQLMergeClause |
select(SubQueryExpression<?> subQuery) |
<T> SQLMergeClause |
set(Path<T> path,
Expression<? extends T> expression)
Add an expression binding
|
<T> SQLMergeClause |
set(Path<T> path,
T value)
Add a value binding
|
<T> SQLMergeClause |
setNull(Path<T> path)
Bind the given path to null
|
java.lang.String |
toString() |
SQLMergeClause |
values(java.lang.Object... v) |
close, close, executeBatch, setParameters
public SQLMergeClause(java.sql.Connection connection, SQLTemplates templates, RelationalPath<?> entity)
public SQLMergeClause(java.sql.Connection connection, Configuration configuration, RelationalPath<?> entity)
public SQLMergeClause addFlag(QueryFlag.Position position, java.lang.String flag)
position
- flag
- public SQLMergeClause addFlag(QueryFlag.Position position, Expression<?> flag)
position
- flag
- public SQLMergeClause addBatch()
public SQLMergeClause columns(Path<?>... columns)
@Nullable public <T> T executeWithKey(Path<T> path)
T
- path
- public <T> T executeWithKey(java.lang.Class<T> type)
T
- type
- public <T> java.util.List<T> executeWithKeys(Path<T> path)
T
- path
- public <T> java.util.List<T> executeWithKeys(java.lang.Class<T> type)
public java.sql.ResultSet executeWithKeys()
public long execute()
DMLClause
execute
in interface DMLClause<SQLMergeClause>
public SQLMergeClause keys(Path<?>... paths)
paths
- public SQLMergeClause select(SubQueryExpression<?> subQuery)
public <T> SQLMergeClause set(Path<T> path, @Nullable T value)
StoreClause
set
in interface StoreClause<SQLMergeClause>
path
- path to be updatedvalue
- value to setpublic <T> SQLMergeClause set(Path<T> path, Expression<? extends T> expression)
StoreClause
set
in interface StoreClause<SQLMergeClause>
public <T> SQLMergeClause setNull(Path<T> path)
StoreClause
setNull
in interface StoreClause<SQLMergeClause>
public java.lang.String toString()
toString
in class java.lang.Object
public SQLMergeClause values(java.lang.Object... v)
public boolean isEmpty()
StoreClause
isEmpty
in interface StoreClause<SQLMergeClause>
Copyright © 2007-2013 Mysema Ltd. All Rights Reserved.