Class DefaultPredicateAliasResolver

    • Constructor Detail

      • DefaultPredicateAliasResolver

        public DefaultPredicateAliasResolver​(Joiner joiner)
    • Method Detail

      • resolvePath

        public <T> com.querydsl.core.types.Path<T> resolvePath​(com.querydsl.core.types.Path<T> path,
                                                               Map<AnnotatedElement,​List<JoinDescription>> classToJoin,
                                                               Set<com.querydsl.core.types.Path<?>> usedAliases)
        Description copied from interface: PredicateAliasResolver
        If alias from path is not present in usedAliases, try to find it in joins. If unambiguous alias is found, return rebuilt Path with corresponding alias.

        It other words, it allows to use QStatus.status.some... instead of J#path(QStatusParent.parent, QStatus.status (when target path is unambiguous, i.e. exactly one join with java type Status is present)

        Specified by:
        resolvePath in interface PredicateAliasResolver
        Type Parameters:
        T - any
        Parameters:
        path - original path
        classToJoin - java type to present joins
        usedAliases - paths that are present in joins
        Returns:
        rebuilt or original path