public static boolean isAccountClassClass(GenericValue glAccountClass,String parentGlAccountClassId) throws GenericEntityException {
  if (glAccountClass == null)   return false;
  if (parentGlAccountClassId.equals(glAccountClass.get("glAccountClassId"))) {
    return true;
  }
  String parentClassId=glAccountClass.getString("parentClassId");
  if (parentClassId == null) {
    return false;
  }
  if (parentClassId.equals(parentGlAccountClassId)) {
    return true;
  }
  return isAccountClassClass(glAccountClass.getRelatedOne("ParentGlAccountClass",true),parentGlAccountClassId);
}

public static boolean isAccountClassClass ( GenericValue glAccountClass , String parentGlAccountClassId ) throws GenericEntityException { if ( glAccountClass == null ) return false ; if ( parentGlAccountClassId . equals ( glAccountClass . get ( "glAccountClassId" ) ) ) { return true ; } String parentClassId = glAccountClass . getString ( "parentClassId" ) ; if ( parentClassId == null ) { return false ; } if ( parentClassId . equals ( parentGlAccountClassId ) ) { return true ; } return isAccountClassClass ( glAccountClass . getRelatedOne ( "ParentGlAccountClass" , true ) , parentGlAccountClassId ) ; }
determines if a glaccountclass is of a child of a certain parent glaccountclass .
