private static Map<String, Class> getPersistenceClassesOfView(ViewEntity viewDefinition) {
    PersistenceConfig persistence = viewDefinition.getConfiguration().getPersistence();

    HashMap<String, Class> classes = new HashMap<>();
    if (persistence != null) {
      for (EntityConfig c : persistence.getEntities()) {
        try {
          Class entity = viewDefinition.getClassLoader().loadClass(c.getClassName());
          classes.put(c.getClassName(), entity);
        } catch (ClassNotFoundException e) {
          e.printStackTrace();
        }
      }
    }
    return classes;
  }
Get persistence entities of the view instance.

@param viewDefinition   the view definition.
@return the mapping of entity class name to the class objects,
loaded by the classloader of view version.
ambari-server/src/main/java/org/apache/ambari/server/view/ViewDataMigrationContextImpl.java