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


Java PostUpdateEvent.getEntity方法代码示例

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


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

示例1: onPostUpdate

import org.hibernate.event.spi.PostUpdateEvent; //导入方法依赖的package包/类
@Override
public void onPostUpdate(PostUpdateEvent 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 updated");
    } else if (entity instanceof Asset) {
        Asset asset = (Asset) entity;
        repository = asset.getRepository();
        logger.debug("Repository statistics is outdated because asset is updated");
    }

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

示例2: onPostUpdate

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

	final Object entity = event.getEntity();
	final AbstractDocumentBuilder docBuilder = getDocumentBuilder( entity );
	if ( docBuilder != null && (skipDirtyChecks || docBuilder.isDirty(
			getDirtyPropertyNames(
					event
			)
	)) ) {
		Serializable id = event.getId();
		processWork( entity, id, WorkType.UPDATE, event, false );
	}
}
 
开发者ID:Hotware,项目名称:Hibernate-Search-GenericJPA,代码行数:18,代码来源:HibernateUpdateSource.java

示例3: onPostUpdate

import org.hibernate.event.spi.PostUpdateEvent; //导入方法依赖的package包/类
@Override
public void onPostUpdate(PostUpdateEvent 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.rePublishRecord(records.getRdf(),records.getRdfAbout(),records.getHost());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

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

示例4: onPostUpdate

import org.hibernate.event.spi.PostUpdateEvent; //导入方法依赖的package包/类
@Override
public void onPostUpdate(PostUpdateEvent pue) {
    autowired();
    EntityMode entityMode = pue.getPersister().getEntityMode();

    RuleContext ruleContext = new RuleContextImplNoPrincipal(pue.getEntity(), getOriginalEntity(pue.getOldState(), pue.getPersister()));

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


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