本文整理了Java中org.hibernate.stat.Statistics.getEntityNames()
方法的一些代码示例,展示了Statistics.getEntityNames()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Statistics.getEntityNames()
方法的具体详情如下:
包路径:org.hibernate.stat.Statistics
类名称:Statistics
方法名:getEntityNames
[英]Get the names of all entities
[中]获取所有实体的名称
代码示例来源:origin: hibernate/hibernate-orm
@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() ) );
}
代码示例来源:origin: wildfly/wildfly
@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()));
}
代码示例来源:origin: wildfly/wildfly
@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()));
}
代码示例来源:origin: wildfly/wildfly
@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()));
}
代码示例来源:origin: wildfly/wildfly
@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()));
}
代码示例来源:origin: hibernate/hibernate-orm
@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;
}
}
代码示例来源:origin: wildfly/wildfly
@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;
}
}
代码示例来源:origin: wildfly/wildfly
@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;
}
}
代码示例来源:origin: wildfly/wildfly
@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;
}
}
代码示例来源:origin: wildfly/wildfly
@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;
}
}
代码示例来源:origin: gocd/gocd
json.put("EntityStatistics", entityStatistics);
String[] entityNames = statistics.getEntityNames();
for (String entityName : entityNames) {
entityStatistics.put(entityName, statistics.getEntityStatistics(entityName));
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* {@inheritDoc}
*
* @see net.sf.ehcache.hibernate.management.api.HibernateStats#getEntityStats()
*/
public TabularData getEntityStats() {
List<CompositeData> result = new ArrayList<CompositeData>();
Statistics statistics = getStatistics();
for (String entity : statistics.getEntityNames()) {
EntityStats entityStats = new EntityStats(entity, statistics.getEntityStatistics(entity));
result.add(entityStats.toCompositeData());
}
TabularData td = EntityStats.newTabularDataInstance();
td.putAll(result.toArray(new CompositeData[result.size()]));
return td;
}
代码示例来源:origin: riotfamily/riot
protected void clearCache(String entityPrefix, boolean inverse) {
String[] entityNames = sessionFactory.getStatistics().getEntityNames();
for (String name : entityNames) {
boolean match = name.startsWith(entityPrefix);
if (match ^ inverse) {
evictCacheEntry(name, false);
}
}
}
代码示例来源:origin: org.jboss.eap/jipijapa-hibernate4-3
@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()));
}
代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5
@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()));
}
代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3
@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;
}
}
代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3
@Override
public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) {
return Collections.unmodifiableCollection(Arrays.asList(
getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))).getEntityNames()));
}
代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5
@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;
}
}
代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1
@Override
public Collection<String> getDynamicChildrenNames(EntityManagerFactoryAccess entityManagerFactoryLookup, PathAddress pathAddress) {
return Collections.unmodifiableCollection(Arrays.asList(
getBaseStatistics(entityManagerFactoryLookup.entityManagerFactory(pathAddress.getValue(HibernateStatistics.PROVIDER_LABEL))).getEntityNames()));
}
代码示例来源:origin: at.chrl/chrl-orm
public static String[] getEntityStatistics(final IHibernateConfig hconfig) {
if (isNull(hconfig))
throw new NullPointerException("Parameter hconfig is null");
SessionFactory sf = HibernateService.getInstance().getSessionFactory(hconfig);
if (isNull(sf))
throw new NullPointerException("Could not obtain SessionFactory for Config: " + hconfig);
final Statistics stats = sf.getStatistics();
String[] header = new String[] { JVMInfoUtil.getInstance().printSection("Entities for: " + hconfig.toString()) };
return Arrays.stream(stats.getEntityNames()).reduce(header, (a, s) -> ArrayUtils.addAll(a, getEntityStatistics(sf, s)), ArrayUtils::addAll);
}
内容来源于网络,如有侵权,请联系作者删除!