code: private String searchForPersistentSubType(XClass type)
      {
          ArrayList queue = new ArrayList();
          XClass    subType;
  
          queue.add(type);
          while (!queue.isEmpty())
          {
              subType = (XClass)queue.get(0);
              queue.remove(0);
              if (_model.hasClass(subType.getQualifiedName()))
              {
                  return subType.getQualifiedName();
              }
              addDirectSubTypes(subType, queue);
          }
          return null;
      }
docs: Searches the type and its sub types for the nearest ojb-persistent type and returns its name.
  
  @param type  The type to search
  @return      The qualified name of the found type or <code>null</code> if no type has been found