Class QueryUtilsAdapter


  • public final class QueryUtilsAdapter
    extends Object
    Adapter to access some protected methods in the 'Spring' QueryUtils and avoid replication of the code itself.
    Author:
    Thiago A. de Souza Weber
    • Method Detail

      • toExpressionRecursively

        public static <T> javax.persistence.criteria.Expression<T> toExpressionRecursively​(javax.persistence.criteria.From<?,​?> from,
                                                                                           org.springframework.data.mapping.PropertyPath property,
                                                                                           boolean isForSelection)
        Validate and register, recursively, if need it, the joins and fields restrictions to be applies to the TypedQuery.
        Parameters:
        from - the From that the PropertyPath expression is based on
        property - the PropertyPath to be add to the expression
        isForSelection - true if the PropertyPath is a Selection expression, otherwise, false
        Returns:
        an Expression equivalent to Selection expression
        See Also:
        QueryUtils.toExpressionRecursively(From, PropertyPath, boolean)