本文整理了Java中org.hibernate.event.spi.EventSource.forceFlush()
方法的一些代码示例,展示了EventSource.forceFlush()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EventSource.forceFlush()
方法的具体详情如下:
包路径:org.hibernate.event.spi.EventSource
类名称:EventSource
方法名:forceFlush
[英]Force an immediate flush
[中]立即冲水
代码示例来源:origin: hibernate/hibernate-orm
/**
* The given save-update event named a transient entity.
* <p/>
* Here, we will perform the save processing.
*
* @param event The save event to be handled.
*
* @return The entity's identifier after saving.
*/
protected Serializable entityIsTransient(SaveOrUpdateEvent event) {
LOG.trace( "Saving transient instance" );
final EventSource source = event.getSession();
EntityEntry entityEntry = event.getEntry();
if ( entityEntry != null ) {
if ( entityEntry.getStatus() == Status.DELETED ) {
source.forceFlush( entityEntry );
}
else {
throw new AssertionFailure( "entity was persistent" );
}
}
Serializable id = saveWithGeneratedOrRequestedId( event );
source.getPersistenceContext().reassociateProxy( event.getObject(), id );
return id;
}
代码示例来源:origin: hibernate/hibernate-orm
if ( old != null ) {
if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
source.forceFlush( source.getPersistenceContext().getEntry( old ) );
代码示例来源:origin: org.jboss.seam/jboss-seam
public void forceFlush(EntityEntry paramEntityEntry) throws HibernateException
{
((EventSource) delegate).forceFlush(paramEntityEntry);
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
/**
* The given save-update event named a transient entity.
* <p/>
* Here, we will perform the save processing.
*
* @param event The save event to be handled.
*
* @return The entity's identifier after saving.
*/
protected Object entityIsTransient(SaveOrUpdateEvent event) {
LOG.trace( "Saving transient instance" );
final EventSource source = event.getSession();
EntityEntry entityEntry = event.getEntry();
if ( entityEntry != null ) {
if ( entityEntry.getStatus() == Status.DELETED ) {
source.forceFlush( entityEntry );
}
else {
throw new AssertionFailure( "entity was persistent" );
}
}
Object id = saveWithGeneratedOrRequestedId( event );
source.getPersistenceContext().reassociateProxy( event.getObject(), id );
return id;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* The given save-update event named a transient entity.
* <p/>
* Here, we will perform the save processing.
*
* @param event The save event to be handled.
*
* @return The entity's identifier after saving.
*/
protected Serializable entityIsTransient(SaveOrUpdateEvent event) {
LOG.trace( "Saving transient instance" );
final EventSource source = event.getSession();
EntityEntry entityEntry = event.getEntry();
if ( entityEntry != null ) {
if ( entityEntry.getStatus() == Status.DELETED ) {
source.forceFlush( entityEntry );
}
else {
throw new AssertionFailure( "entity was persistent" );
}
}
Serializable id = saveWithGeneratedOrRequestedId( event );
source.getPersistenceContext().reassociateProxy( event.getObject(), id );
return id;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* The given save-update event named a transient entity.
* <p/>
* Here, we will perform the save processing.
*
* @param event The save event to be handled.
*
* @return The entity's identifier after saving.
*/
protected Serializable entityIsTransient(SaveOrUpdateEvent event) {
LOG.trace( "Saving transient instance" );
final EventSource source = event.getSession();
EntityEntry entityEntry = event.getEntry();
if ( entityEntry != null ) {
if ( entityEntry.getStatus() == Status.DELETED ) {
source.forceFlush( entityEntry );
}
else {
throw new AssertionFailure( "entity was persistent" );
}
}
Serializable id = saveWithGeneratedOrRequestedId( event );
source.getPersistenceContext().reassociateProxy( event.getObject(), id );
return id;
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
if ( old != null ) {
if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
source.forceFlush( source.getPersistenceContext().getEntry( old ) );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
if ( old != null ) {
if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
source.forceFlush( source.getPersistenceContext().getEntry( old ) );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
if ( old != null ) {
if ( source.getPersistenceContext().getEntry( old ).getStatus() == Status.DELETED ) {
source.forceFlush( source.getPersistenceContext().getEntry( old ) );
内容来源于网络,如有侵权,请联系作者删除!