code: public static List<Class<?>> resolveHierarchy(final Class<?> type) {
          final List<Class<?>> res = Lists.newArrayList();
          Class<?> current = type;
          while (!Object.class.equals(current) && current != null) {
              res.add(current);
              current = current.getSuperclass();
          }
          return res;
      }
docs: Resolves model class hierarchy (types recognized by orient).
  
  @param type model class
  @return class hierarchy