Example usage for org.hibernate.event.spi AutoFlushEventListener onAutoFlush

List of usage examples for org.hibernate.event.spi AutoFlushEventListener onAutoFlush

Introduction

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

Prototype

public void onAutoFlush(AutoFlushEvent event) throws HibernateException;

Source Link

Document

Handle the given auto-flush event.

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 2  s .  co  m*/
}