public class DefaultPredicateAliasResolver extends Object implements PredicateAliasResolver
| Constructor and Description |
|---|
DefaultPredicateAliasResolver() |
| Modifier and Type | Method and Description |
|---|---|
com.mysema.query.types.Predicate |
resolveOperation(com.mysema.query.types.Operation<?> operation,
List<JoinDescription> joins,
Set<com.mysema.query.types.Path<?>> usedAliases)
Resolves all correct paths used in specified
operation |
<T> com.mysema.query.types.Path<T> |
resolvePath(com.mysema.query.types.Path<T> path,
Map<AnnotatedElement,List<JoinDescription>> classToJoin,
Set<com.mysema.query.types.Path<?>> usedAliases)
If alias from
path is not present in usedAliases, try to find it in joins. |
com.mysema.query.types.Predicate |
resolvePredicate(com.mysema.query.types.Predicate predicate,
List<JoinDescription> joins,
Set<com.mysema.query.types.Path<?>> usedAliases)
Resolves all correct paths used in specified
predicate |
public com.mysema.query.types.Predicate resolvePredicate(com.mysema.query.types.Predicate predicate,
List<JoinDescription> joins,
Set<com.mysema.query.types.Path<?>> usedAliases)
PredicateAliasResolverpredicateresolvePredicate in interface PredicateAliasResolverpredicate - original predicatejoins - all query joinsusedAliases - paths that are present in joinsPredicateAliasResolver.resolvePath(Path, Map, Set)public com.mysema.query.types.Predicate resolveOperation(com.mysema.query.types.Operation<?> operation,
List<JoinDescription> joins,
Set<com.mysema.query.types.Path<?>> usedAliases)
PredicateAliasResolveroperationresolveOperation in interface PredicateAliasResolveroperation - original operationjoins - all query joinsusedAliases - paths that are present in joinsPredicateAliasResolver.resolvePath(Path, Map, Set)public <T> com.mysema.query.types.Path<T> resolvePath(com.mysema.query.types.Path<T> path,
Map<AnnotatedElement,List<JoinDescription>> classToJoin,
Set<com.mysema.query.types.Path<?>> usedAliases)
PredicateAliasResolverpath 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)
resolvePath in interface PredicateAliasResolverT - anypath - original pathclassToJoin - java type to present joinsusedAliases - paths that are present in joinsCopyright © 2017. All rights reserved.