ViewConfig viewConfig = viewDefinition.getConfiguration();
Collection<ViewEntityEntity> entities = new HashSet<ViewEntityEntity>();
if (viewConfig != null) {
PersistenceConfig persistenceConfig = viewConfig.getPersistence();
if (persistenceConfig != null) {
for (EntityConfig entityConfiguration : persistenceConfig.getEntities()) {
ViewEntityEntity viewEntityEntity = new ViewEntityEntity();
viewEntityEntity.setViewName(viewDefinition.getName());
viewEntityEntity.setViewInstanceName(viewInstanceDefinition.getName());
viewEntityEntity.setClassName(entityConfiguration.getClassName());