if (sessionFactory != null) {
return sessionFactory.getStatistics();
}
return null;
}
<BUG>private CollectionStatistics getStatistics(final EntityManagerFactory entityManagerFactory, String collectionName) {
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;</BUG>
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics().getCollectionStatistics(collectionName);

if (sessionFactory != null) {
return sessionFactory.getStatistics();
}
return null;
}
private CollectionStatistics getStatistics(final EntityManagerFactory entityManagerFactory, String collectionName) {
if (entityManagerFactory == null) {
return null;
}
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics().getCollectionStatistics(collectionName);
