public boolean onPreDelete(PreDeleteEvent event) { validate( event.getEntity(), event.getPersister().getEntityMode(), event.getPersister(), event.getSession().getFactory(), GroupsPerOperation.Operation.DELETE ); return false; }
private boolean preDelete() { boolean veto = false; final EventListenerGroup<PreDeleteEventListener> listenerGroup = listenerGroup( EventType.PRE_DELETE ); if ( listenerGroup.isEmpty() ) { return veto; } final PreDeleteEvent event = new PreDeleteEvent( getInstance(), getId(), state, getPersister(), eventSource() ); for ( PreDeleteEventListener listener : listenerGroup.listeners() ) { veto |= listener.onPreDelete( event ); } return veto; }
@Override public boolean onPreDelete(PreDeleteEvent pde) { autowired(); EntityMode entityMode = pde.getPersister().getEntityMode(); RuleContext ruleContext = new RuleContextImplNoPrincipal(pde.getEntity(), pde.getEntity()); fireRules(ruleContext, pde.getPersister(), null, entityMode, RuleGroupPredefined.PreDelete.class, RuleGroupPredefined.PreInsertOrUpdateOrDelete.class, RuleGroupPredefined.PreUpdateOrDelete.class); return false; }
public boolean onPreDelete(PreDeleteEvent event) { performSecurityCheck( event, PermissibleAction.DELETE ); return false; }
/** * @see org.hibernate.event.spi.PreDeleteEventListener#onPreDelete(org.hibernate * .event.spi.PreDeleteEvent) */ @Override public boolean onPreDelete(PreDeleteEvent event) { execute(preRemove, event.getEntity()); return false; }
@Override public boolean onPreDelete(final PreDeleteEvent event) { return false; }