public static List < SFChildResult > getChildResults ( SFSession session , String requestId , JsonNode result ) throws SFException { List < String > ids = getResultIds ( result ) ; List < SFStatementType > types = getResultTypes ( result ) ; if ( ids . size ( ) != types . size ( ) ) { throw ( SFException ) IncidentUtil . generateIncidentV2WithException ( session , new SFException ( ErrorCode . CHILD_RESULT_IDS_AND_TYPES_DIFFERENT_SIZES , ids . size ( ) , types . size ( ) ) , null , requestId ) ; } List < SFChildResult > res = new ArrayList <> ( ) ; for ( int i = 0 ; i < ids . size ( ) ; i ++ ) { res . add ( new SFChildResult ( ids . get ( i ) , types . get ( i ) ) ) ; } return res ; }
Return the list of child results provided in a result if available ; otherwise return an empty list