use of com.haulmont.cuba.core.entity.EntityStatistics in project cuba by cuba-platform.
the class PersistenceManager method enterStatistics.
@Authenticated
@Override
public synchronized String enterStatistics(String name, Long instanceCount, Integer fetchUI, Integer maxFetchUI, Integer lazyCollectionThreshold, Integer lookupScreenThreshold) {
if (StringUtils.isBlank(name))
return "Entity name is required";
try {
EntityStatistics es = persistenceManager.enterStatistics(name, instanceCount, fetchUI, maxFetchUI, lazyCollectionThreshold, lookupScreenThreshold);
StringBuilder sb = new StringBuilder("Statistics for ").append(name).append(" changed:\n");
sb.append("instanceCount=").append(es.getInstanceCount()).append("\n");
sb.append("fetchUI=").append(es.getFetchUI()).append("\n");
sb.append("maxFetchUI=").append(es.getMaxFetchUI()).append("\n");
sb.append("lazyCollectionThreshold=").append(es.getLazyCollectionThreshold()).append("\n");
sb.append("lookupScreenThreshold=").append(es.getLookupScreenThreshold()).append("\n");
return sb.toString();
} catch (Exception e) {
log.error("enterStatistics error", e);
return ExceptionUtils.getStackTrace(e);
}
}
Aggregations