< T extends Entity < ? , ? > , P extends Enum < P > & Parents > TraversalContext < BE , T > proceedWithParents ( Class < T > nextEntityType , Class < P > parentsType , P currentParent , P [ ] parents , BiConsumer < P , Query . SymmetricExtender > hopBuilder ) { EnumSet < P > ps = ParentsUtil . convert ( parentsType , currentParent , parents ) ; TraversalContext . Builder < BE , E > bld = proceed ( ) ; for ( P p : ps ) { Query . Builder qb = bld . rawQueryBuilder ( ) ; qb = qb . branch ( ) ; Query . SymmetricExtender extender = qb . symmetricExtender ( ) ; hopBuilder . accept ( p , extender ) ; qb . done ( ) ; } return bld . getting ( nextEntityType ) ; }
Proceeds the traversal to the next entities taking into account what parents the next entities should have .