use of org.hibernate.SessionFactory in project wildfly by wildfly.
the class HibernateCollectionStatistics method getStatistics.
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);
}
return null;
}
use of org.hibernate.SessionFactory in project wildfly by wildfly.
the class HibernateEntityStatistics method getStatistics.
private org.hibernate.stat.EntityStatistics getStatistics(EntityManagerFactory entityManagerFactory, String entityName) {
if (entityManagerFactory == null) {
return null;
}
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics().getEntityStatistics(entityName);
}
return null;
}
use of org.hibernate.SessionFactory in project wildfly by wildfly.
the class HibernateQueryCacheStatistics method getBaseStatistics.
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();
}
return null;
}
use of org.hibernate.SessionFactory in project wildfly by wildfly.
the class HibernateStatistics method getStatistics.
static final org.hibernate.stat.Statistics getStatistics(final EntityManagerFactory entityManagerFactory) {
if (entityManagerFactory == null) {
return null;
}
HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
if (sessionFactory != null) {
return sessionFactory.getStatistics();
}
return null;
}
use of org.hibernate.SessionFactory in project intellij-community by JetBrains.
the class HibernateResourceInspection method foo2.
public void foo2() {
final SessionFactory factory = null;
final Session session = factory.openSession();
}
Aggregations