Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.querydef

public Class CriteriaDeleteImpl<T>

extends CommonAbstractCriteriaImpl<T>
implements CriteriaDelete<T>
Class Inheritance
All Implemented Interfaces
jakarta.persistence.criteria.CriteriaDelete, jakarta.persistence.criteria.CommonAbstractCriteria
Imports
jakarta.persistence.criteria.CriteriaDelete, .Expression, .Predicate, .Root, jakarta.persistence.metamodel.EntityType, .Metamodel, org.eclipse.persistence.expressions.ExpressionBuilder, org.eclipse.persistence.queries.DatabaseQuery

Purpose: Contains the implementation of the CriteriaDelete interface of the JPA criteria API.

Description: This is the container class for the components that define a Delete Query.

Author
Chris Delahunt
Since
EclipseLink 2.5
See Also
CriteriaDelete

Field Summary

Modifier and TypeField and Description
protected Root<T>
private static final long
Inherited from org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl:
metamodelparametersqueryBuilderqueryTypewhere

Constructor Summary

AccessConstructor and Description
public
CriteriaDeleteImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType)

Method Summary

Modifier and TypeMethod and Description
public Root<T>
from(Class<T>
the entity class
entityClass
)

Implements jakarta.persistence.criteria.CriteriaDelete.from.

Create and add a query root corresponding to the entity that is the target of the delete.
public Root<T>
from(EntityType<T>
metamodel entity representing the entity of type X
entity
)

Implements jakarta.persistence.criteria.CriteriaDelete.from.

Create and add a query root corresponding to the entity that is the target of the delete.
protected Expression
protected DatabaseQuery
public Root<T>
protected void
integrateRoot(RootImpl<X> root)

Implements abstract org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.integrateRoot.

Used to use a root from a different query.
public CriteriaDelete<T>
where(Expression<Boolean>
a simple or compound boolean expression
restriction
)

Overrides org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.where.

Implements jakarta.persistence.criteria.CriteriaDelete.where.

Modify the delete query to restrict the target of the deletion according to the specified boolean expression.
public CriteriaDelete<T>
where(Predicate...
zero or more restriction predicates
restrictions
)

Overrides org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.where.

Implements jakarta.persistence.criteria.CriteriaDelete.where.

Modify the delete query to restrict the target of the deletion according to the conjunction of the specified restriction predicates.
Inherited from org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl:
addParameterfindRootAndParametersfindRootAndParametersgetParametersgetRestrictiongetResultTypeinternalFrominternalFromsubquerytranslate

Field Detail

rootback to summary
protected Root<T> root
serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.serialVersionUID.

Constructor Detail

CriteriaDeleteImplback to summary
public CriteriaDeleteImpl(Metamodel metamodel, CriteriaBuilderImpl queryBuilder, Class<T> resultType)

Method Detail

fromback to summary
public Root<T> from(Class<T> entityClass)

Implements jakarta.persistence.criteria.CriteriaDelete.from.

Doc from jakarta.persistence.criteria.CriteriaDelete.from.

Create and add a query root corresponding to the entity that is the target of the delete. A CriteriaDelete object has a single root, the entity that is being deleted.

Parameters
entityClass:Class<T>

the entity class

Returns:Root<T>

query root corresponding to the given entity

Annotations
@Override
fromback to summary
public Root<T> from(EntityType<T> entity)

Implements jakarta.persistence.criteria.CriteriaDelete.from.

Doc from jakarta.persistence.criteria.CriteriaDelete.from.

Create and add a query root corresponding to the entity that is the target of the delete. A CriteriaDelete object has a single root, the entity that is being deleted.

Parameters
entity:EntityType<T>

metamodel entity representing the entity of type X

Returns:Root<T>

query root corresponding to the given entity

Annotations
@Override
getBaseExpressionback to summary
protected Expression getBaseExpression()

Implements abstract org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.getBaseExpression.

Annotations
@Override
getDatabaseQueryback to summary
protected DatabaseQuery getDatabaseQuery()

Implements abstract org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.getDatabaseQuery.

Annotations
@Override
getRootback to summary
public Root<T> getRoot()

Implements jakarta.persistence.criteria.CriteriaDelete.getRoot.

Doc from jakarta.persistence.criteria.CriteriaDelete.getRoot.

Return the query root.

Returns:Root<T>

the query root

Annotations
@Override
integrateRootback to summary
protected void integrateRoot(RootImpl<X> root)

Implements abstract org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.integrateRoot.

Doc from org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.integrateRoot.

Used to use a root from a different query.

Annotations
@Override
whereback to summary
public CriteriaDelete<T> where(Expression<Boolean> restriction)

Overrides org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.where.

Implements jakarta.persistence.criteria.CriteriaDelete.where.

Doc from jakarta.persistence.criteria.CriteriaDelete.where.

Modify the delete query to restrict the target of the deletion according to the specified boolean expression. Replaces the previously added restriction(s), if any.

Parameters
restriction:Expression<Boolean>

a simple or compound boolean expression

Returns:CriteriaDelete<T>

the modified delete query

Annotations
@Override
whereback to summary
public CriteriaDelete<T> where(Predicate... restrictions)

Overrides org.eclipse.persistence.internal.jpa.querydef.CommonAbstractCriteriaImpl.where.

Implements jakarta.persistence.criteria.CriteriaDelete.where.

Doc from jakarta.persistence.criteria.CriteriaDelete.where.

Modify the delete query to restrict the target of the deletion according to the conjunction of the specified restriction predicates. Replaces the previously added restriction(s), if any. If no restrictions are specified, any previously added restrictions are simply removed.

Parameters
restrictions:Predicate[]

zero or more restriction predicates

Returns:CriteriaDelete<T>

the modified delete query

Annotations
@Override