/** * Getter for property 'source'. This is the session from which the event * originated. * <p/> * Some of the pre-* events had previous exposed the event source using * getSource() because they had not originally extended from * {@link AbstractEvent}. * * @return Value for property 'source'. * * @deprecated Use {@link #getSession} instead */ @Deprecated public EventSource getSource() { return getSession(); }
protected void performSecurityCheck( SessionImplementor session, PermissionCheckEntityInformation entityInformation, PermissibleAction action) { if ( jaccService == null ) { jaccService = session.getFactory().getServiceRegistry().getService( JaccService.class ); } jaccService.checkPermission( entityInformation, action ); } }
/** * Getter for property 'source'. This is the session from which the event * originated. * <p/> * Some of the pre-* events had previous exposed the event source using * getSource() because they had not originally extended from * {@link AbstractEvent}. * * @return Value for property 'source'. * @deprecated Use {@link #getSession} instead */ public EventSource getSource() { return getSession(); } }
/** * Getter for property 'source'. This is the session from which the event * originated. * <p/> * Some of the pre-* events had previous exposed the event source using * getSource() because they had not originally extended from * {@link AbstractEvent}. * * @return Value for property 'source'. * @deprecated Use {@link #getSession} instead */ public EventSource getSource() { return getSession(); } }
/** * Getter for property 'source'. This is the session from which the event * originated. * <p/> * Some of the pre-* events had previous exposed the event source using * getContainer() because they had not originally extended from * {@link AbstractEvent}. * * @return Value for property 'source'. * * @deprecated Use {@link #getSession} instead */ @Deprecated public EventSource getSource() { return getSession(); }
private void synchronizeEntityUpdateActionState(AbstractPreDatabaseOperationEvent event, Object entity, HashMap<Integer, Object> changedState) { if(actionQueueUpdatesField != null && event instanceof PreInsertEvent && changedState.size() > 0) { try { ExecutableList<EntityUpdateAction> updates = (ExecutableList<EntityUpdateAction>)actionQueueUpdatesField.get(event.getSession().getActionQueue()); if(updates != null) { for (EntityUpdateAction updateAction : updates) { if(updateAction.getInstance() == entity) { Object[] updateState = (Object[])entityUpdateActionStateField.get(updateAction); if (updateState != null) { for(Map.Entry<Integer, Object> entry : changedState.entrySet()) { updateState[entry.getKey()] = entry.getValue(); } } } } } } catch (Exception e) { LOG.warn("Error synchronizing object state with Hibernate: " + e.getMessage(), e); } } }
protected void performSecurityCheck( SessionImplementor session, PermissionCheckEntityInformation entityInformation, PermissibleAction action) { if ( jaccService == null ) { jaccService = session.getFactory().getServiceRegistry().getService( JaccService.class ); } jaccService.checkPermission( entityInformation, action ); } }