Java 类org.hibernate.event.PreUpdateEventListener 实例源码

项目:cacheonix-core    文件:EntityUpdateAction.java   
private boolean preUpdate() {
    PreUpdateEventListener[] preListeners = getSession().getListeners()
            .getPreUpdateEventListeners();
    boolean veto = false;
    if (preListeners.length>0) {
        PreUpdateEvent preEvent = new PreUpdateEvent( 
                getInstance(), 
                getId(), 
                state, 
                previousState, 
                getPersister(),
                getSession()
            );
        for ( int i = 0; i < preListeners.length; i++ ) {
            veto = preListeners[i].onPreUpdate(preEvent) || veto;
        }
    }
    return veto;
}
项目:TechnologyReadinessTool    文件:HibernateExtendedPersistenceProvider.java   
public void setPreUpdateEventListeners(PreUpdateEventListener[] preUpdateEventListeners) {
    this.preUpdateEventListeners = preUpdateEventListeners;
}