code: public EntityType getEntityType(Class<?> entityClass) {
      String className = entityClass.getName();
      EntityType type = entityTypes.get(className);
      if (null != type) { return type; }
  
      type = classEntityTypes.get(className);
      if (null == type) {
        List<EntityType> matched = CollectUtils.newArrayList();
        for (EntityType entityType : entityTypes.values()) {
          if (className.equals(entityType.getEntityName())
              || className.equals(entityType.getEntityClass().getName())) {
            matched.add(entityType);
          }
        }
        if (matched.size() > 1) { throw new RuntimeException("multi-entityName for class:" + className); }
        if (matched.isEmpty()) {
          EntityType tmp = new EntityType(entityClass);
          classEntityTypes.put(className, tmp);
          return tmp;
        } else {
          classEntityTypes.put(className, matched.get(0));
          type = (EntityType) matched.get(0);
        }
      }
      return type;
    }
docs: <p>
  getEntityType.
  </p>
  
  @param entityClass a {@link java.lang.Class} object.
  @return a {@link org.beangle.commons.entity.metadata.EntityType} object.