private void postInsert() { final EventListenerGroup<PostInsertEventListener> listenerGroup = listenerGroup( EventType.POST_INSERT ); if ( listenerGroup.isEmpty() ) { return; } final PostInsertEvent event = new PostInsertEvent( getInstance(), getId(), getState(), getPersister(), eventSource() ); for ( PostInsertEventListener listener : listenerGroup.listeners() ) { listener.onPostInsert( event ); } }
private void postInsert() { if ( isDelayed ) { getSession().getPersistenceContext().replaceDelayedEntityIdentityInsertKeys( delayedEntityKey, generatedId ); } final EventListenerGroup<PostInsertEventListener> listenerGroup = listenerGroup( EventType.POST_INSERT ); if ( listenerGroup.isEmpty() ) { return; } final PostInsertEvent event = new PostInsertEvent( getInstance(), generatedId, getState(), getPersister(), eventSource() ); for ( PostInsertEventListener listener : listenerGroup.listeners() ) { listener.onPostInsert( event ); } }
@Override public void onPostInsert(PostInsertEvent 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 added"); } else if (entity instanceof TMTextUnitVariant) { TMTextUnitVariant tmTextUnitVariant = (TMTextUnitVariant) entity; TMTextUnit tmTextUnit = tmTextUnitVariant.getTmTextUnit(); repository = tmTextUnit.getAsset().getRepository(); logger.debug("Repository statistics is outdated because string/translation is added"); } setRepositoryStatistisOutOfDate(repository); }
private void postCommitInsert(boolean success) { final EventListenerGroup<PostInsertEventListener> listenerGroup = listenerGroup( EventType.POST_COMMIT_INSERT ); if ( listenerGroup.isEmpty() ) { return; } final PostInsertEvent event = new PostInsertEvent( getInstance(), getId(), getState(), getPersister(), eventSource() ); for ( PostInsertEventListener listener : listenerGroup.listeners() ) { if ( PostCommitInsertEventListener.class.isInstance( listener ) ) { if ( success ) { listener.onPostInsert( event ); } else { ((PostCommitInsertEventListener) listener).onPostInsertCommitFailed( event ); } } else { //default to the legacy implementation that always fires the event listener.onPostInsert( event ); } } }
private void postCommitInsert(boolean success) { final EventListenerGroup<PostInsertEventListener> listenerGroup = listenerGroup( EventType.POST_COMMIT_INSERT ); if ( listenerGroup.isEmpty() ) { return; } final PostInsertEvent event = new PostInsertEvent( getInstance(), generatedId, getState(), getPersister(), eventSource() ); for ( PostInsertEventListener listener : listenerGroup.listeners() ) { if ( PostCommitInsertEventListener.class.isInstance( listener ) ) { if ( success ) { listener.onPostInsert( event ); } else { ((PostCommitInsertEventListener) listener).onPostInsertCommitFailed( event ); } } else { //default to the legacy implementation that always fires the event listener.onPostInsert( event ); } } }
@Override public void onPostInsert(PostInsertEvent event) { // TODO // Repository check, get from Audit annotation, get from entoity table // name. if (event.getEntity().getClass().isAnnotationPresent(Audit.class)) { if (event.getEntity().getClass().isAnnotationPresent(Table.class)) { } AuditManager.getInstance().audit(new EventBuilder() .addAction("save " + event.getEntity().getClass().toString()) .addField(event.getEntity().getClass().toString(), event.getEntity()).build()); } }
public void onPostInsert(PostInsertEvent event) { String entityName = event.getPersister().getEntityName(); if (!Context.internalRequestScope().isAuditedByEnvers()) { log.debug(entityName + " NOT audited by Cibet configuration"); return; } else { log.debug(entityName + " audited by Cibet configuration"); } super.onPostInsert(event); }
@Override public void onPostInsert(PostInsertEvent 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.publishRecord(records.getRdf(), records.getRdfAbout(), records.getHost()); } } catch (Exception e) { e.printStackTrace(); } } }
@Override public void onPostInsert(PostInsertEvent event) { if ( disabled ) { return; } final Object entity = event.getEntity(); if ( getDocumentBuilder( entity ) != null ) { Serializable id = event.getId(); processWork( entity, id, WorkType.ADD, event, false ); } }
@Override public void onPostInsert(PostInsertEvent event) { evictCache( event.getEntity(), event.getPersister(), event.getSession(), null ); }
@Override public void onPostInsert(PostInsertEvent event) { audit(event, Creation, event.getEntity()); }
@Override public void onPostInsertCommitFailed(PostInsertEvent pie) { }
@Override public void onPostInsert(PostInsertEvent event) { // Do Nothing }
@Override public void onPostInsert( PostInsertEvent event ) { updateIdentifiableObjects(); }
/** * @see org.hibernate.event.spi.PostInsertEventListener#onPostInsert(org.hibernate * .event.spi.PostInsertEvent) */ @Override public void onPostInsert(PostInsertEvent event) { execute(postInsert, event.getEntity()); }
@Override public void onPostInsert(PostInsertEvent event) { if (event.getEntity() instanceof PersistentObject) { ((PersistentObject) event.getEntity()).onSave(); } }
@Override public void onPostInsert(PostInsertEvent pie) { autowired(); EntityMode entityMode = pie.getPersister().getEntityMode(); RuleContext ruleContext = new RuleContextImplNoPrincipal(pie.getEntity(), null); fireRules(ruleContext, pie.getPersister(), pie.getState(), entityMode, RuleGroupPredefined.PostInsert.class, RuleGroupPredefined.PostInsertOrUpdate.class, RuleGroupPredefined.PostInsertOrUpdateOrDelete.class); }
@Override public void onPostInsert(final PostInsertEvent event) { }
@Override public void onPostInsertCommitFailed(final PostInsertEvent event) { }