HHH-13756 rename 'NavigateResult' class name to 'Navigation'
This commit is contained in:
parent
335c1ecd75
commit
94b8d8a128
|
@ -427,14 +427,14 @@ public class LoaderSelectBuilder {
|
|||
FetchTiming fetchTiming = fetchable.getMappedFetchStrategy().getTiming();
|
||||
boolean joined = fetchable.getMappedFetchStrategy().getStyle() == FetchStyle.JOIN;
|
||||
|
||||
EntityGraphNavigator.NavigateResult navigateResult = null;
|
||||
EntityGraphNavigator.Navigation navigation = null;
|
||||
|
||||
// 'entity graph' takes precedence over 'fetch profile'
|
||||
if ( entityGraphNavigator != null) {
|
||||
navigateResult = entityGraphNavigator.navigateIfApplicable( fetchParent, fetchable, isKeyFetchable );
|
||||
if ( navigateResult != null ) {
|
||||
fetchTiming = navigateResult.getFetchStrategy();
|
||||
joined = navigateResult.isJoined();
|
||||
navigation = entityGraphNavigator.navigateIfApplicable( fetchParent, fetchable, isKeyFetchable );
|
||||
if ( navigation != null ) {
|
||||
fetchTiming = navigation.getFetchStrategy();
|
||||
joined = navigation.isJoined();
|
||||
}
|
||||
}
|
||||
else if ( loadQueryInfluencers.hasEnabledFetchProfiles() ) {
|
||||
|
@ -493,8 +493,8 @@ public class LoaderSelectBuilder {
|
|||
if ( !( fetchable instanceof BasicValuedModelPart ) ) {
|
||||
fetchDepth--;
|
||||
}
|
||||
if ( entityGraphNavigator != null && navigateResult != null ) {
|
||||
entityGraphNavigator.backtrack( navigateResult.getPreviousContext() );
|
||||
if ( entityGraphNavigator != null && navigation != null ) {
|
||||
entityGraphNavigator.backtrack( navigation.getPreviousContext() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -87,6 +87,8 @@ public class StandardSqmSelectTranslator
|
|||
|
||||
private final EntityGraphNavigator entityGraphNavigator;
|
||||
|
||||
private int fetchDepth;
|
||||
|
||||
public StandardSqmSelectTranslator(
|
||||
QueryOptions queryOptions,
|
||||
DomainParameterXref domainParameterXref,
|
||||
|
@ -230,8 +232,6 @@ public class StandardSqmSelectTranslator
|
|||
return getFromClauseIndex().findTableGroup( navigablePath ).getModelPart();
|
||||
}
|
||||
|
||||
private int fetchDepth = 0;
|
||||
|
||||
@Override
|
||||
public List<Fetch> visitFetches(FetchParent fetchParent) {
|
||||
final List<Fetch> fetches = CollectionHelper.arrayList( fetchParent.getReferencedMappingType().getNumberOfFetchables() );
|
||||
|
@ -284,7 +284,7 @@ public class StandardSqmSelectTranslator
|
|||
FetchTiming fetchTiming = fetchable.getMappedFetchStrategy().getTiming();
|
||||
boolean joined = false;
|
||||
|
||||
EntityGraphNavigator.NavigateResult navigateResult = null;
|
||||
EntityGraphNavigator.Navigation navigation = null;
|
||||
|
||||
final SqmAttributeJoin fetchedJoin = getFromClauseIndex().findFetchedJoinByPath( fetchablePath );
|
||||
|
||||
|
@ -307,10 +307,10 @@ public class StandardSqmSelectTranslator
|
|||
alias = null;
|
||||
|
||||
if ( entityGraphNavigator != null ) {
|
||||
navigateResult = entityGraphNavigator.navigateIfApplicable( fetchParent, fetchable, isKeyFetchable );
|
||||
if ( navigateResult != null ) {
|
||||
fetchTiming = navigateResult.getFetchStrategy();
|
||||
joined = navigateResult.isJoined();
|
||||
navigation = entityGraphNavigator.navigateIfApplicable( fetchParent, fetchable, isKeyFetchable );
|
||||
if ( navigation != null ) {
|
||||
fetchTiming = navigation.getFetchStrategy();
|
||||
joined = navigation.isJoined();
|
||||
}
|
||||
}
|
||||
else if ( fetchInfluencers.hasEnabledFetchProfiles() ) {
|
||||
|
@ -418,8 +418,8 @@ public class StandardSqmSelectTranslator
|
|||
);
|
||||
}
|
||||
finally {
|
||||
if ( entityGraphNavigator != null && navigateResult != null ) {
|
||||
entityGraphNavigator.backtrack( navigateResult.getPreviousContext() );
|
||||
if ( entityGraphNavigator != null && navigation != null ) {
|
||||
entityGraphNavigator.backtrack( navigation.getPreviousContext() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,13 +22,13 @@ public interface EntityGraphNavigator {
|
|||
* <li>whether the new graph node fetching is joined</li>
|
||||
* </ul>
|
||||
*/
|
||||
class NavigateResult {
|
||||
class Navigation {
|
||||
|
||||
private GraphImplementor previousContext;
|
||||
private FetchTiming fetchTiming;
|
||||
private boolean joined;
|
||||
|
||||
public NavigateResult(GraphImplementor previousContext, FetchTiming fetchTiming, boolean joined) {
|
||||
public Navigation(GraphImplementor previousContext, FetchTiming fetchTiming, boolean joined) {
|
||||
this.previousContext = previousContext;
|
||||
this.fetchTiming = fetchTiming;
|
||||
this.joined = joined;
|
||||
|
@ -64,7 +64,7 @@ public interface EntityGraphNavigator {
|
|||
* @param parent The FetchParent
|
||||
* @param fetchable The Fetchable
|
||||
* @param exploreKeySubgraph true if only key sub graph is explored; false if key sub graph is excluded
|
||||
* @return {@link NavigateResult} if applicable; null otherwise
|
||||
* @return {@link Navigation} if applicable; null otherwise
|
||||
*/
|
||||
NavigateResult navigateIfApplicable(FetchParent parent, Fetchable fetchable, boolean exploreKeySubgraph);
|
||||
Navigation navigateIfApplicable(FetchParent parent, Fetchable fetchable, boolean exploreKeySubgraph);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class StandardEntityGraphNavigatorImpl implements EntityGraphNavigator {
|
|||
}
|
||||
|
||||
@Override
|
||||
public NavigateResult navigateIfApplicable(FetchParent fetchParent, Fetchable fetchable, boolean exploreKeySubgraph) {
|
||||
public Navigation navigateIfApplicable(FetchParent fetchParent, Fetchable fetchable, boolean exploreKeySubgraph) {
|
||||
final GraphImplementor previousContextRoot = currentGraphContext;
|
||||
FetchTiming fetchTiming = null;
|
||||
boolean joined = false;
|
||||
|
@ -97,7 +97,7 @@ public class StandardEntityGraphNavigatorImpl implements EntityGraphNavigator {
|
|||
joined = fetchable.getMappedFetchStrategy().getStyle() == FetchStyle.JOIN;
|
||||
}
|
||||
}
|
||||
return new NavigateResult( previousContextRoot, fetchTiming, joined );
|
||||
return new Navigation( previousContextRoot, fetchTiming, joined );
|
||||
}
|
||||
|
||||
private boolean appliesTo(FetchParent fetchParent) {
|
||||
|
|
Loading…
Reference in New Issue