Hibernate ORM PostUpdateEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM PostUpdateEvent class.

This code example shows how to use the following methods: getId, getOldState, getPersister, getState, getSession
		super( enversConfiguration );
	} 
 
	@Override 
	public void onPostUpdate(PostUpdateEvent event) {
        String entityName = event.getPersister().getEntityName();
 
        if ( getAuditConfiguration().getEntCfg().isVersioned(entityName) ) {
            AuditProcess auditProcess = getAuditConfiguration().getSyncManager().get(event.getSession());
 
            AuditWorkUnit workUnit = new ModWorkUnit(
					event.getSession(),
					event.getPersister().getEntityName(),
					getAuditConfiguration(), 
                    event.getId(),
					event.getPersister(),
					event.getState(),
					event.getOldState()
			); 
            auditProcess.addWorkUnit( workUnit );

7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: getEntity, getSession
	public EJB3PostUpdateEventListener(EntityCallbackHandler callbackHandler) {
		this.callbackHandler = callbackHandler;
	} 
 
	public void onPostUpdate(PostUpdateEvent event) {
		Object entity = event.getEntity();
		EventSource eventSource = event.getSession();
		handlePostUpdate(entity, eventSource);
	} 
 
	private void handlePostUpdate(Object entity, EventSource source) {
		EntityEntry entry = (EntityEntry) source.getPersistenceContext()
				.getEntityEntries().get(entity);
		// mimic the preUpdate filter 
		if ( Status.DELETED != entry.getStatus()) {
			callbackHandler.postUpdate(entity);
		} 
	} 
 
	public void onPostRecreateCollection(PostCollectionRecreateEvent event) {
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java