com.mysema.query.sql.dml
Class SQLInsertClause

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

public class SQLInsertClause
extends AbstractSQLClause
implements InsertClause<SQLInsertClause>

SQLInsertClause defines an INSERT INTO clause

Author:
tiwe

Field Summary
 
Fields inherited from class com.mysema.query.sql.dml.AbstractSQLClause
configuration
 
Constructor Summary
SQLInsertClause(Connection connection, Configuration configuration, PEntity<?> entity)
           
SQLInsertClause(Connection connection, SQLTemplates templates, PEntity<?> entity)
           
 
Method Summary
protected  void close(PreparedStatement stmt)
           
protected  void close(ResultSet rs)
           
 SQLInsertClause columns(Path<?>... columns)
          Define the columns to be populated
 long execute()
          Execute the clause and return the amount of affected rows
<T> T
executeWithKey(Path<T> path)
           
 ResultSet executeWithKeys()
           
<T> List<T>
executeWithKeys(Path<T> path)
           
 SQLInsertClause select(SubQuery<?> subQuery)
          Define the populate via subquery
<T> SQLInsertClause
set(Path<T> path, T value)
          Add a value binding
 String toString()
           
 SQLInsertClause values(Object... v)
          Define the value bindings
 
Methods inherited from class com.mysema.query.sql.dml.AbstractSQLClause
setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLInsertClause

public SQLInsertClause(Connection connection,
                       SQLTemplates templates,
                       PEntity<?> entity)

SQLInsertClause

public SQLInsertClause(Connection connection,
                       Configuration configuration,
                       PEntity<?> entity)
Method Detail

close

protected void close(PreparedStatement stmt)

close

protected void close(ResultSet rs)

columns

public SQLInsertClause columns(Path<?>... columns)
Description copied from interface: InsertClause
Define the columns to be populated

Specified by:
columns in interface InsertClause<SQLInsertClause>
Returns:

executeWithKey

@Nullable
public <T> T executeWithKey(Path<T> path)

executeWithKeys

public <T> List<T> executeWithKeys(Path<T> path)

executeWithKeys

public ResultSet executeWithKeys()

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<SQLInsertClause>
Returns:

select

public SQLInsertClause select(SubQuery<?> subQuery)
Description copied from interface: InsertClause
Define the populate via subquery

Specified by:
select in interface InsertClause<SQLInsertClause>
Returns:

set

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

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

values

public SQLInsertClause values(Object... v)
Description copied from interface: InsertClause
Define the value bindings

Specified by:
values in interface InsertClause<SQLInsertClause>
Returns:

toString

public String toString()
Overrides:
toString in class Object


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