Package com.totvs.tjf.api.jpa
Class QueryUtils
- java.lang.Object
-
- com.totvs.tjf.api.jpa.QueryUtils
-
public final class QueryUtils extends Object
Simple utility class to help createTuple
queries.- Author:
- Thiago A. de Souza Weber
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>
getCollectionArgumentType(Method method)
Extract, based on the givenMethod
, theParameterizedType
of collection object.static javax.persistence.criteria.Selection<?>
toSelectionRecursively(javax.persistence.criteria.From<?,?> from, org.springframework.data.mapping.PropertyPath property)
Validate and register, recursively, if need it, thejoins
andfields
restrictions to be applies to theTuple
query.
-
-
-
Method Detail
-
toSelectionRecursively
public static javax.persistence.criteria.Selection<?> toSelectionRecursively(javax.persistence.criteria.From<?,?> from, org.springframework.data.mapping.PropertyPath property)
Validate and register, recursively, if need it, thejoins
andfields
restrictions to be applies to theTuple
query.- Parameters:
from
- theFrom
that thePropertyPath
expression is based onproperty
- thePropertyPath
to be add to the expression- Returns:
- an
Selection
expression - See Also:
QueryUtilsAdapter.toExpressionRecursively(From, PropertyPath, boolean)
-
getCollectionArgumentType
public static Class<?> getCollectionArgumentType(Method method)
Extract, based on the givenMethod
, theParameterizedType
of collection object.- Parameters:
method
- the read method from the projection class- Returns:
- the
ParameterizedType
for the collection object
-
-