Class QueryUtilsAdapter
- java.lang.Object
-
- org.springframework.data.jpa.repository.query.QueryUtilsAdapter
-
public final class QueryUtilsAdapter extends Object
Adapter to access someprotected
methods in the 'Spring'QueryUtils
and avoid replication of the code itself.- Author:
- Thiago A. de Souza Weber
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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, thejoins
andfields
restrictions to be applies to theTypedQuery
.
-
-
-
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, thejoins
andfields
restrictions to be applies to theTypedQuery
.- Parameters:
from
- theFrom
that thePropertyPath
expression is based onproperty
- thePropertyPath
to be add to the expressionisForSelection
-true
if thePropertyPath
is aSelection
expression, otherwise,false
- Returns:
- an
Expression
equivalent toSelection
expression - See Also:
QueryUtils.toExpressionRecursively(From, PropertyPath, boolean)
-
-