question: private static boolean isPaymentTypeRecurse ( GenericValue paymentType , String inputTypeId ) throws GenericEntityException { String parentTypeId = paymentType . getString ( "parentTypeId" ) ; if ( parentTypeId == null ) { return false ; } if ( parentTypeId . equals ( inputTypeId ) ) { return true ; } return isPaymentTypeRecurse ( paymentType . getRelatedOne ( "ParentPaymentType" , false ) , inputTypeId ) ; }
target:  Recurses up payment type tree via parentTypeId to see if input payment type ID is in tree.