private boolean isAffectedByEnabledFetchProfiles(SharedSessionContractImplementor session) { for ( String s : session.getLoadQueryInfluencers().getEnabledFetchProfileNames() ) { if ( affectingFetchProfileNames.contains( s ) ) { return true; } } return false; }
private static Boolean isEagerFetchProfile(SharedSessionContractImplementor session, String role) { LoadQueryInfluencers loadQueryInfluencers = session.getLoadQueryInfluencers(); for ( String fetchProfileName : loadQueryInfluencers.getEnabledFetchProfileNames() ) { FetchProfile fp = session.getFactory().getFetchProfile( fetchProfileName ); Fetch fetch = fp.getFetchByRole( role ); if ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) { return true; } } return null; }
final String fetchRole = persister.getEntityName() + "." + relativePropertyPath; for ( String profileName : loadQueryInfluencers.getEnabledFetchProfileNames() ) { final FetchProfile profile = loadQueryInfluencers.getSessionFactory().getFetchProfile( profileName ); final Fetch fetch = profile.getFetchByRole( fetchRole );
protected final boolean isJoinFetchEnabledByProfile(OuterJoinLoadable persister, PropertyPath path, int propertyNumber) { if ( !getLoadQueryInfluencers().hasEnabledFetchProfiles() ) { // perf optimization return false; } // ugh, this stuff has to be made easier... final String fullPath = path.getFullPath(); String rootPropertyName = persister.getSubclassPropertyName( propertyNumber ); int pos = fullPath.lastIndexOf( rootPropertyName ); String relativePropertyPath = pos >= 0 ? fullPath.substring( pos ) : rootPropertyName; String fetchRole = persister.getEntityName() + "." + relativePropertyPath; for ( String profileName : getLoadQueryInfluencers().getEnabledFetchProfileNames() ) { final FetchProfile profile = getFactory().getFetchProfile( profileName ); final Fetch fetch = profile.getFetchByRole( fetchRole ); if ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) { return true; } } return false; }
@Override public boolean isAffectedByEnabledFetchProfiles(LoadQueryInfluencers loadQueryInfluencers) { for ( String s : loadQueryInfluencers.getEnabledFetchProfileNames() ) { if ( affectingFetchProfileNames.contains( s ) ) { return true; } } return false; }
private boolean isAffectedByEnabledFetchProfiles(SessionImplementor session) { Iterator itr = session.getLoadQueryInfluencers().getEnabledFetchProfileNames().iterator(); while ( itr.hasNext() ) { if ( affectingFetchProfileNames.contains( itr.next() ) ) { return true; } } return false; }
private boolean isAffectedByEnabledFetchProfiles(SessionImplementor session) { Iterator itr = session.getLoadQueryInfluencers().getEnabledFetchProfileNames().iterator(); while ( itr.hasNext() ) { if ( affectingFetchProfileNames.contains( itr.next() ) ) { return true; } } return false; }
private static Boolean isEagerFetchProfile(SharedSessionContractImplementor session, String role) { LoadQueryInfluencers loadQueryInfluencers = session.getLoadQueryInfluencers(); for ( String fetchProfileName : loadQueryInfluencers.getEnabledFetchProfileNames() ) { FetchProfile fp = session.getFactory().getFetchProfile( fetchProfileName ); Fetch fetch = fp.getFetchByRole( role ); if ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) { return true; } } return null; }
protected final boolean isJoinFetchEnabledByProfile(OuterJoinLoadable persister, PropertyPath path, int propertyNumber) { if ( !getLoadQueryInfluencers().hasEnabledFetchProfiles() ) { // perf optimization return false; } // ugh, this stuff has to be made easier... final String fullPath = path.getFullPath(); String rootPropertyName = persister.getSubclassPropertyName( propertyNumber ); int pos = fullPath.lastIndexOf( rootPropertyName ); String relativePropertyPath = pos >= 0 ? fullPath.substring( pos ) : rootPropertyName; String fetchRole = persister.getEntityName() + "." + relativePropertyPath; Iterator profiles = getLoadQueryInfluencers().getEnabledFetchProfileNames().iterator(); while ( profiles.hasNext() ) { final String profileName = ( String ) profiles.next(); final FetchProfile profile = getFactory().getFetchProfile( profileName ); final Fetch fetch = profile.getFetchByRole( fetchRole ); if ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) { return true; } } return false; }
protected final boolean isJoinFetchEnabledByProfile(OuterJoinLoadable persister, PropertyPath path, int propertyNumber) { if ( !getLoadQueryInfluencers().hasEnabledFetchProfiles() ) { // perf optimization return false; } // ugh, this stuff has to be made easier... final String fullPath = path.getFullPath(); String rootPropertyName = persister.getSubclassPropertyName( propertyNumber ); int pos = fullPath.lastIndexOf( rootPropertyName ); String relativePropertyPath = pos >= 0 ? fullPath.substring( pos ) : rootPropertyName; String fetchRole = persister.getEntityName() + "." + relativePropertyPath; Iterator profiles = getLoadQueryInfluencers().getEnabledFetchProfileNames().iterator(); while ( profiles.hasNext() ) { final String profileName = ( String ) profiles.next(); final FetchProfile profile = getFactory().getFetchProfile( profileName ); final Fetch fetch = profile.getFetchByRole( fetchRole ); if ( fetch != null && Fetch.Style.JOIN == fetch.getStyle() ) { return true; } } return false; }