code: public static void assignSuperclass(final ODatabaseObject db, final Class<?> modelType, final String target,
                                          final Logger logger) {
          // searching for first existing scheme class to check hierarchy and avoid duplicates
          final OClass existing = findFirstExisting(db, modelType);
          final String modelName = modelType.getSimpleName();
          if (existing != null) {
              if (existing.isSubClassOf(target)) {
                  return;
              }
              validateGraphTypes(modelName, existing, target);
          }
          if (existing != null && modelName.equals(existing.getName())) {
              logger.debug("Assigning superclass {} to {}", target, modelName);
              // adding superclass, not overriding!
              command(db, "alter class %s superclass +%s", modelName, target);
          } else {
              logger.debug("Creating model class scheme {} as extension to {}", modelName, target);
              command(db, "create class %s extends %s", modelName, target);
          }
      }
docs: Assigns base class in scheme for provided model type (for example, to make class vertex type
  it must extend V).
  
  @param db        database object
  @param modelType model class
  @param target    target super class to assign
  @param logger    caller specific logger