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
,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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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.From
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.ParameterHolder
containsParameter, getParameter, getParameters, getParameterValue, isParameterSet, setParameter, setParameter, setParameter, setParameterType
-
Methods inherited from interface com.blazebit.persistence.spi.ServiceProvider
getService
-
Methods inherited from interface com.blazebit.persistence.WhereBuilder
setWhereExpression, setWhereExpressionSubqueries, whereOr
-
-
-
-
Method Detail
-
getRoot
From getRoot()
Returns the query root.- Returns:
- The root of this query
- Since:
- 1.2.0
-
executeWithReturning
ReturningResult<javax.persistence.Tuple> executeWithReturning(String... attributes)
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
<T> ReturningResult<T> executeWithReturning(String attribute, Class<T> type)
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
<T> ReturningResult<T> executeWithReturning(ReturningObjectBuilder<T> objectBuilder)
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
-
-