Package jakarta.persistence.criteria
Interface Expression<T>
- Type Parameters:
T- the type of the expression
- All Superinterfaces:
Selection<T>,TupleElement<T>
- All Known Subinterfaces:
CollectionJoin<Z,,E> CriteriaBuilder.Case<R>,CriteriaBuilder.Coalesce<T>,CriteriaBuilder.In<T>,CriteriaBuilder.SimpleCase<C,,R> DiscriminatorSqmPath<T>,From<Z,,X> Join<Z,,X> JpaCoalesce<T>,JpaCollectionJoin<O,,T> JpaCrossJoin<T>,JpaDerivedFrom<T>,JpaDerivedJoin<T>,JpaDerivedRoot<T>,JpaEntityJoin<T>,JpaExpression<T>,JpaFrom<O,,T> JpaFunction<T>,JpaInPredicate<T>,JpaJoin<O,,T> JpaJoinedFrom<O,,T> JpaListJoin<O,,T> JpaMapJoin<O,,K, V> JpaParameterExpression<T>,JpaPath<T>,JpaPluralJoin<O,,C, E> JpaPredicate,JpaRoot<T>,JpaSearchedCase<T>,JpaSetJoin<O,,T> JpaSimpleCase<C,,R> JpaSubQuery<T>,ListJoin<Z,,E> MapJoin<Z,,K, V> ParameterExpression<T>,Path<X>,PluralJoin<Z,,C, E> Predicate,Root<X>,SetJoin<Z,,E> SqmAggregateFunction<T>,SqmAttributeJoin<O,,T> SqmCorrelation<O,,T> SqmExpression<T>,SqmFrom<O,,T> SqmInPredicate<T>,SqmJoin<O,,T> SqmNegatablePredicate,SqmOrderedSetAggregateFunction<T>,SqmParameter<T>,SqmPath<T>,SqmPathWrapper<W,,T> SqmPredicate,SqmQualifiedJoin<O,,T> SqmSimplePath<T>,SqmTreatedPath<T,,S> SqmWindowFunction<T>,Subquery<T>
- All Known Implementing Classes:
AbstractNegatableSqmPredicate,AbstractSqmAttributeJoin,AbstractSqmExpression,AbstractSqmFrom,AbstractSqmJoin,AbstractSqmParameter,AbstractSqmPath,AbstractSqmPluralJoin,AbstractSqmPredicate,AbstractSqmQualifiedJoin,AbstractSqmSimplePath,AbstractSqmSpecificPluralPartPath,AnyDiscriminatorSqmPath,AsWrapperSqmExpression,EmbeddedDiscriminatorSqmPath,EntityDiscriminatorSqmPath,FormatFunction.FormatSqmFunction,FullyQualifiedReflectivePathTerminal,InverseDistributionFunction.SelfRenderingInverseDistributionFunction,JpaCriteriaParameter,NonAggregatedCompositeSimplePath,SelfRenderingSqmAggregateFunction,SelfRenderingSqmFunction,SelfRenderingSqmOrderedSetAggregateFunction,SelfRenderingSqmWindowFunction,SqmAliasedNodeRef,SqmAny,SqmAnyDiscriminatorValue,SqmAnyValuedSimplePath,SqmBagJoin,SqmBasicValuedSimplePath,SqmBetweenPredicate,SqmBinaryArithmetic,SqmBooleanExpressionPredicate,SqmByUnit,SqmCaseSearched,SqmCaseSimple,SqmCoalesce,SqmCollation,SqmCollectionSize,SqmComparisonPredicate,SqmCorrelatedBagJoin,SqmCorrelatedCrossJoin,SqmCorrelatedEntityJoin,SqmCorrelatedListJoin,SqmCorrelatedMapJoin,SqmCorrelatedPluralPartJoin,SqmCorrelatedRoot,SqmCorrelatedRootJoin,SqmCorrelatedSetJoin,SqmCorrelatedSingularJoin,SqmCrossJoin,SqmCteJoin,SqmCteRoot,SqmDerivedJoin,SqmDerivedRoot,SqmElementAggregateFunction,SqmEmbeddedValuedSimplePath,SqmEmptinessPredicate,SqmEntityJoin,SqmEntityValuedSimplePath,SqmEnumLiteral,SqmEvery,SqmExistsPredicate,SqmFieldLiteral,SqmFkExpression,SqmFormat,SqmFunction,SqmFunctionPath,SqmGroupedPredicate,SqmHqlNumericLiteral,SqmIndexAggregateFunction,SqmIndexedCollectionAccessPath,SqmInListPredicate,SqmInSubQueryPredicate,SqmJpaCompoundSelection,SqmJpaCriteriaParameterWrapper,SqmJunctionPredicate,SqmLikePredicate,SqmListJoin,SqmLiteral,SqmLiteralEmbeddableType,SqmLiteralEntityType,SqmLiteralNull,SqmMapEntryReference,SqmMapJoin,SqmMemberOfPredicate,SqmModifiedSubQueryExpression,SqmNamedParameter,SqmNegatedPredicate,SqmNullnessPredicate,SqmOver,SqmOverflow,SqmParameterizedEntityType,SqmPluralPartJoin,SqmPluralValuedSimplePath,SqmPositionalParameter,SqmRoot,SqmSelfRenderingExpression,SqmSetJoin,SqmSingularJoin,SqmStar,SqmSubQuery,SqmSummarization,SqmToDuration,SqmTreatedBagJoin,SqmTreatedCrossJoin,SqmTreatedEmbeddedValuedSimplePath,SqmTreatedEntityJoin,SqmTreatedEntityValuedSimplePath,SqmTreatedListJoin,SqmTreatedMapJoin,SqmTreatedPluralPartJoin,SqmTreatedRoot,SqmTreatedSetJoin,SqmTreatedSingularJoin,SqmTruthnessPredicate,SqmTuple,SqmUnaryOperation,ValueBindJpaCriteriaParameter
Type for query expressions.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescription<X> Expression<X>Perform a typecast upon the expression, returning a new expression object.in(Expression<?>... values) Create a predicate to test whether the expression is a member of the argument list.in(Expression<Collection<?>> values) Create a predicate to test whether the expression is a member of the collection.Create a predicate to test whether the expression is a member of the argument list.in(Collection<?> values) Create a predicate to test whether the expression is a member of the collection.Create a predicate to test whether the expression is not null.isNull()Create a predicate to test whether the expression is null.Methods inherited from interface jakarta.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelectionMethods inherited from interface jakarta.persistence.TupleElement
getAlias, getJavaType
-
Method Details
-
isNull
Predicate isNull()Create a predicate to test whether the expression is null.- Returns:
- predicate testing whether the expression is null
-
isNotNull
Predicate isNotNull()Create a predicate to test whether the expression is not null.- Returns:
- predicate testing whether the expression is not null
-
in
Create a predicate to test whether the expression is a member of the argument list.- Parameters:
values- values to be tested against- Returns:
- predicate testing for membership
-
in
Create a predicate to test whether the expression is a member of the argument list.- Parameters:
values- expressions to be tested against- Returns:
- predicate testing for membership
-
in
Create a predicate to test whether the expression is a member of the collection.- Parameters:
values- collection of values to be tested against- Returns:
- predicate testing for membership
-
in
Create a predicate to test whether the expression is a member of the collection.- Parameters:
values- expression corresponding to collection to be tested against- Returns:
- predicate testing for membership
-
as
Perform a typecast upon the expression, returning a new expression object. This method does not cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure.- Parameters:
type- intended type of the expression- Returns:
- new expression of the given type
-