Map<EntityKeyMetadata, Neo4jEntityQueries> queryMap = new HashMap<EntityKeyMetadata, Neo4jEntityQueries>();
Collection<EntityPersister> entityPersisters = sessionFactoryImplementor.getEntityPersisters().values();
for ( EntityPersister entityPersister : entityPersisters ) {
if (entityPersister instanceof OgmEntityPersister ) {
OgmEntityPersister ogmEntityPersister = (OgmEntityPersister) entityPersister;
queryMap.put( ogmEntityPersister.getEntityKeyMetadata(), new Neo4jEntityQueries( ogmEntityPersister.getEntityKeyMetadata() ) );
}
}
return queryMap;
}