AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.database.UpdateQuery

public class UpdateQuery
extends java.lang.Object
UpdateQuery for building and execution of UPDATE SQL statements

Constructor Summary

Constructors 
UpdateQuery​(ModelDatabase database, com.querydsl.sql.RelationalPath<?> table)  
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
long execute()
Executes update query
com.querydsl.sql.dml.SQLUpdateClause getDSLQuery()  
<T> UpdateQuery set​(com.querydsl.core.types.Path<T> column, com.querydsl.core.types.Expression<? extends T> value)
Set column with its value to update with
<T> UpdateQuery set​(com.querydsl.core.types.Path<T> column, T value)
Set column with its value to update with
UpdateQuery set​(java.util.List<? extends com.querydsl.core.types.Path<?>> columns, java.util.List<?> values)
Set columns with its values to update with
UpdateQuery where​(com.querydsl.core.types.Predicate condition)
Add a condition to identify rows that have to be updated
UpdateQuery where​(com.querydsl.core.types.Predicate... conditions)
Add conditions to identify rows that have to be updated
Modifier and Type Method Description

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UpdateQuery

@AnyLogicInternalAPI
public UpdateQuery​(ModelDatabase database,
                   com.querydsl.sql.RelationalPath<?> table)

Method Detail

getDSLQuery

@AnyLogicInternalAPI
public com.querydsl.sql.dml.SQLUpdateClause getDSLQuery()

execute

public long execute()
Executes update query
Returns:
updated rows number

set

public UpdateQuery set​(java.util.List<? extends com.querydsl.core.types.Path<?>> columns,
                       java.util.List<?> values)
Set columns with its values to update with
Parameters:
columns - columns to update
values - values of that columns
Returns:
UpdateQuery

set

public <T> UpdateQuery set​(com.querydsl.core.types.Path<T> column,
                           com.querydsl.core.types.Expression<? extends T> value)
Set column with its value to update with
Parameters:
column - column to update
value - value of that column
Returns:
UpdateQuery

set

public <T> UpdateQuery set​(com.querydsl.core.types.Path<T> column,
                           T value)
Set column with its value to update with
Parameters:
column - column to update
value - value of that column
Returns:
UpdateQuery

where

public UpdateQuery where​(com.querydsl.core.types.Predicate condition)
Add a condition to identify rows that have to be updated
Returns:
UpdateQuery

where

public UpdateQuery where​(com.querydsl.core.types.Predicate... conditions)
Add conditions to identify rows that have to be updated
Returns:
UpdateQuery
How can we improve this article?