private void getEager ( Set < HBeanRow > rows , HBeanRowCollector collector , int level , FetchType ... fetchType ) throws HBeanNotFoundException { int size = rows . size ( ) ; if ( size == 0 ) { return ; } if ( -- level < 0 ) { return ; } Set < HBeanRow > refs = new HashSet <> ( ) ; for ( HBeanRow row : rows ) { refs . addAll ( row . getReferenceRows ( ) ) ; } // only recurse rowkeys we havent already // visited to break circular references refs = collector . filterUnvisted ( refs ) ; refs = getLazy ( refs , fetchType ) ; collector . addReferences ( refs ) ; getEager ( refs , collector , level , fetchType ) ; }
Recursive method for traversing and collecting row references .