Example usage for org.hibernate.event.spi AutoFlushEvent AutoFlushEvent

List of usage examples for org.hibernate.event.spi AutoFlushEvent AutoFlushEvent

Introduction

In this page you can find the example usage for org.hibernate.event.spi AutoFlushEvent AutoFlushEvent.

Prototype

public AutoFlushEvent(Set querySpaces, EventSource source) 

Source Link

Usage

From source file:com.blazebit.persistence.integration.hibernate.base.HibernateExtendedQuerySupport.java

License:Apache License

public void autoFlush(Set<String> querySpaces, SessionImplementor sessionImplementor) {
    AutoFlushEvent event = new AutoFlushEvent(querySpaces, (EventSource) sessionImplementor);
    for (AutoFlushEventListener listener : sessionImplementor.getFactory().getServiceRegistry()
            .getService(EventListenerRegistry.class).getEventListenerGroup(EventType.AUTO_FLUSH).listeners()) {
        listener.onAutoFlush(event);/* ww  w .ja  v  a  2s. c  o m*/
    }
}