类org.hibernate.event.spi.AutoFlushEventListener源码实例Demo

下面列出了怎么用org.hibernate.event.spi.AutoFlushEventListener的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: lams   文件: SessionImpl.java
/**
 * detect in-memory changes, determine if the changes are to tables
 * named in the query and, if so, complete execution the flush
 */
protected boolean autoFlushIfRequired(Set querySpaces) throws HibernateException {
	checkOpen();
	if ( !isTransactionInProgress() ) {
		// do not auto-flush while outside a transaction
		return false;
	}
	AutoFlushEvent event = new AutoFlushEvent( querySpaces, this );
	for ( AutoFlushEventListener listener : listeners( EventType.AUTO_FLUSH ) ) {
		listener.onAutoFlush( event );
	}
	return event.isFlushRequired();
}
 
 类所在包
 类方法
 同包方法