Example usage for org.hibernate.internal SessionFactoryImpl getJdbcServices

List of usage examples for org.hibernate.internal SessionFactoryImpl getJdbcServices

Introduction

In this page you can find the example usage for org.hibernate.internal SessionFactoryImpl getJdbcServices.

Prototype

@Override
    public JdbcServices getJdbcServices() 

Source Link

Usage

From source file:org.ligoj.app.dao.SecuritySpringDataListener.java

License:MIT License

/**
 * Listener with EMF as context./*  w  ww  . j a  va  2 s .  c o m*/
 * 
 * @param emf The current EMF.
 */
@SuppressWarnings("unchecked")
@Autowired
public SecuritySpringDataListener(final LocalContainerEntityManagerFactoryBean emf) {
    final SessionFactoryImpl sessionFactory = (SessionFactoryImpl) emf.getNativeEntityManagerFactory();
    this.sqlFunctions = (Map<String, SQLFunction>) FieldUtils.getProtectedFieldValue("functionMap",
            sessionFactory.getSqlFunctionRegistry());
    this.dialect = sessionFactory.getJdbcServices().getJdbcEnvironment().getDialect();
}