Java 类org.hibernate.event.spi.PreDeleteEvent 实例源码

项目:lams    文件:BeanValidationEventListener.java   
public boolean onPreDelete(PreDeleteEvent event) {
    validate(
            event.getEntity(), event.getPersister().getEntityMode(), event.getPersister(),
            event.getSession().getFactory(), GroupsPerOperation.Operation.DELETE
    );
    return false;
}
项目:lams    文件:EntityDeleteAction.java   
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;
}
项目:ix3    文件:EventListenerImplRuleEngine.java   
@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;
}
项目:lams    文件:JaccPreDeleteEventListener.java   
public boolean onPreDelete(PreDeleteEvent event) {
    performSecurityCheck( event, PermissibleAction.DELETE );
    return false;
}
项目:spring-entity-listener    文件:HibernateEntityListenersAdapter.java   
/**
 * @see org.hibernate.event.spi.PreDeleteEventListener#onPreDelete(org.hibernate
 *      .event.spi.PreDeleteEvent)
 */
@Override
public boolean onPreDelete(PreDeleteEvent event) {
    execute(preRemove, event.getEntity());
    return false;
}
项目:jersey2-toolkit    文件:HibernateSessionFactoryFactoryTest.java   
@Override
public boolean onPreDelete(final PreDeleteEvent event) {
    return false;
}