log.info("Initializing StatisticsCache ...");
numberOfEntitiesMap = new HashMap<Class< ? extends BaseDO< ? >>, Integer>();
final JdbcTemplate jdbc = new JdbcTemplate(dataSource);
for (final RegistryEntry registryEntry : Registry.instance().getOrderedList()) {
try {
final int number = jdbc.queryForInt("SELECT COUNT(*) FROM " + HibernateUtils.getDBTableName(registryEntry.getDOClass()));
numberOfEntitiesMap.put(registryEntry.getDOClass(), number);
} catch (final Exception ex) {
log.error(ex.getMessage(), ex);
continue;
}