public boolean onPreInsert(PreInsertEvent event) { validate( event.getEntity(), event.getPersister().getEntityMode(), event.getPersister(), event.getSession().getFactory(), GroupsPerOperation.Operation.INSERT ); return false; }
private boolean preInsert() { boolean veto = false; final EventListenerGroup<PreInsertEventListener> listenerGroup = listenerGroup( EventType.PRE_INSERT ); if ( listenerGroup.isEmpty() ) { return veto; } final PreInsertEvent event = new PreInsertEvent( getInstance(), getId(), getState(), getPersister(), eventSource() ); for ( PreInsertEventListener listener : listenerGroup.listeners() ) { veto |= listener.onPreInsert( event ); } return veto; }
private boolean preInsert() { final EventListenerGroup<PreInsertEventListener> listenerGroup = listenerGroup( EventType.PRE_INSERT ); if ( listenerGroup.isEmpty() ) { // NO_VETO return false; } boolean veto = false; final PreInsertEvent event = new PreInsertEvent( getInstance(), null, getState(), getPersister(), eventSource() ); for ( PreInsertEventListener listener : listenerGroup.listeners() ) { veto |= listener.onPreInsert( event ); } return veto; }
@Override public boolean onPreInsert(PreInsertEvent event) { Object entity = event.getEntity(); Serializable id = event.getId(); encrypt(entity, id, event.getState()); return false; }
@Override public boolean onPreInsert(PreInsertEvent event) { if (event.getEntity() instanceof UpdatedTimestampEntity) { ((UpdatedTimestampEntity) event.getEntity()).updateUpdatedTimestamp(); } return true; }
/** * 엔티티를 새로 추가하기 전에 최종 갱신 시간을 추가합니다. * * @param event 이벤트 정보 * @return event bubbling을 그만 둘 것인가? */ @Override public boolean onPreInsert(PreInsertEvent event) { Object entity = event.getEntity(); if (entity instanceof IUpdateTimestampedEntity) { ((IUpdateTimestampedEntity) entity).updateUpdateTimestamp(); } return false; }
public boolean onPreInsert(PreInsertEvent event) { performSecurityCheck( event, PermissibleAction.INSERT ); return false; }
/** * @see org.hibernate.event.spi.PreInsertEventListener#onPreInsert(org.hibernate * .event.spi.PreInsertEvent) */ @Override public boolean onPreInsert(PreInsertEvent event) { execute(preInsert, event.getEntity()); return false; }
@Override public boolean onPreInsert(final PreInsertEvent event) { return false; }
@Override public boolean onPreInsert(PreInsertEvent pie) { autowired(); EntityMode entityMode = pie.getPersister().getEntityMode(); RuleContext ruleContext = new RuleContextImplNoPrincipal(pie.getEntity(), null); fireRules(ruleContext, pie.getPersister(), pie.getState(), entityMode, RuleGroupPredefined.PreInsert.class, RuleGroupPredefined.PreInsertOrUpdate.class, RuleGroupPredefined.PreInsertOrUpdateOrDelete.class); return false; }