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);
}

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 ) ; }
recurses up payment type tree via parenttypeid to see if input payment type id is in tree .
