List of usage examples for org.hibernate.cfg Settings getJdbcBatchSize
public int getJdbcBatchSize()
From source file:com.autobizlogic.abl.mgmt.SessionFactoryService.java
License:Open Source License
public static Map<String, Object> getSessionFactoryDetails(Map<String, String> args) { String sessionFactoryId = args.get("sessionFactoryId"); HashMap<String, Object> result = new HashMap<String, Object>(); SessionFactory sessionFactory = HibernateConfiguration.getSessionFactoryById(sessionFactoryId); if (sessionFactory == null) return null; HashMap<String, Object> data = new HashMap<String, Object>(); Properties props = ((SessionFactoryImpl) sessionFactory).getProperties(); data.put("properties", props); Map<String, String> settings = new HashMap<String, String>(); Settings sets = ((SessionFactoryImpl) sessionFactory).getSettings(); settings.put("Batcher factory", sets.getBatcherFactory() == null ? "none" : sets.getBatcherFactory().toString()); settings.put("Default catalog name", sets.getDefaultCatalogName()); settings.put("Default schema name", sets.getDefaultSchemaName()); settings.put("Session factory name", sets.getSessionFactoryName()); settings.put("Cache region prefix", sets.getCacheRegionPrefix()); settings.put("Connection provider", sets.getConnectionProvider() == null ? "none" : sets.getConnectionProvider().toString()); settings.put("Connection release mode", sets.getConnectionReleaseMode() == null ? "none" : sets.getConnectionReleaseMode().toString()); settings.put("Default batch fetch size", "" + sets.getDefaultBatchFetchSize()); settings.put("JDBC batch size", "" + sets.getJdbcBatchSize()); settings.put("Maximum fetch depth", sets.getMaximumFetchDepth() == null ? "none" : sets.getMaximumFetchDepth().toString()); settings.put("Default entity mode", sets.getDefaultEntityMode() == null ? "none" : sets.getDefaultEntityMode().toString()); settings.put("Dialect", sets.getDialect() == null ? "none" : sets.getDialect().toString()); settings.put("Entity tuplizer factory", sets.getEntityTuplizerFactory() == null ? "none" : sets.getEntityTuplizerFactory().toString()); settings.put("JDBC fetch size", sets.getJdbcFetchSize() == null ? "none" : sets.getJdbcFetchSize().toString()); settings.put("JDBC support", sets.getJdbcSupport() == null ? "none" : sets.getJdbcSupport().toString()); settings.put("Query cache factory", sets.getQueryCacheFactory() == null ? "none" : sets.getQueryCacheFactory().toString()); settings.put("Query substitutions", sets.getQuerySubstitutions() == null ? "none" : sets.getQuerySubstitutions().toString()); settings.put("Query translator factory", sets.getQueryTranslatorFactory() == null ? "none" : sets.getQueryTranslatorFactory().toString()); settings.put("Region factory", sets.getRegionFactory() == null ? "none" : sets.getRegionFactory().toString()); settings.put("SQL exception converter", sets.getSQLExceptionConverter() == null ? "none" : sets.getSQLExceptionConverter().toString()); settings.put("SQL statement logger", sets.getSqlStatementLogger() == null ? "none" : sets.getSqlStatementLogger().toString()); settings.put("Transaction factory", sets.getTransactionFactory() == null ? "none" : sets.getTransactionFactory().toString()); settings.put("Transaction manager lookup", sets.getTransactionManagerLookup() == null ? "none" : sets.getTransactionManagerLookup().toString()); data.put("settings", settings); data.put("importFiles", ((SessionFactoryImpl) sessionFactory).getSettings().getImportFiles()); result.put("data", data); return result; }