Interface From<Z,X>
- Type Parameters:
Z- the source typeX- the target type
- All Superinterfaces:
Expression<X>, FetchParent<Z,X>, Path<X>, Selection<X>, TupleElement<X>
- All Known Subinterfaces:
CollectionJoin<Z,E>, Join<Z, X>, ListJoin<Z, E>, MapJoin<Z, K, V>, PluralJoin<Z, C, E>, Root<X>, SetJoin<Z, E>
Represents a bound type, usually an entity that appears in
the from clause, but may also be an embeddable belonging to
an entity in the from clause.
Serves as a factory for Joins of associations,
embeddables, and collections belonging to the type, and for
Paths of attributes belonging to the type.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the parentFromobject from which the correlatedFromobject has been obtained through correlation (use ofSubquery.correlate(From)method).getJoins()Return the joins that have been made from this bound type.booleanWhether theFromobject has been obtained as a result of correlation (use of aSubquery.correlate(From)method).<Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection) Create an inner join to the specifiedCollection-valued attribute.<Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection, JoinType jt) Create a join to the specifiedCollection-valued attribute using the given join type.join(EntityType<Y> entity) Create and add an inner join to the given entity.join(EntityType<Y> entity, JoinType joinType) Create and add a join to the given entity.join(ListAttribute<? super X, Y> list) Create an inner join to the specifiedList-valued attribute.join(ListAttribute<? super X, Y> list, JoinType jt) Create a join to the specifiedList-valued attribute using the given join type.join(MapAttribute<? super X, K, V> map) Create an inner join to the specifiedMap-valued attribute.join(MapAttribute<? super X, K, V> map, JoinType jt) Create a join to the specifiedMap-valued attribute using the given join type.join(SetAttribute<? super X, Y> set) Create an inner join to the specifiedSet-valued attribute.join(SetAttribute<? super X, Y> set, JoinType jt) Create a join to the specifiedSet-valued attribute using the given join type.join(SingularAttribute<? super X, Y> attribute) Create an inner join to the specified single-valued attribute.join(SingularAttribute<? super X, Y> attribute, JoinType jt) Create a join to the specified single-valued attribute using the given join type.Create and add an inner join to the given entity.Create and add a join to the given entity.Create an inner join to the specified attribute.Create a join to the specified attribute using the given join type.<Y> CollectionJoin<X, Y> joinCollection(String attributeName) Create an inner join to the specifiedCollection-valued attribute.<Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt) Create a join to the specifiedCollection-valued attribute using the given join type.Create an inner join to the specifiedList-valued attribute.Create a join to the specifiedList-valued attribute using the given join type.Create an inner join to the specifiedMap-valued attribute.Create a join to the specifiedMap-valued attribute using the given join type.Create an inner join to the specifiedSet-valued attribute.Create a join to the specifiedSet-valued attribute using the given join type.Downcast the bound type to the given type.Methods inherited from interface Expression
as, cast, coalesce, coalesce, count, countDistinct, equalTo, equalTo, in, in, in, in, in, isMember, isNotMember, isNotNull, isNull, notEqualTo, notEqualTo, nullif, nullif, selectCaseMethods inherited from interface FetchParent
fetch, fetch, fetch, fetch, fetch, fetch, getFetchesMethods inherited from interface Path
get, get, get, get, get, get, get, get, get, getModel, getParentPath, typeMethods inherited from interface Selection
alias, getCompoundSelectionItems, isCompoundSelectionMethods inherited from interface TupleElement
getAlias, getJavaType
-
Method Details
-
getJoins
-
getCorrelationParent
Returns the parentFromobject from which the correlatedFromobject has been obtained through correlation (use ofSubquery.correlate(From)method).- Returns:
- the parent of the correlated
Fromobject - Throws:
IllegalStateException- if theFromobject has not been obtained through correlation
-
join
-
join
-
join
Create and add an inner join to the given entity.- Type Parameters:
Y- the target entity type- Parameters:
entity- metamodel entity representing the join target- Returns:
- the resulting join
- Since:
- 3.2
-
join
Create and add a join to the given entity.- Type Parameters:
Y- the target entity type- Parameters:
entity- metamodel entity representing the join targetjoinType- join type- Returns:
- the resulting join
- Since:
- 3.2
-
join
Create an inner join to the specified single-valued attribute.- Type Parameters:
Y- the type of the joined attribute- Parameters:
attribute- target of the join- Returns:
- the resulting join
-
join
@Nonnull <Y> Join<X,Y> join(@Nonnull SingularAttribute<? super X, Y> attribute, @Nonnull JoinType jt) Create a join to the specified single-valued attribute using the given join type.- Type Parameters:
Y- the type of the joined attribute- Parameters:
attribute- target of the joinjt- join type- Returns:
- the resulting join
-
join
Create an inner join to the specifiedCollection-valued attribute.- Type Parameters:
Y- the element type of the joined collection- Parameters:
collection- target of the join- Returns:
- the resulting join
-
join
Create an inner join to the specifiedSet-valued attribute.- Type Parameters:
Y- the element type of the joined set- Parameters:
set- target of the join- Returns:
- the resulting join
-
join
Create an inner join to the specifiedList-valued attribute.- Type Parameters:
Y- the element type of the joined list- Parameters:
list- target of the join- Returns:
- the resulting join
-
join
Create an inner join to the specifiedMap-valued attribute.- Type Parameters:
K- the key type of the joined mapV- the value type of the joined map- Parameters:
map- target of the join- Returns:
- the resulting join
-
join
@Nonnull <Y> CollectionJoin<X,Y> join(@Nonnull CollectionAttribute<? super X, Y> collection, @Nonnull JoinType jt) Create a join to the specifiedCollection-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined collection- Parameters:
collection- target of the joinjt- join type- Returns:
- the resulting join
-
join
Create a join to the specifiedSet-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined set- Parameters:
set- target of the joinjt- join type- Returns:
- the resulting join
-
join
Create a join to the specifiedList-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined list- Parameters:
list- target of the joinjt- join type- Returns:
- the resulting join
-
join
@Nonnull <K,V> MapJoin<X,K, joinV> (@Nonnull MapAttribute<? super X, K, V> map, @Nonnull JoinType jt) Create a join to the specifiedMap-valued attribute using the given join type.- Type Parameters:
K- the key type of the joined mapV- the value type of the joined map- Parameters:
map- target of the joinjt- join type- Returns:
- the resulting join
-
join
Create an inner join to the specified attribute.- Type Parameters:
Y- the type of the joined attribute- Parameters:
attributeName- the name of the attribute that is the target of the join- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(SingularAttribute). Use of the typesafe version is strongly preferred.
-
joinCollection
Create an inner join to the specifiedCollection-valued attribute.- Type Parameters:
Y- the element type of the joined collection- Parameters:
attributeName- the name of the attribute that is the target of the join- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(CollectionAttribute). Use of the typesafe version is strongly preferred.
-
joinSet
Create an inner join to the specifiedSet-valued attribute.- Type Parameters:
Y- the element type of the joined set- Parameters:
attributeName- the name of the attribute that is the target of the join- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(SetAttribute). Use of the typesafe version is strongly preferred.
-
joinList
Create an inner join to the specifiedList-valued attribute.- Type Parameters:
Y- the element type of the joined list- Parameters:
attributeName- the name of the attribute that is the target of the join- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(ListAttribute). Use of the typesafe version is strongly preferred.
-
joinMap
Create an inner join to the specifiedMap-valued attribute.- Type Parameters:
K- the key type of the joined mapV- the value type of the joined map- Parameters:
attributeName- the name of the attribute that is the target of the join- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(MapAttribute). Use of the typesafe version is strongly preferred.
-
join
Create a join to the specified attribute using the given join type.- Type Parameters:
Y- the type of the joined attribute- Parameters:
attributeName- the name of the attribute that is the target of the joinjt- the join type- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(SingularAttribute, JoinType). Use of the typesafe version is strongly preferred.
-
joinCollection
@Nonnull <Y> CollectionJoin<X,Y> joinCollection(@Nonnull String attributeName, @Nonnull JoinType jt) Create a join to the specifiedCollection-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined collection- Parameters:
attributeName- the name of the attribute that is the target of the joinjt- the join type- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(CollectionAttribute, JoinType). Use of the typesafe version is strongly preferred.
-
joinSet
Create a join to the specifiedSet-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined set- Parameters:
attributeName- the name of the attribute that is the target of the joinjt- the join type- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(SetAttribute, JoinType). Use of the typesafe version is strongly preferred.
-
joinList
Create a join to the specifiedList-valued attribute using the given join type.- Type Parameters:
Y- the element type of the joined list- Parameters:
attributeName- the name of the attribute that is the target of the joinjt- the join type- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(ListAttribute, JoinType). Use of the typesafe version is strongly preferred.
-
joinMap
Create a join to the specifiedMap-valued attribute using the given join type.- Type Parameters:
K- the key type of the joined mapV- the value type of the joined map- Parameters:
attributeName- the name of the attribute that is the target of the joinjt- the join type- Returns:
- the resulting join
- Throws:
IllegalArgumentException- if there is no attribute with the given name- API note:
- This method accepts a string-valued attribute name,
and lacks type safety compared to passing a static
metamodel element to
join(MapAttribute, JoinType). Use of the typesafe version is strongly preferred.
-
treat
Downcast the bound type to the given type.
-