public class JPAInsertClause extends java.lang.Object implements InsertClause<JPAInsertClause>
Constructor and Description |
---|
JPAInsertClause(javax.persistence.EntityManager em,
EntityPath<?> entity) |
JPAInsertClause(javax.persistence.EntityManager em,
EntityPath<?> entity,
JPQLTemplates templates) |
Modifier and Type | Method and Description |
---|---|
JPAInsertClause |
columns(Path<?>... columns)
Define the columns to be populated
|
long |
execute()
Execute the clause and return the amount of affected rows
|
boolean |
isEmpty()
Returns true, if no bindings have been set, otherwise false.
|
JPAInsertClause |
select(SubQueryExpression<?> sq)
Define the populate via subquery
|
<T> JPAInsertClause |
set(Path<T> path,
Expression<? extends T> expression)
Add an expression binding
|
<T> JPAInsertClause |
set(Path<T> path,
T value)
Add a value binding
|
JPAInsertClause |
setLockMode(javax.persistence.LockModeType lockMode) |
<T> JPAInsertClause |
setNull(Path<T> path)
Bind the given path to null
|
java.lang.String |
toString() |
JPAInsertClause |
values(java.lang.Object... v)
Define the value bindings
|
public JPAInsertClause(javax.persistence.EntityManager em, EntityPath<?> entity)
public JPAInsertClause(javax.persistence.EntityManager em, EntityPath<?> entity, JPQLTemplates templates)
public long execute()
DMLClause
execute
in interface DMLClause<JPAInsertClause>
public JPAInsertClause setLockMode(javax.persistence.LockModeType lockMode)
public java.lang.String toString()
toString
in class java.lang.Object
public JPAInsertClause columns(Path<?>... columns)
InsertClause
columns
in interface InsertClause<JPAInsertClause>
columns
- columns to be populatedpublic JPAInsertClause select(SubQueryExpression<?> sq)
InsertClause
select
in interface InsertClause<JPAInsertClause>
sq
- sub query to be used for populationpublic JPAInsertClause values(java.lang.Object... v)
InsertClause
values
in interface InsertClause<JPAInsertClause>
v
- values to be insertedpublic boolean isEmpty()
StoreClause
isEmpty
in interface StoreClause<JPAInsertClause>
public <T> JPAInsertClause set(Path<T> path, T value)
StoreClause
set
in interface StoreClause<JPAInsertClause>
path
- path to be updatedvalue
- value to setpublic <T> JPAInsertClause set(Path<T> path, Expression<? extends T> expression)
StoreClause
set
in interface StoreClause<JPAInsertClause>
path
- path to be updatedexpression
- bindingpublic <T> JPAInsertClause setNull(Path<T> path)
StoreClause
setNull
in interface StoreClause<JPAInsertClause>
path
- path to be updatedCopyright © 2007–2021 Querydsl. All rights reserved.