Package com.blazebit.persistence
Interface ModificationCriteriaBuilder<X extends ModificationCriteriaBuilder<X>>
- Type Parameters:
X
- The concrete builder type
- All Superinterfaces:
BaseModificationCriteriaBuilder<X>
,BaseWhereBuilder<X>
,CommonQueryBuilder<X>
,ConfigurationSource
,CTEBuilder<X>
,Executable
,FromBaseBuilder<X>
,FromBuilder<X>
,FromProvider
,ParameterHolder<X>
,ServiceProvider
,WhereBuilder<X>
- All Known Subinterfaces:
DeleteCriteriaBuilder<T>
,InsertCriteriaBuilder<T>
,UpdateCriteriaBuilder<T>
public interface ModificationCriteriaBuilder<X extends ModificationCriteriaBuilder<X>>
extends Executable, CommonQueryBuilder<X>, BaseModificationCriteriaBuilder<X>, CTEBuilder<X>
A builder for modification queries.
- Since:
- 1.1.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescription<T> ReturningResult<T>
executeWithReturning
(ReturningObjectBuilder<T> objectBuilder) Executes the modification query and returns an object consisting of the attributes applied by the object builder.ReturningResult<javax.persistence.Tuple>
executeWithReturning
(String... attributes) Executes the modification query and returns the given attributes as tuples.<T> ReturningResult<T>
executeWithReturning
(String attribute, Class<T> type) Executes the modification query and returns the given attribute with the specified type.getRoot()
Returns the query root.<T> javax.persistence.TypedQuery<ReturningResult<T>>
getWithReturningQuery
(ReturningObjectBuilder<T> objectBuilder) Creates a query that contains the modification query and returns an object consisting of the attributes applied by the object builder.javax.persistence.TypedQuery<ReturningResult<javax.persistence.Tuple>>
getWithReturningQuery
(String... attributes) Creates a query that contains the modification query and returns the given attributes as tuples.<T> javax.persistence.TypedQuery<ReturningResult<T>>
getWithReturningQuery
(String attribute, Class<T> type) Creates a query that contains the modification query and returns the given attribute with the specified type.Methods inherited from interface com.blazebit.persistence.BaseWhereBuilder
where, whereCase, whereExists, whereExists, whereExpression, whereExpressionSubqueries, whereNotExists, whereNotExists, whereSimpleCase, whereSubqueries, whereSubquery, whereSubquery, whereSubquery, whereSubquery
Methods inherited from interface com.blazebit.persistence.CommonQueryBuilder
getCriteriaBuilderFactory, getMetamodel, isCacheable, registerMacro, setCacheable, setProperties, setProperty
Methods inherited from interface com.blazebit.persistence.spi.ConfigurationSource
getProperties, getProperty
Methods inherited from interface com.blazebit.persistence.CTEBuilder
hasCte, with, with, with, with, withCtesFrom, withRecursive, withReturning, withStartSet, withStartSet
Methods inherited from interface com.blazebit.persistence.Executable
executeUpdate, getQuery, getQueryString
Methods inherited from interface com.blazebit.persistence.FromBaseBuilder
fromEntitySubquery, fromEntitySubquery, fromEntitySubquery, fromSubquery, fromSubquery
Methods inherited from interface com.blazebit.persistence.FromBuilder
from, from, from, from, fromIdentifiableValues, fromIdentifiableValues, fromIdentifiableValues, fromIdentifiableValues, fromNew, fromNew, fromOld, fromOld, fromValues, fromValues, fromValues, fromValues, getFrom, getFromByPath, getPath, getRequiredPath, getRoots, innerJoin, innerJoinDefault, innerJoinDefaultOn, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnEntitySubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralOnSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinLateralSubquery, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOn, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnEntitySubquery, innerJoinOnSubquery, innerJoinOnSubquery, innerJoinOnSubquery, innerJoinOnSubquery, join, joinDefault, joinDefaultOn, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnEntitySubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralOnSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinLateralSubquery, joinOn, joinOn, joinOn, joinOn, joinOn, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnEntitySubquery, joinOnSubquery, joinOnSubquery, joinOnSubquery, joinOnSubquery, leftJoin, leftJoinDefault, leftJoinDefaultOn, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnEntitySubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralOnSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinLateralSubquery, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOn, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnEntitySubquery, leftJoinOnSubquery, leftJoinOnSubquery, leftJoinOnSubquery, leftJoinOnSubquery, rightJoin, rightJoinDefault, rightJoinDefaultOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOn, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnEntitySubquery, rightJoinOnSubquery, rightJoinOnSubquery, rightJoinOnSubquery, rightJoinOnSubquery
Methods inherited from interface com.blazebit.persistence.ParameterHolder
containsParameter, getParameter, getParameters, getParameterValue, isParameterSet, registerCriteriaParameter, setParameter, setParameter, setParameter, setParameterType
Methods inherited from interface com.blazebit.persistence.spi.ServiceProvider
getService
Methods inherited from interface com.blazebit.persistence.WhereBuilder
setWhereExpression, setWhereExpressionSubqueries, where, whereOr
-
Method Details
-
getRoot
From getRoot()Returns the query root.- Returns:
- The root of this query
- Since:
- 1.2.0
-
executeWithReturning
Executes the modification query and returns the given attributes as tuples.- Parameters:
attributes
- The attributes of a changed entity to return- Returns:
- A result wrapper containing the update count and the new values of the attributes
-
executeWithReturning
Executes the modification query and returns the given attribute with the specified type.- Type Parameters:
T
- The result type of the attribute- Parameters:
attribute
- The attribute of a changed entity to returntype
- The type of the attribute- Returns:
- A result wrapper containing the update count and the new value of the attribute
-
executeWithReturning
Executes the modification query and returns an object consisting of the attributes applied by the object builder.- Type Parameters:
T
- The type of the object constructed by the object builder- Parameters:
objectBuilder
- The object builder that applies attributes and constructs the result objects- Returns:
- A result wrapper containing the update count and the objects constructed by the obbject builder
-
getWithReturningQuery
javax.persistence.TypedQuery<ReturningResult<javax.persistence.Tuple>> getWithReturningQuery(String... attributes) Creates a query that contains the modification query and returns the given attributes as tuples.- Parameters:
attributes
- The attributes of a changed entity to return- Returns:
- A result wrapper containing the update count and the new values of the attributes
-
getWithReturningQuery
<T> javax.persistence.TypedQuery<ReturningResult<T>> getWithReturningQuery(String attribute, Class<T> type) Creates a query that contains the modification query and returns the given attribute with the specified type.- Type Parameters:
T
- The result type of the attribute- Parameters:
attribute
- The attribute of a changed entity to returntype
- The type of the attribute- Returns:
- A result wrapper containing the update count and the new value of the attribute
-
getWithReturningQuery
<T> javax.persistence.TypedQuery<ReturningResult<T>> getWithReturningQuery(ReturningObjectBuilder<T> objectBuilder) Creates a query that contains the modification query and returns an object consisting of the attributes applied by the object builder.- Type Parameters:
T
- The type of the object constructed by the object builder- Parameters:
objectBuilder
- The object builder that applies attributes and constructs the result objects- Returns:
- A result wrapper containing the update count and the objects constructed by the obbject builder
-