public class IdGeneratingSQLInsertClause
extends com.querydsl.sql.dml.SQLInsertClause
Constructor and Description |
---|
IdGeneratingSQLInsertClause(Connection con,
com.querydsl.sql.SQLTemplates dialect,
JiraRelationalPathBase<?> entity,
org.ofbiz.core.entity.DelegatorInterface delegatorInterface) |
Modifier and Type | Method and Description |
---|---|
IdGeneratingSQLInsertClause |
addFlag(com.querydsl.core.QueryFlag.Position position,
com.querydsl.core.types.Expression<?> flag) |
IdGeneratingSQLInsertClause |
addFlag(com.querydsl.core.QueryFlag.Position position,
String flag) |
IdGeneratingSQLInsertClause |
columns(com.querydsl.core.types.Path<?>... columns) |
Long |
executeWithId()
Add an automatically generated "ID" column value to the insert statement and execute it.
|
IdGeneratingSQLInsertClause |
populate(Object bean) |
<T> IdGeneratingSQLInsertClause |
populate(T obj,
com.querydsl.sql.dml.Mapper<T> mapper) |
IdGeneratingSQLInsertClause |
select(com.querydsl.core.types.SubQueryExpression<?> sq) |
<T> IdGeneratingSQLInsertClause |
set(com.querydsl.core.types.Path<T> path,
com.querydsl.core.types.Expression<? extends T> expression) |
<T> IdGeneratingSQLInsertClause |
set(com.querydsl.core.types.Path<T> path,
T value) |
<T> IdGeneratingSQLInsertClause |
setNull(com.querydsl.core.types.Path<T> path) |
IdGeneratingSQLInsertClause |
values(Object... v) |
IdGeneratingSQLInsertClause |
withId()
Add an automatically generated "ID" column value to the insert statement.
|
addBatch, clear, execute, executeWithKey, executeWithKey, executeWithKeys, executeWithKeys, executeWithKeys, getBatchCount, getSQL, isEmpty, setBatchToBulk, toString
public IdGeneratingSQLInsertClause(Connection con, com.querydsl.sql.SQLTemplates dialect, JiraRelationalPathBase<?> entity, org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
public IdGeneratingSQLInsertClause withId()
This method uses the Ofbiz sequence generator to generate an Id for the relation being inserted.
Users of this method should not manually add
an "ID" using another call such as set(Path, Object)
or populate(Object)
.
@Nonnull public Long executeWithId()
This method uses the Ofbiz sequence generator to generate an Id for the relation being inserted.
Example Usage:
final Long generatedId = dbConnectionManager.executeQuery(dbConnection -> dbConnection. .insert(QProject.PROJECT) .set(QProject.PROJECT.name, "some name") .executeWithId(); );
public IdGeneratingSQLInsertClause columns(com.querydsl.core.types.Path<?>... columns)
columns
in interface com.querydsl.core.dml.InsertClause<com.querydsl.sql.dml.SQLInsertClause>
columns
in class com.querydsl.sql.dml.SQLInsertClause
public IdGeneratingSQLInsertClause select(com.querydsl.core.types.SubQueryExpression<?> sq)
select
in interface com.querydsl.core.dml.InsertClause<com.querydsl.sql.dml.SQLInsertClause>
select
in class com.querydsl.sql.dml.SQLInsertClause
public <T> IdGeneratingSQLInsertClause set(com.querydsl.core.types.Path<T> path, T value)
set
in interface com.querydsl.core.dml.StoreClause<com.querydsl.sql.dml.SQLInsertClause>
set
in class com.querydsl.sql.dml.SQLInsertClause
public <T> IdGeneratingSQLInsertClause set(com.querydsl.core.types.Path<T> path, com.querydsl.core.types.Expression<? extends T> expression)
set
in interface com.querydsl.core.dml.StoreClause<com.querydsl.sql.dml.SQLInsertClause>
set
in class com.querydsl.sql.dml.SQLInsertClause
public <T> IdGeneratingSQLInsertClause setNull(com.querydsl.core.types.Path<T> path)
setNull
in interface com.querydsl.core.dml.StoreClause<com.querydsl.sql.dml.SQLInsertClause>
setNull
in class com.querydsl.sql.dml.SQLInsertClause
public IdGeneratingSQLInsertClause values(Object... v)
values
in interface com.querydsl.core.dml.InsertClause<com.querydsl.sql.dml.SQLInsertClause>
values
in class com.querydsl.sql.dml.SQLInsertClause
public IdGeneratingSQLInsertClause populate(Object bean)
populate
in class com.querydsl.sql.dml.SQLInsertClause
public <T> IdGeneratingSQLInsertClause populate(T obj, com.querydsl.sql.dml.Mapper<T> mapper)
populate
in class com.querydsl.sql.dml.SQLInsertClause
public IdGeneratingSQLInsertClause addFlag(com.querydsl.core.QueryFlag.Position position, com.querydsl.core.types.Expression<?> flag)
addFlag
in class com.querydsl.sql.dml.SQLInsertClause
public IdGeneratingSQLInsertClause addFlag(com.querydsl.core.QueryFlag.Position position, String flag)
addFlag
in class com.querydsl.sql.dml.SQLInsertClause
Copyright © 2002-2021 Atlassian. All Rights Reserved.