operations.put(OPERATION_ENTITY_UPDATE_COUNT, entityUpdateCount);
types.put(OPERATION_ENTITY_UPDATE_COUNT, Long.class);
operations.put(OPERATION_OPTIMISTIC_FAILURE_COUNT, optimisticFailureCount);
types.put(OPERATION_OPTIMISTIC_FAILURE_COUNT, Long.class);
}
<BUG>private org.hibernate.stat.Statistics getBaseStatistics(EntityManagerFactory entityManagerFactory) {
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;</BUG>
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics();

operations.put(OPERATION_ENTITY_UPDATE_COUNT, entityUpdateCount);
types.put(OPERATION_ENTITY_UPDATE_COUNT, Long.class);
operations.put(OPERATION_OPTIMISTIC_FAILURE_COUNT, optimisticFailureCount);
types.put(OPERATION_OPTIMISTIC_FAILURE_COUNT, Long.class);
}
private org.hibernate.stat.Statistics getBaseStatistics(EntityManagerFactory entityManagerFactory) {
if (entityManagerFactory == null) {
return null;
}
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics();
