当前位置: 首页>>代码示例>>Java>>正文


Java PostDeleteEvent类代码示例

本文整理汇总了Java中org.hibernate.event.spi.PostDeleteEvent的典型用法代码示例。如果您正苦于以下问题:Java PostDeleteEvent类的具体用法?Java PostDeleteEvent怎么用?Java PostDeleteEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PostDeleteEvent类属于org.hibernate.event.spi包,在下文中一共展示了PostDeleteEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: postDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
private void postDelete() {
	final EventListenerGroup<PostDeleteEventListener> listenerGroup = listenerGroup( EventType.POST_DELETE );
	if ( listenerGroup.isEmpty() ) {
		return;
	}
	final PostDeleteEvent event = new PostDeleteEvent(
			getInstance(),
			getId(),
			state,
			getPersister(),
			eventSource()
	);
	for ( PostDeleteEventListener listener : listenerGroup.listeners() ) {
		listener.onPostDelete( event );
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:EntityDeleteAction.java

示例2: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
    Repository repository = null;
    Object entity = event.getEntity();

    if (entity instanceof RepositoryLocale) {
        RepositoryLocale repositoryLocale = (RepositoryLocale) entity;
        repository = repositoryLocale.getRepository();
        logger.debug("Repository statistics is outdated because locale is deleted");
    } else if (entity instanceof TMTextUnitCurrentVariant) {
        TMTextUnitCurrentVariant tmTextUnitCurrentVariant = (TMTextUnitCurrentVariant) entity;
        repository = tmTextUnitCurrentVariant.getTmTextUnit().getAsset().getRepository();
        logger.debug("Repository statistics is outdated because translation is deleted");
    }

    setRepositoryStatistisOutOfDate(repository);
}
 
开发者ID:box,项目名称:mojito,代码行数:18,代码来源:EntityCrudEventListener.java

示例3: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
	if ( disabled ) {
		return;
	}

	final Object entity = event.getEntity();
	if ( getDocumentBuilder( entity ) != null ) {
		// FIXME The engine currently needs to know about details such as identifierRollbackEnabled
		// but we should not move the responsibility to figure out the proper id to the engine
		boolean identifierRollbackEnabled = event.getSession()
				.getFactory()
				.getSettings()
				.isIdentifierRollbackEnabled();
		processWork(
				entity,
				event.getId(),
				WorkType.DELETE,
				event,
				identifierRollbackEnabled
		);
	}
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:24,代码来源:HibernateUpdateSource.java

示例4: postCommitDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
private void postCommitDelete(boolean success) {
	final EventListenerGroup<PostDeleteEventListener> listenerGroup = listenerGroup( EventType.POST_COMMIT_DELETE );
	if ( listenerGroup.isEmpty() ) {
		return;
	}
	final PostDeleteEvent event = new PostDeleteEvent(
			getInstance(),
			getId(),
			state,
			getPersister(),
			eventSource()
	);
	for ( PostDeleteEventListener listener : listenerGroup.listeners() ) {
		if ( PostCommitDeleteEventListener.class.isInstance( listener ) ) {
			if ( success ) {
				listener.onPostDelete( event );
			}
			else {
				((PostCommitDeleteEventListener) listener).onPostDeleteCommitFailed( event );
			}
		}
		else {
			//default to the legacy implementation that always fires the event
			listener.onPostDelete( event );
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:28,代码来源:EntityDeleteAction.java

示例5: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
   if (!Context.internalRequestScope().isAuditedByEnvers()) {
      String entityName = event.getPersister().getEntityName();
      log.debug(entityName + " not audited by Cibet configuration");
      return;
   }
   super.onPostDelete(event);
}
 
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:10,代码来源:CibetPostDeleteEventListener.java

示例6: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete( PostDeleteEvent event )
{
    if ( MetadataObject.class.isInstance( event.getEntity() ) )
    {
        IdentifiableObject identifiableObject = (IdentifiableObject) event.getEntity();
        DeletedObject deletedObject = new DeletedObject( identifiableObject );
        deletedObject.setDeletedBy( getUsername() );

        event.getSession().persist( deletedObject );
    }
}
 
开发者ID:dhis2,项目名称:dhis2-core,代码行数:13,代码来源:DeletedObjectPostDeleteEventListener.java

示例7: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent arg0) {
	if(arg0.getEntity() instanceof Records){
		Records records = (Records)arg0.getEntity();
		try {
			if(records.getRecordTypes().getIdRecordType()!=BygleSystemUtils.RESOURCE_TYPE_BINARY){
				EndPointManagerInterface endPointManager = endPointManagerProvider.getEndPointManager();
				endPointManager.dePublishRecord(records.getRdf(),records.getRdfAbout(),records.getHost());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

	}
}
 
开发者ID:regestaexe,项目名称:bygle-ldp,代码行数:16,代码来源:DBEventDeleteListener.java

示例8: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent pde) {
    autowired();
    EntityMode entityMode = pde.getPersister().getEntityMode();

    RuleContext ruleContext = new RuleContextImplNoPrincipal(pde.getEntity(), null);

    fireRules(ruleContext, pde.getPersister(), null, entityMode, RuleGroupPredefined.PostDelete.class, RuleGroupPredefined.PostInsertOrUpdateOrDelete.class, RuleGroupPredefined.PostUpdateOrDelete.class);
}
 
开发者ID:ix3,项目名称:ix3,代码行数:10,代码来源:EventListenerImplRuleEngine.java

示例9: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
	evictCache( event.getEntity(), event.getPersister(), event.getSession(), null );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:CollectionCacheInvalidator.java

示例10: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
    audit(event, Deletion, event.getEntity());
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:5,代码来源:AuditLogListener.java

示例11: onPostDeleteCommitFailed

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDeleteCommitFailed(PostDeleteEvent pde) {
}
 
开发者ID:box,项目名称:mojito,代码行数:4,代码来源:EntityCrudEventListener.java

示例12: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(PostDeleteEvent event) {
    AuditManager.getInstance().audit(new EventBuilder()
            .addAction("delete " + event.getEntity().getClass().toString())
            .addField(event.getEntity().getClass().toString(), event.getEntity()).build());
}
 
开发者ID:nipunthathsara,项目名称:Audit4j-Hibernate,代码行数:7,代码来源:AuditPostDeleteEventListenerImpl.java

示例13: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete( PostDeleteEvent event )
{
    updateIdentifiableObjects();
}
 
开发者ID:ehatle,项目名称:AgileAlligators,代码行数:6,代码来源:HibernateEventListenerWiring.java

示例14: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
/**
 * @see org.hibernate.event.spi.PostDeleteEventListener#onPostDelete(org.hibernate
 *      .event.spi.PostDeleteEvent)
 */
@Override
public void onPostDelete(PostDeleteEvent event) {
    execute(postRemove, event.getEntity());
}
 
开发者ID:beargiles,项目名称:spring-entity-listener,代码行数:9,代码来源:HibernateEntityListenersAdapter.java

示例15: onPostDelete

import org.hibernate.event.spi.PostDeleteEvent; //导入依赖的package包/类
@Override
public void onPostDelete(final PostDeleteEvent event) {

}
 
开发者ID:krotscheck,项目名称:jersey2-toolkit,代码行数:5,代码来源:HibernateSessionFactoryFactoryTest.java


注:本文中的org.hibernate.event.spi.PostDeleteEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。