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;
}
Aggregations