com.mysema.query.sql.dml
Class SQLMergeClause

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

public class SQLMergeClause
extends AbstractSQLClause
implements StoreClause<SQLMergeClause>

SQLMergeClause defines an MERGE INTO clause

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.sql.dml.AbstractSQLClause
configuration
 
Constructor Summary
SQLMergeClause(Connection connection, Configuration configuration, RelationalPath<?> entity)
           
SQLMergeClause(Connection connection, SQLTemplates templates, RelationalPath<?> entity)
           
 
Method Summary
 SQLMergeClause addBatch()
          Add the current state of bindings as a batch item
 SQLMergeClause addFlag(QueryFlag.Position position, 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
 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
 String toString()
           
 SQLMergeClause values(Object... v)
           
 
Methods inherited from class com.mysema.query.sql.dml.AbstractSQLClause
close, close, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLMergeClause

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

SQLMergeClause

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

addFlag

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

Parameters:
position -
flag -
Returns:

addBatch

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

Returns:

columns

public SQLMergeClause columns(Path<?>... columns)

execute

public long execute()
Description copied from interface: DMLClause
Execute the clause and return the amount of affected rows

Specified by:
execute in interface DMLClause<SQLMergeClause>
Returns:

keys

public SQLMergeClause keys(Path<?>... paths)
Set the keys to be used in the MERGE clause

Parameters:
paths -
Returns:

select

public SQLMergeClause select(SubQueryExpression<?> subQuery)

set

public <T> SQLMergeClause set(Path<T> path,
                              @Nullable
                              T value)
Description copied from interface: StoreClause
Add a value binding

Specified by:
set in interface StoreClause<SQLMergeClause>
Parameters:
path - path to be updated
value - value to set
Returns:

set

public <T> SQLMergeClause set(Path<T> path,
                              Expression<? extends T> expression)
Description copied from interface: StoreClause
Add an expression binding

Specified by:
set in interface StoreClause<SQLMergeClause>
Returns:

setNull

public <T> SQLMergeClause setNull(Path<T> path)
Description copied from interface: StoreClause
Bind the given path to null

Specified by:
setNull in interface StoreClause<SQLMergeClause>
Returns:

toString

public String toString()
Overrides:
toString in class Object

values

public SQLMergeClause values(Object... v)


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