Class AbstractPersistentEntityCriteriaUpdate<T>
java.lang.Object
io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityCriteriaUpdate<T>
- Type Parameters:
T
- The entity type
- All Implemented Interfaces:
QueryResultPersistentEntityCriteriaQuery
,PersistentEntityCommonAbstractCriteria
,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
(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryBuilder2 queryBuilder) abstract PersistentEntityRoot<T>
from
(PersistentEntity persistentEntity) abstract PersistentEntityRoot<T>
Set<jakarta.persistence.criteria.ParameterExpression<?>>
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> PersistentEntitySubquery<U>
subquery
(ExpressionType<U> type) Create a subquery from the expression type.where
(jakarta.persistence.criteria.Predicate... restrictions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.data.model.jpa.criteria.PersistentEntityCommonAbstractCriteria
subquery
Methods inherited from interface io.micronaut.data.model.jpa.criteria.impl.QueryResultPersistentEntityCriteriaQuery
buildQuery
-
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
public QueryResult buildQuery(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, QueryBuilder2 queryBuilder) - Specified by:
buildQuery
in interfaceQueryResultPersistentEntityCriteriaQuery
-
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
Description copied from interface:PersistentEntityCommonAbstractCriteria
Create a subquery from the expression type.- Specified by:
subquery
in interfacePersistentEntityCommonAbstractCriteria
- Type Parameters:
U
- The subquery type- Parameters:
type
- The type- Returns:
- A new subquery
-
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.
-