protected String getStatisticName(Object[] args) { for ( Object arg : args ) { if ( arg instanceof StatisticName ) { StatisticName name = (StatisticName) arg; return name.getName(); } } return null; }
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; }
private String getQueryName(Object... args) { PathAddress pathAddress = getPathAddress( args ); if ( pathAddress != null ) { return pathAddress.getValue( HibernateStatistics.QUERYCACHE ); } return null; } }
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 Object invoke(Object... args) { PathAddress pathAddress = getPathAddress( args ); if ( pathAddress != null ) { return pathAddress.getValue( PROVIDER_LABEL ); } return ""; } };
protected String getStatisticName(Object[] args) { for(Object arg :args) { if (arg instanceof StatisticName) { StatisticName name = (StatisticName)arg; return name.getName(); } } return null; }
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; }
private String getQueryName(Object... args) { PathAddress pathAddress = getPathAddress(args); if (pathAddress != null) { return pathAddress.getValue(HibernateStatistics.QUERYCACHE); } return null; } }
protected String getStatisticName(Object[] args) { for(Object arg :args) { if (arg instanceof StatisticName) { StatisticName name = (StatisticName)arg; return name.getName(); } } return null; }
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; }
private String getQueryName(Object... args) { PathAddress pathAddress = getPathAddress(args); if (pathAddress != null) { return pathAddress.getValue(HibernateStatistics.QUERYCACHE); } return null; } }
protected String getStatisticName(Object[] args) { for(Object arg :args) { if (arg instanceof StatisticName) { StatisticName name = (StatisticName)arg; return name.getName(); } } return null; }
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 Object invoke(Object... args) { PathAddress pathAddress = getPathAddress(args); if (pathAddress != null) { return pathAddress.getValue(PROVIDER_LABEL); } return ""; } };
protected String getStatisticName(Object[] args) { for(Object arg :args) { if (arg instanceof StatisticName) { StatisticName name = (StatisticName)arg; return name.getName(); } } 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; }
@Override public Object invoke(Object... args) { PathAddress pathAddress = getPathAddress(args); if (pathAddress != null) { return pathAddress.getValue(PROVIDER_LABEL); } return ""; } };
@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 Object invoke(Object... args) { PathAddress pathAddress = getPathAddress(args); if (pathAddress != null) { return pathAddress.getValue(PROVIDER_LABEL); } return ""; } };
@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() ) ); }