@Override public Collection<String> getDynamicChildrenNames( EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics( entityManagerFactoryLookup.entityManagerFactory( pathAddress.getValue( HibernateStatistics.PROVIDER_LABEL ) ) ); if ( stats == null ) { return Collections.emptyList(); } return Collections.unmodifiableCollection( Arrays.asList( stats.getEntityNames() ) ); }
@Override public Collection<String> getDynamicChildrenNames( EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics( entityManagerFactoryLookup.entityManagerFactory( pathAddress.getValue( HibernateStatistics.PROVIDER_LABEL ) ) ); if ( stats == null ) { return Collections.emptyList(); } return Collections.unmodifiableCollection( Arrays.asList( stats.getCollectionRoleNames() ) ); }
protected EntityManagerFactory getEntityManagerFactory(Object[] args) { PathAddress pathAddress = getPathAddress( args ); for ( Object arg : args ) { if ( arg instanceof EntityManagerFactoryAccess ) { EntityManagerFactoryAccess entityManagerFactoryAccess = (EntityManagerFactoryAccess) arg; return entityManagerFactoryAccess.entityManagerFactory( pathAddress.getValue( HibernateStatistics.PROVIDER_LABEL ) ); } } return null; }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getCollectionRoleNames())); }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getEntityNames())); }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getEntityNames())); }
@Override public Collection<String> getDynamicChildrenNames( EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics statistics = getBaseStatistics( entityManagerFactoryLookup.entityManagerFactory( pathAddress.getValue( HibernateStatistics.PROVIDER_LABEL ) ) ); return statistics != null ? Collections.unmodifiableCollection( Arrays.asList( statistics.getEntityNames() ) ) : Collections.EMPTY_LIST; } }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getCollectionRoleNames())); }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getCollectionRoleNames())); }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getEntityNames())); }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics stats = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); if (stats == null) { return Collections.emptyList(); } return Collections.unmodifiableCollection(Arrays.asList(stats.getCollectionRoleNames())); }
protected EntityManagerFactory getEntityManagerFactory(Object[] args) { PathAddress pathAddress = getPathAddress(args); for(Object arg :args) { if (arg instanceof EntityManagerFactoryAccess) { EntityManagerFactoryAccess entityManagerFactoryAccess = (EntityManagerFactoryAccess)arg; return entityManagerFactoryAccess.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL)); } } return null; }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics statistics = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); return statistics != null ? Collections.unmodifiableCollection(Arrays.asList( statistics.getEntityNames())) : Collections.EMPTY_LIST; } }
protected EntityManagerFactory getEntityManagerFactory(Object[] args) { PathAddress pathAddress = getPathAddress(args); for(Object arg :args) { if (arg instanceof EntityManagerFactoryAccess) { EntityManagerFactoryAccess entityManagerFactoryAccess = (EntityManagerFactoryAccess)arg; return entityManagerFactoryAccess.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL)); } } return null; }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics statistics = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); return statistics != null ? Collections.unmodifiableCollection(Arrays.asList( statistics.getEntityNames())) : Collections.EMPTY_LIST; } }
protected EntityManagerFactory getEntityManagerFactory(Object[] args) { PathAddress pathAddress = getPathAddress(args); for(Object arg :args) { if (arg instanceof EntityManagerFactoryAccess) { EntityManagerFactoryAccess entityManagerFactoryAccess = (EntityManagerFactoryAccess)arg; return entityManagerFactoryAccess.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL)); } } return null; }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics statistics = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); return statistics != null ? Collections.unmodifiableCollection(Arrays.asList( statistics.getEntityNames())) : Collections.EMPTY_LIST; } }
@Override public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) { org.hibernate.stat.Statistics statistics = getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))); return statistics != null ? Collections.unmodifiableCollection(Arrays.asList( statistics.getEntityNames())) : Collections.EMPTY_LIST; } }
org.hibernate.stat.SecondLevelCacheStatistics getStatistics( EntityManagerFactoryAccess entityManagerFactoryaccess, PathAddress pathAddress) { String scopedPersistenceUnitName = pathAddress.getValue( HibernateStatistics.PROVIDER_LABEL ); SessionFactory sessionFactory = entityManagerFactoryaccess.entityManagerFactory( scopedPersistenceUnitName ) .unwrap( SessionFactory.class ); if ( sessionFactory != null ) { // The entity class name is prefixed by the application scoped persistence unit name return sessionFactory.getStatistics().getSecondLevelCacheStatistics( scopedPersistenceUnitName + "." + pathAddress.getValue( HibernateStatistics.ENTITYCACHE ) ); } return null; }
org.hibernate.stat.SecondLevelCacheStatistics getStatistics(EntityManagerFactoryAccess entityManagerFactoryaccess, PathAddress pathAddress) { String scopedPersistenceUnitName = pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL); SessionFactory sessionFactory = entityManagerFactoryaccess.entityManagerFactory(scopedPersistenceUnitName).unwrap(SessionFactory.class); if (sessionFactory != null) { // The entity class name is prefixed by the application scoped persistence unit name return sessionFactory.getStatistics().getSecondLevelCacheStatistics(scopedPersistenceUnitName + "." + pathAddress.getValue(HibernateStatistics.ENTITYCACHE)); } return null; } private Operation getEntityCacheRegionName = new Operation() {