Package org.hibernate.query.criteria
Interface JpaPath<T>
- All Superinterfaces:
Expression<T>,JpaCriteriaNode,JpaExpression<T>,JpaSelection<T>,JpaTupleElement<T>,Path<T>,Selection<T>,Serializable,TupleElement<T>
- All Known Subinterfaces:
DiscriminatorSqmPath<T>,JpaCollectionJoin<O,,T> JpaCrossJoin<T>,JpaDerivedFrom<T>,JpaDerivedJoin<T>,JpaDerivedRoot<T>,JpaEntityJoin<T>,JpaFrom<O,,T> JpaJoin<O,,T> JpaJoinedFrom<O,,T> JpaListJoin<O,,T> JpaMapJoin<O,,K, V> JpaPluralJoin<O,,C, E> JpaRoot<T>,JpaSetJoin<O,,T> SqmAttributeJoin<O,,T> SqmCorrelation<O,,T> SqmFrom<O,,T> SqmJoin<O,,T> SqmPath<T>,SqmPathWrapper<W,,T> SqmQualifiedJoin<O,,T> SqmSimplePath<T>,SqmTreatedPath<T,S>
- All Known Implementing Classes:
AbstractSqmAttributeJoin,AbstractSqmFrom,AbstractSqmJoin,AbstractSqmPath,AbstractSqmPluralJoin,AbstractSqmQualifiedJoin,AbstractSqmSimplePath,AbstractSqmSpecificPluralPartPath,AnyDiscriminatorSqmPath,EmbeddedDiscriminatorSqmPath,EntityDiscriminatorSqmPath,NonAggregatedCompositeSimplePath,SqmAnyValuedSimplePath,SqmBagJoin,SqmBasicValuedSimplePath,SqmCorrelatedBagJoin,SqmCorrelatedCrossJoin,SqmCorrelatedEntityJoin,SqmCorrelatedListJoin,SqmCorrelatedMapJoin,SqmCorrelatedPluralPartJoin,SqmCorrelatedRoot,SqmCorrelatedRootJoin,SqmCorrelatedSetJoin,SqmCorrelatedSingularJoin,SqmCrossJoin,SqmCteJoin,SqmCteRoot,SqmDerivedJoin,SqmDerivedRoot,SqmElementAggregateFunction,SqmEmbeddedValuedSimplePath,SqmEntityJoin,SqmEntityValuedSimplePath,SqmFkExpression,SqmFunctionPath,SqmIndexAggregateFunction,SqmIndexedCollectionAccessPath,SqmListJoin,SqmMapJoin,SqmPluralPartJoin,SqmPluralValuedSimplePath,SqmRoot,SqmSetJoin,SqmSingularJoin,SqmTreatedBagJoin,SqmTreatedCrossJoin,SqmTreatedEmbeddedValuedSimplePath,SqmTreatedEntityJoin,SqmTreatedEntityValuedSimplePath,SqmTreatedListJoin,SqmTreatedMapJoin,SqmTreatedPluralPartJoin,SqmTreatedRoot,SqmTreatedSetJoin,SqmTreatedSingularJoin
API extension to the JPA
Path contract- Author:
- Steve Ebersole
-
Method Summary
Modifier and TypeMethodDescription<K,V, M extends Map<K, V>>
JpaExpression<M>get(MapAttribute<T, K, V> map) Create a path corresponding to the referenced map-valued attribute.<E,C extends Collection<E>>
JpaExpression<C>get(PluralAttribute<T, C, E> collection) Create a path corresponding to the referenced collection-valued attribute.<Y> JpaPath<Y>get(SingularAttribute<? super T, Y> attribute) Create a path corresponding to the referenced single-valued attribute.<Y> JpaPath<Y>Create a path corresponding to the referenced attribute.JpaPath<?>getLhs()The source (think "left hand side") of this pathGet this path's NavigablePathdefault JpaPath<?>Return the parent "node" in the path or null if no parent.Support for JPA's explicit (TREAT) down-casting.treatAs(EntityDomainType<S> treatJavaType) Support for JPA's explicit (TREAT) down-casting.JpaExpression<Class<? extends T>>type()Create an expression corresponding to the type of the path.Methods inherited from interface org.hibernate.query.criteria.JpaExpression
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, in, in, in, in, isNotNull, isNullMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
getLhs
JpaPath<?> getLhs()The source (think "left hand side") of this path -
treatAs
Support for JPA's explicit (TREAT) down-casting. -
treatAs
Support for JPA's explicit (TREAT) down-casting. -
getParentPath
Description copied from interface:PathReturn the parent "node" in the path or null if no parent.- Specified by:
getParentPathin interfacePath<T>- Returns:
- parent
-
get
Description copied from interface:PathCreate a path corresponding to the referenced single-valued attribute. -
get
Description copied from interface:PathCreate a path corresponding to the referenced collection-valued attribute. -
get
Description copied from interface:PathCreate a path corresponding to the referenced map-valued attribute. -
type
JpaExpression<Class<? extends T>> type()Description copied from interface:PathCreate an expression corresponding to the type of the path. -
get
Description copied from interface:PathCreate a path corresponding to the referenced attribute.Note: Applications using the string-based API may need to specify the type resulting from the
getoperation in order to avoid the use ofPathvariables.For example: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); q.select(p) .where(cb.isMember("joe", p.<Set<String>>get("nicknames"))); rather than: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); Path<Set<String>> nicknames = p.get("nicknames"); q.select(p) .where(cb.isMember("joe", nicknames));