private void processFetches( FetchSource fetchSource, SelectStatementBuilder selectStatementBuilder, ReaderCollector readerCollector, FetchStatsImpl fetchStats) { for ( Fetch fetch : fetchSource.getFetches() ) { processFetch( selectStatementBuilder, fetchSource, fetch, readerCollector, fetchStats ); } }
private void writeEntityReferenceFetches(EntityReference entityReference, int depth, PrintWriter printWriter) { if ( BidirectionalEntityReference.class.isInstance( entityReference ) ) { return; } if ( entityReference.getIdentifierDescription().hasFetches() ) { printWriter.println( TreePrinterHelper.INSTANCE.generateNodePrefix( depth ) + "(entity id) " ); writeFetches( ( (FetchSource) entityReference.getIdentifierDescription() ).getFetches(), depth+1, printWriter ); } writeFetches( entityReference.getFetches(), depth, printWriter ); }
targetEntityReferenceInitializer.hydrateEntityState( resultSet, context ); for ( Fetch fetch : fetchSource.getFetches() ) { if ( EntityFetch.class.isInstance( fetch ) ) { final EntityFetch entityFetch = (EntityFetch) fetch;
public FetchStats processFetches( FetchSource fetchSource, SelectStatementBuilder selectStatementBuilder, ReaderCollector readerCollector) { final FetchStatsImpl fetchStats = new FetchStatsImpl(); // if the fetchSource is an entityReference, we should also walk its identifier fetches here... // // what if fetchSource is a composite fetch (as it would be in the case of a key-many-to-one)? if ( EntityReference.class.isInstance( fetchSource ) ) { final EntityReference fetchOwnerAsEntityReference = (EntityReference) fetchSource; if ( fetchOwnerAsEntityReference.getIdentifierDescription().hasFetches() ) { final FetchSource entityIdentifierAsFetchSource = (FetchSource) fetchOwnerAsEntityReference.getIdentifierDescription(); for ( Fetch fetch : entityIdentifierAsFetchSource.getFetches() ) { processFetch( selectStatementBuilder, fetchSource, fetch, readerCollector, fetchStats ); } } } processFetches( fetchSource, selectStatementBuilder, readerCollector, fetchStats ); return fetchStats; }
for ( Fetch identifierFetch : entityIdentifierAsFetchSource.getFetches() ) { processFetch( selectStatementBuilder,