Search in sources :

Example 1 with CollectionJoin

use of jakarta.persistence.criteria.CollectionJoin in project eclipselink by eclipse-ee4j.

the class CriteriaBuilderImpl method treat.

@Override
public <X, T, E extends T> CollectionJoin<X, E> treat(CollectionJoin<X, T> join, Class<E> type) {
    CollectionJoinImpl parentJoin = (CollectionJoinImpl) join;
    CollectionJoin joinImpl = null;
    if (join instanceof BasicCollectionJoinImpl) {
        joinImpl = new BasicCollectionJoinImpl<X, E>(parentJoin, this.metamodel, type, parentJoin.currentNode.treat(type), parentJoin.getModel(), parentJoin.getJoinType());
    } else {
        joinImpl = new CollectionJoinImpl<X, E>((Path) join, this.metamodel.managedType(type), this.metamodel, type, parentJoin.currentNode.treat(type), parentJoin.getModel(), parentJoin.getJoinType());
    }
    parentJoin.joins.add(joinImpl);
    ((FromImpl) joinImpl).isJoin = parentJoin.isJoin;
    parentJoin.isJoin = false;
    return joinImpl;
}
Also used : Path(jakarta.persistence.criteria.Path) CollectionJoin(jakarta.persistence.criteria.CollectionJoin)

Aggregations

CollectionJoin (jakarta.persistence.criteria.CollectionJoin)1 Path (jakarta.persistence.criteria.Path)1