code: private EntityType buildEntityType(SessionFactory sessionFactory, String entityName) {
      EntityType entityType = (EntityType) entityTypes.get(entityName);
      if (null == entityType) {
        ClassMetadata cm = sessionFactory.getClassMetadata(entityName);
        if (null == cm) {
          logger.error("Cannot find ClassMetadata for {}", entityName);
          return null;
        }
        entityType = new EntityType(cm.getEntityName(), cm.getMappedClass(), cm.getIdentifierPropertyName(),
            new IdentifierType(cm.getIdentifierType().getReturnedClass()));
        entityTypes.put(cm.getEntityName(), entityType);
  
        Map<String, Type> propertyTypes = entityType.getPropertyTypes();
        String[] ps = cm.getPropertyNames();
        for (int i = 0; i < ps.length; i++) {
          org.hibernate.type.Type type = cm.getPropertyType(ps[i]);
          if (type.isEntityType()) {
            propertyTypes.put(ps[i], buildEntityType(sessionFactory, type.getName()));
          } else if (type.isComponentType()) {
            propertyTypes.put(ps[i], buildComponentType(sessionFactory, entityName, ps[i]));
          } else if (type.isCollectionType()) {
            propertyTypes.put(ps[i],
                buildCollectionType(sessionFactory, defaultCollectionClass(type), entityName + "." + ps[i]));
          }
        }
      }
      return entityType;
    }
docs: 按照实体名，构建或者查找实体类型信息.<br>
  调用后，实体类型则存放与entityTypes中.
  
  @param entityName