@@ -37,6 +37,7 @@ protected class QueryLoadInfo
3737
3838 protected abstract List < QueryLoadInfo > GetQueryLoadInfo ( ) ;
3939
40+ /// <inheritdoc />
4041 public virtual void Init ( ISessionImplementor session )
4142 {
4243 Session = session ;
@@ -50,11 +51,13 @@ public virtual void Init(ISessionImplementor session)
5051 _finalResults = null ;
5152 }
5253
53- /// <summary>
54- /// Gets the commands to execute for getting the not-already cached results of this query. Does retrieves
55- /// already cached results by side-effect.
56- /// </summary>
57- /// <returns>The commands for obtaining the results not already cached.</returns>
54+ /// <inheritdoc />
55+ public IEnumerable < string > GetQuerySpaces ( )
56+ {
57+ return _queryInfos . SelectMany ( q => q . QuerySpaces ) ;
58+ }
59+
60+ /// <inheritdoc />
5861 public IEnumerable < ISqlCommand > GetCommands ( )
5962 {
6063 for ( var index = 0 ; index < _queryInfos . Count ; index ++ )
@@ -82,6 +85,7 @@ public IEnumerable<ISqlCommand> GetCommands()
8285 }
8386 }
8487
88+ /// <inheritdoc />
8589 public int ProcessResultsSet ( DbDataReader reader )
8690 {
8791 var dialect = Session . Factory . Dialect ;
@@ -161,9 +165,10 @@ public int ProcessResultsSet(DbDataReader reader)
161165 return rowCount ;
162166 }
163167
168+ /// <inheritdoc />
164169 public void ProcessResults ( )
165170 {
166- for ( int i = 0 ; i < _queryInfos . Count ; i ++ )
171+ for ( var i = 0 ; i < _queryInfos . Count ; i ++ )
167172 {
168173 var queryInfo = _queryInfos [ i ] ;
169174 if ( _subselectResultKeys [ i ] != null )
@@ -192,17 +197,13 @@ public void ProcessResults()
192197 AfterLoadCallback ? . Invoke ( GetResults ( ) ) ;
193198 }
194199
200+ /// <inheritdoc />
195201 public void ExecuteNonBatched ( )
196202 {
197203 _finalResults = GetResultsNonBatched ( ) ;
198204 AfterLoadCallback ? . Invoke ( _finalResults ) ;
199205 }
200206
201- public IEnumerable < string > GetQuerySpaces ( )
202- {
203- return _queryInfos . SelectMany ( q => q . QuerySpaces ) ;
204- }
205-
206207 protected abstract IList < TResult > GetResultsNonBatched ( ) ;
207208
208209 protected List < T > GetTypedResults < T > ( )
@@ -211,8 +212,8 @@ protected List<T> GetTypedResults<T>()
211212 {
212213 throw new HibernateException ( "Batch wasn't executed. You must call IQueryBatch.Execute() before accessing results." ) ;
213214 }
214- List < T > results = new List < T > ( _loaderResults . Sum ( tr => tr . Count ) ) ;
215- for ( int i = 0 ; i < _queryInfos . Count ; i ++ )
215+ var results = new List < T > ( _loaderResults . Sum ( tr => tr . Count ) ) ;
216+ for ( var i = 0 ; i < _queryInfos . Count ; i ++ )
216217 {
217218 var list = _queryInfos [ i ] . Loader . GetResultList (
218219 _loaderResults [ i ] ,
@@ -223,11 +224,13 @@ protected List<T> GetTypedResults<T>()
223224 return results ;
224225 }
225226
227+ /// <inheritdoc />
226228 public IList < TResult > GetResults ( )
227229 {
228230 return _finalResults ?? ( _finalResults = DoGetResults ( ) ) ;
229231 }
230232
233+ /// <inheritdoc />
231234 public Action < IList < TResult > > AfterLoadCallback { get ; set ; }
232235
233236 protected abstract List < TResult > DoGetResults ( ) ;
0 commit comments