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

项目:cacheonix-core    文件:JACCPreInsertEventListener.java   
public boolean onPreInsert(PreInsertEvent event) {

        EJBMethodPermission insertPermission = new EJBMethodPermission(
                event.getPersister().getEntityName(),
                HibernatePermission.INSERT,
                null,
                null
        );

        JACCPermissions.checkPermission( event.getEntity().getClass(), contextID, insertPermission );

        return false;
    }
项目:cacheonix-core    文件:EntityInsertAction.java   
private boolean preInsert() {
    PreInsertEventListener[] preListeners = getSession().getListeners()
            .getPreInsertEventListeners();
    boolean veto = false;
    if (preListeners.length>0) {
        PreInsertEvent preEvent = new PreInsertEvent( getInstance(), getId(), state, getPersister(), getSession() );
        for ( int i = 0; i < preListeners.length; i++ ) {
            veto = preListeners[i].onPreInsert(preEvent) || veto;
        }
    }
    return veto;
}
项目:cacheonix-core    文件:EntityIdentityInsertAction.java   
private boolean preInsert() {
    PreInsertEventListener[] preListeners = getSession().getListeners()
            .getPreInsertEventListeners();
    boolean veto = false;
    if (preListeners.length>0) {
        PreInsertEvent preEvent = new PreInsertEvent( getInstance(), null, state, getPersister(), getSession() );
        for ( int i = 0; i < preListeners.length; i++ ) {
            veto = preListeners[i].onPreInsert(preEvent) || veto;
        }
    }
    return veto;
}
项目:TechnologyReadinessTool    文件:AuditedEntityListener.java   
@Override
public boolean onPreInsert(PreInsertEvent event) {
    if (event.getEntity() instanceof AuditedBaseEntity) {
        AuditedBaseEntity e = (AuditedBaseEntity) event.getEntity();

        e.setChangeUser(serviceContext.getUserName());

        setValue(event.getState(), event.getPersister().getEntityMetamodel().getPropertyNames(), "changeUser",
                e.getChangeUser());
    }
    return false;
}
项目:Lucee4    文件:PreInsertEventListenerImpl.java   
public boolean onPreInsert(PreInsertEvent event) {
    invoke(CommonUtil.PRE_INSERT, event.getEntity());
    return false;
}
项目:Lucee4    文件:AllEventListener.java   
public boolean onPreInsert(PreInsertEvent event) {
    invoke(CommonUtil.PRE_INSERT, event.getEntity());
    return false;
}