Class AbstractPersistentEntityCriteriaUpdate<T>
java.lang.Object
io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityCriteriaUpdate<T>
- Type Parameters:
T
- The entity type
- All Implemented Interfaces:
QueryModelPersistentEntityCriteriaQuery
,QueryResultPersistentEntityCriteriaQuery
,PersistentEntityCriteriaUpdate<T>
,jakarta.persistence.criteria.CommonAbstractCriteria
,jakarta.persistence.criteria.CriteriaUpdate<T>
@Internal
public abstract class AbstractPersistentEntityCriteriaUpdate<T>
extends Object
implements PersistentEntityCriteriaUpdate<T>, QueryResultPersistentEntityCriteriaQuery
The abstract implementation of
PersistentEntityCriteriaUpdate
.- Since:
- 3.2
- Author:
- Denis Stepanov
-
Field Summary
Modifier and TypeFieldDescriptionprotected PersistentEntityRoot<T>
protected jakarta.persistence.criteria.Predicate
protected jakarta.persistence.criteria.Selection<?>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildQuery
(QueryBuilder queryBuilder) protected QueryModelPredicateVisitor
createPredicateVisitor
(QueryModel queryModel) Creates query model predicate visitor.abstract PersistentEntityRoot<T>
from
(PersistentEntity persistentEntity) abstract PersistentEntityRoot<T>
Set<jakarta.persistence.criteria.ParameterExpression<?>>
@NonNull QueryModel
final jakarta.persistence.criteria.Predicate
getRoot()
final boolean
The returning result of the query.returningMulti
(@NonNull jakarta.persistence.criteria.Selection<?>... selections) The returning result of the query.returningMulti
(List<jakarta.persistence.criteria.Selection<?>> selectionList) The returning result of the query.set
(jakarta.persistence.criteria.Path<Y> attribute, jakarta.persistence.criteria.Expression<? extends Y> value) <Y,
X extends Y>
PersistentEntityCriteriaUpdate<T>set
(jakarta.persistence.criteria.Path<Y> attribute, X value) set
(jakarta.persistence.metamodel.SingularAttribute<? super T, Y> attribute, jakarta.persistence.criteria.Expression<? extends Y> value) <Y,
X extends Y>
PersistentEntityCriteriaUpdate<T>protected void
Set update value.<U> jakarta.persistence.criteria.Subquery<U>
where
(jakarta.persistence.criteria.Predicate... restrictions)
-
Field Details
-
predicate
protected jakarta.persistence.criteria.Predicate predicate -
entityRoot
-
updateValues
-
returning
protected jakarta.persistence.criteria.Selection<?> returning
-
-
Constructor Details
-
AbstractPersistentEntityCriteriaUpdate
public AbstractPersistentEntityCriteriaUpdate()
-
-
Method Details
-
buildQuery
- Specified by:
buildQuery
in interfaceQueryResultPersistentEntityCriteriaQuery
-
getQueryModel
- Specified by:
getQueryModel
in interfaceQueryModelPersistentEntityCriteriaQuery
-
createPredicateVisitor
Creates query model predicate visitor.- Parameters:
queryModel
- The query model- Returns:
- the visitor
-
from
- Specified by:
from
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
from
in interfacePersistentEntityCriteriaUpdate<T>
-
from
- Specified by:
from
in interfacePersistentEntityCriteriaUpdate<T>
-
from
- Specified by:
from
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
from
in interfacePersistentEntityCriteriaUpdate<T>
-
getRoot
- Specified by:
getRoot
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
getRoot
in interfacePersistentEntityCriteriaUpdate<T>
-
set
public <Y,X extends Y> PersistentEntityCriteriaUpdate<T> set(jakarta.persistence.metamodel.SingularAttribute<? super T, Y> attribute, X value) - Specified by:
set
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
set
in interfacePersistentEntityCriteriaUpdate<T>
-
set
public <Y> PersistentEntityCriteriaUpdate<T> set(jakarta.persistence.metamodel.SingularAttribute<? super T, Y> attribute, jakarta.persistence.criteria.Expression<? extends Y> value) - Specified by:
set
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
set
in interfacePersistentEntityCriteriaUpdate<T>
-
set
public <Y,X extends Y> PersistentEntityCriteriaUpdate<T> set(jakarta.persistence.criteria.Path<Y> attribute, X value) - Specified by:
set
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
set
in interfacePersistentEntityCriteriaUpdate<T>
-
set
public <Y> PersistentEntityCriteriaUpdate<T> set(jakarta.persistence.criteria.Path<Y> attribute, jakarta.persistence.criteria.Expression<? extends Y> value) - Specified by:
set
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
set
in interfacePersistentEntityCriteriaUpdate<T>
-
set
- Specified by:
set
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
set
in interfacePersistentEntityCriteriaUpdate<T>
-
setValue
Set update value.- Parameters:
attributeName
- The attribute namevalue
- The value
-
where
public PersistentEntityCriteriaUpdate<T> where(jakarta.persistence.criteria.Expression<Boolean> restriction) - Specified by:
where
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
where
in interfacePersistentEntityCriteriaUpdate<T>
-
where
public PersistentEntityCriteriaUpdate<T> where(jakarta.persistence.criteria.Predicate... restrictions) - Specified by:
where
in interfacejakarta.persistence.criteria.CriteriaUpdate<T>
- Specified by:
where
in interfacePersistentEntityCriteriaUpdate<T>
-
getRestriction
public final jakarta.persistence.criteria.Predicate getRestriction()- Specified by:
getRestriction
in interfacejakarta.persistence.criteria.CommonAbstractCriteria
-
subquery
- Specified by:
subquery
in interfacejakarta.persistence.criteria.CommonAbstractCriteria
-
hasVersionRestriction
public final boolean hasVersionRestriction() -
getUpdateValues
-
getParameters
- Specified by:
getParameters
in interfacePersistentEntityCriteriaUpdate<T>
-
returning
public PersistentEntityCriteriaUpdate<T> returning(jakarta.persistence.criteria.Selection<? extends T> selection) Description copied from interface:PersistentEntityCriteriaUpdate
The returning result of the query.- Specified by:
returning
in interfacePersistentEntityCriteriaUpdate<T>
- Parameters:
selection
- The selection to return- Returns:
- The update criteria.
-
returningMulti
public PersistentEntityCriteriaUpdate<T> returningMulti(List<jakarta.persistence.criteria.Selection<?>> selectionList) Description copied from interface:PersistentEntityCriteriaUpdate
The returning result of the query.- Specified by:
returningMulti
in interfacePersistentEntityCriteriaUpdate<T>
- Parameters:
selectionList
- The multi selection to return- Returns:
- The update criteria.
-
returningMulti
public PersistentEntityCriteriaUpdate<T> returningMulti(@NonNull @NonNull jakarta.persistence.criteria.Selection<?>... selections) Description copied from interface:PersistentEntityCriteriaUpdate
The returning result of the query.- Specified by:
returningMulti
in interfacePersistentEntityCriteriaUpdate<T>
- Parameters:
selections
- The multi selection to return- Returns:
- The update criteria.
-