1 package org.hibernate.event.def; 3 4 import org.hibernate.HibernateException; 5 import org.hibernate.event.EventSource; 6 import org.hibernate.event.FlushEvent; 7 import org.hibernate.event.FlushEventListener; 8 9 15 public class DefaultFlushEventListener extends AbstractFlushingEventListener implements FlushEventListener { 16 17 22 public void onFlush(FlushEvent event) throws HibernateException { 23 final EventSource source = event.getSession(); 24 if ( source.getPersistenceContext().hasNonReadOnlyEntities() ) { 25 26 flushEverythingToExecutions(event); 27 performExecutions(source); 28 postFlush(source); 29 30 if ( source.getFactory().getStatistics().isStatisticsEnabled() ) { 31 source.getFactory().getStatisticsImplementor().flush(); 32 } 33 34 } 35 } 36 } 37 | Popular Tags |