public LocalContainerEntityManagerFactoryBean emf() {
LocalContainerEntityManagerFactoryBean emf = new LocalContainerEntityManagerFactoryBean();
emf.setDataSource(dataSource());
emf.setPersistenceUnitName("ngrinder");
HibernateJpaVendorAdapter hibernateJpaVendorAdapter = new HibernateJpaVendorAdapter();
PropertiesWrapper databaseProperties = config.getDatabaseProperties();
Database database = Database.getDatabase(databaseProperties.getProperty(PROP_DATABASE_TYPE));
if (config.isClustered() && !database.isClusterSupport()) {
CoreLogger.LOGGER.error("In cluster mode, H2 is not allowed to use. Please select cubrid as database");
}
hibernateJpaVendorAdapter.setDatabasePlatform(database.getDialect());
hibernateJpaVendorAdapter.setShowSql(false);