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 ); } }
@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); }
@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 ); } }
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 ); } } }
@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); }
@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 ); } }
@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(); } } }
@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); }
@Override public void onPostDelete(PostDeleteEvent event) { evictCache( event.getEntity(), event.getPersister(), event.getSession(), null ); }
@Override public void onPostDelete(PostDeleteEvent event) { audit(event, Deletion, event.getEntity()); }
@Override public void onPostDeleteCommitFailed(PostDeleteEvent pde) { }
@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()); }
@Override public void onPostDelete( PostDeleteEvent event ) { updateIdentifiableObjects(); }
/** * @see org.hibernate.event.spi.PostDeleteEventListener#onPostDelete(org.hibernate * .event.spi.PostDeleteEvent) */ @Override public void onPostDelete(PostDeleteEvent event) { execute(postRemove, event.getEntity()); }
@Override public void onPostDelete(final PostDeleteEvent event) { }
@Override public void onPostDeleteCommitFailed(final PostDeleteEvent event) { }