Search in sources :

Example 1 with SqmJoin

use of org.hibernate.query.sqm.tree.from.SqmJoin in project hibernate-orm by hibernate.

the class SqmSubQuery method getCorrelatedJoins.

@Override
public Set<Join<?, ?>> getCorrelatedJoins() {
    final Set<Join<?, ?>> correlatedJoins = new HashSet<>();
    final SqmFromClause fromClause = getQuerySpec().getFromClause();
    if (fromClause == null) {
        return correlatedJoins;
    }
    for (SqmRoot<?> root : fromClause.getRoots()) {
        if (root instanceof SqmCorrelation<?, ?>) {
            for (SqmJoin<?, ?> sqmJoin : root.getSqmJoins()) {
                if (sqmJoin instanceof SqmCorrelation<?, ?> && sqmJoin instanceof Join<?, ?>) {
                    correlatedJoins.add((Join<?, ?>) sqmJoin);
                }
            }
        }
    }
    return correlatedJoins;
}
Also used : SqmCorrelation(org.hibernate.query.sqm.tree.domain.SqmCorrelation) SqmAttributeJoin(org.hibernate.query.sqm.tree.from.SqmAttributeJoin) SqmCorrelatedMapJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedMapJoin) SqmEntityJoin(org.hibernate.query.sqm.tree.from.SqmEntityJoin) CollectionJoin(jakarta.persistence.criteria.CollectionJoin) SqmCorrelatedSetJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedSetJoin) SqmMapJoin(org.hibernate.query.sqm.tree.domain.SqmMapJoin) SqmSingularJoin(org.hibernate.query.sqm.tree.domain.SqmSingularJoin) SetJoin(jakarta.persistence.criteria.SetJoin) MapJoin(jakarta.persistence.criteria.MapJoin) SqmJoin(org.hibernate.query.sqm.tree.from.SqmJoin) SqmCorrelatedBagJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedBagJoin) SqmCorrelatedSingularJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedSingularJoin) SqmCrossJoin(org.hibernate.query.sqm.tree.from.SqmCrossJoin) SqmCorrelatedListJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedListJoin) PluralJoin(jakarta.persistence.criteria.PluralJoin) SqmListJoin(org.hibernate.query.sqm.tree.domain.SqmListJoin) SqmSetJoin(org.hibernate.query.sqm.tree.domain.SqmSetJoin) ListJoin(jakarta.persistence.criteria.ListJoin) SqmCorrelatedEntityJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedEntityJoin) SqmBagJoin(org.hibernate.query.sqm.tree.domain.SqmBagJoin) SqmCorrelatedCrossJoin(org.hibernate.query.sqm.tree.domain.SqmCorrelatedCrossJoin) Join(jakarta.persistence.criteria.Join) SqmFromClause(org.hibernate.query.sqm.tree.from.SqmFromClause) HashSet(java.util.HashSet)

Aggregations

CollectionJoin (jakarta.persistence.criteria.CollectionJoin)1 Join (jakarta.persistence.criteria.Join)1 ListJoin (jakarta.persistence.criteria.ListJoin)1 MapJoin (jakarta.persistence.criteria.MapJoin)1 PluralJoin (jakarta.persistence.criteria.PluralJoin)1 SetJoin (jakarta.persistence.criteria.SetJoin)1 HashSet (java.util.HashSet)1 SqmBagJoin (org.hibernate.query.sqm.tree.domain.SqmBagJoin)1 SqmCorrelatedBagJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedBagJoin)1 SqmCorrelatedCrossJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedCrossJoin)1 SqmCorrelatedEntityJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedEntityJoin)1 SqmCorrelatedListJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedListJoin)1 SqmCorrelatedMapJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedMapJoin)1 SqmCorrelatedSetJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedSetJoin)1 SqmCorrelatedSingularJoin (org.hibernate.query.sqm.tree.domain.SqmCorrelatedSingularJoin)1 SqmCorrelation (org.hibernate.query.sqm.tree.domain.SqmCorrelation)1 SqmListJoin (org.hibernate.query.sqm.tree.domain.SqmListJoin)1 SqmMapJoin (org.hibernate.query.sqm.tree.domain.SqmMapJoin)1 SqmSetJoin (org.hibernate.query.sqm.tree.domain.SqmSetJoin)1 SqmSingularJoin (org.hibernate.query.sqm.tree.domain.SqmSingularJoin)1